openfox 2.0.93 → 2.0.94
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.
- package/CHANGELOG.md +13 -0
- package/dist/CHANGELOG.md +13 -0
- package/dist/{chat-handler-MSQFJH7S.js → chat-handler-Z7OCNJWO.js} +22 -22
- package/dist/{chunk-IAAHDCJN.js → chunk-27SDWNKL.js} +8 -5
- package/dist/{chunk-GH5PL3JW.js → chunk-2BCQDYNA.js} +3 -3
- package/dist/{chunk-ESJNJ5B6.js → chunk-3WKAKOU4.js} +3 -3
- package/dist/{chunk-TQATAKVV.js → chunk-4R7G5JB6.js} +1 -1
- package/dist/{chunk-3NGD6IVM.js → chunk-5N5JXT7R.js} +3 -3
- package/dist/{chunk-BJHPUMRX.js → chunk-62X2MPO6.js} +2 -2
- package/dist/{chunk-FK6R2YTQ.js → chunk-DLCMSSG3.js} +17 -17
- package/dist/{chunk-PYJ2SRVC.js → chunk-FVV7TZC2.js} +19 -4
- package/dist/{chunk-6OAJNCRY.js → chunk-GLF65XDS.js} +22 -1
- package/dist/{chunk-GAIAJDPH.js → chunk-KNRE3DG4.js} +142 -31
- package/dist/{chunk-C56Z4OVW.js → chunk-KU3YUGAN.js} +2 -2
- package/dist/{chunk-YM267G4F.js → chunk-LSDJCJWA.js} +4 -4
- package/dist/{chunk-SXHGRPCI.js → chunk-MC3MCMAF.js} +4 -4
- package/dist/{chunk-U2RSFH6A.js → chunk-MRWR3SIT.js} +2 -2
- package/dist/{chunk-RJQDC2OO.js → chunk-MUNVSHL5.js} +10 -10
- package/dist/{chunk-WWC3R3YL.js → chunk-NLN5LPQ4.js} +2 -2
- package/dist/chunk-O4NHL6IN.js +7 -0
- package/dist/{chunk-NGN3Q26A.js → chunk-OHBY2673.js} +2 -2
- package/dist/{chunk-AA4PXMSI.js → chunk-OQXG4MS4.js} +210 -92
- package/dist/{chunk-3QQKKZMF.js → chunk-P637C6X3.js} +2 -2
- package/dist/{chunk-6J5IZ2NL.js → chunk-TSHJW7OC.js} +37 -6
- package/dist/{chunk-54Q4TGG6.js → chunk-UEOEA6BB.js} +2 -2
- package/dist/{chunk-NW2KP7PE.js → chunk-V4QTGYXL.js} +6 -6
- package/dist/{chunk-AQ4KCGXL.js → chunk-VYN37NXW.js} +3 -3
- package/dist/{chunk-ST4NYXLH.js → chunk-WWFH5GAR.js} +2 -2
- package/dist/{chunk-7YBGCZSI.js → chunk-XNB3JWAR.js} +2 -2
- package/dist/{chunk-U7D72C4O.js → chunk-YJ5P33SE.js} +2 -2
- package/dist/{chunk-DH32AHTL.js → chunk-ZASSAZ73.js} +2 -2
- package/dist/{chunk-NV63HYNR.js → chunk-ZYDPYFRH.js} +8 -8
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-RBXMHFX3.js → client-OBMJSTFN.js} +5 -5
- package/dist/{compactor-R7GGPBPR.js → compactor-RSEV7VYH.js} +10 -10
- package/dist/{dynamic-context-4UPNVL3N.js → dynamic-context-C3BWQ5GK.js} +9 -9
- package/dist/{events-D5AFN2CW.js → events-SY5B4VED.js} +9 -7
- package/dist/{folding-BO6Z6HMP.js → folding-O4OYOTPS.js} +5 -5
- package/dist/http-client-3MOFAPO6.js +11 -0
- package/dist/{inspect-proxy-NZ3VSMSC.js → inspect-proxy-GF6OI7MR.js} +4 -4
- package/dist/{manager-ZPQ6VSM5.js → manager-UP3XMLKX.js} +5 -5
- package/dist/{orchestrator-YQI2D4LW.js → orchestrator-VSUL2C7G.js} +21 -21
- package/dist/package.json +1 -1
- package/dist/{path-security-DP75YZK5.js → path-security-E55IEQHD.js} +10 -10
- package/dist/{platform-UKZ2QC34.js → platform-7KXP3VVA.js} +4 -4
- package/dist/{processor-LVQWRG6M.js → processor-WP34IB3C.js} +21 -21
- package/dist/{project-creator-2WMZYQME.js → project-creator-SMWFMIU5.js} +3 -3
- package/dist/{projects-N6KVZGMS.js → projects-M5XKC7O6.js} +3 -3
- package/dist/{protocol-8BzyapcK.d.ts → protocol-C5ROb3nH.d.ts} +5 -4
- package/dist/{protocol-4ZDERZNC.js → protocol-YDNGGADL.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-SYYZI2KX.js → provider-E5IP7RF7.js} +6 -6
- package/dist/{provider-manager-P3ZSA5QS.js → provider-manager-FVIFMUTO.js} +6 -6
- package/dist/{registry-ERUV33AP.js → registry-XBEHPY7C.js} +4 -4
- package/dist/{serve-HEHWSYMX.js → serve-NZZVFNMA.js} +29 -29
- package/dist/server/index.d.ts +39 -3
- package/dist/server/index.js +28 -28
- package/dist/server-DYJTLAZS.js +46 -0
- package/dist/{session-overrides-NPVYNHTM.js → session-overrides-QWD4V5KW.js} +6 -6
- package/dist/{sessions-7KCM5QH4.js → sessions-BT4PION7.js} +15 -7
- package/dist/{settings-2OVKFWR5.js → settings-2WVGUPYV.js} +3 -3
- package/dist/shared/index.d.ts +3 -3
- package/dist/shared/index.js +1 -1
- package/dist/{tools-HDD7RHEG.js → tools-YXOCUUKE.js} +19 -19
- package/dist/{types-_OEK96iM.d.ts → types-D-dEQIrh.d.ts} +1 -1
- package/dist/{types-Ci7Tdpq3.d.ts → types-DHxO1nqw.d.ts} +17 -1
- package/dist/{update-JARYMNGH.js → update-5HWU675H.js} +2 -2
- package/dist/web/assets/{index-B3lfsL1_.css → index-BlV1FebL.css} +1 -1
- package/dist/web/assets/{index-DxTIqntH.js → index-DxAR7yc9.js} +21 -21
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/{workspace-YLTMP3OX.js → workspace-IIRKILYL.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-LVZ6VQ3K.js +0 -7
- package/dist/http-client-E3CV6E5D.js +0 -11
- package/dist/server-AAIYC4BH.js +0 -46
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KNRE3DG4.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-
|
|
33
|
+
} from "./chunk-DLCMSSG3.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-
|
|
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-
|
|
70
|
+
} from "./chunk-MC3MCMAF.js";
|
|
71
71
|
import {
|
|
72
72
|
getSessionDisabledServers,
|
|
73
73
|
setSessionDisabledServers
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-5N5JXT7R.js";
|
|
75
75
|
import {
|
|
76
76
|
createContextStateMessage
|
|
77
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
107
|
+
} from "./chunk-FVV7TZC2.js";
|
|
107
108
|
import {
|
|
108
109
|
getPathSeparator,
|
|
109
110
|
isAbsolutePath
|
|
110
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-NLN5LPQ4.js";
|
|
111
112
|
import {
|
|
112
113
|
VERSION
|
|
113
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-O4NHL6IN.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
|
-
|
|
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-
|
|
156
|
+
} from "./chunk-OHBY2673.js";
|
|
152
157
|
import {
|
|
153
158
|
createProviderManager,
|
|
154
159
|
detectModel,
|
|
155
160
|
getLlmStatus,
|
|
156
161
|
parseDefaultModelSelection
|
|
157
|
-
} from "./chunk-
|
|
162
|
+
} from "./chunk-2BCQDYNA.js";
|
|
158
163
|
import {
|
|
159
164
|
getModelProfile
|
|
160
165
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -168,22 +173,22 @@ import {
|
|
|
168
173
|
SessionNotFoundError,
|
|
169
174
|
WorkspaceInUseError,
|
|
170
175
|
proxyFetch
|
|
171
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-XNB3JWAR.js";
|
|
172
177
|
import {
|
|
173
178
|
deleteSetting,
|
|
174
179
|
getSetting,
|
|
175
180
|
setSetting
|
|
176
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-UEOEA6BB.js";
|
|
177
182
|
import {
|
|
178
183
|
initDatabase
|
|
179
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-GLF65XDS.js";
|
|
180
185
|
import {
|
|
181
186
|
logger,
|
|
182
187
|
setLogLevel
|
|
183
188
|
} from "./chunk-K44MW7JJ.js";
|
|
184
189
|
import {
|
|
185
190
|
createServerMessage
|
|
186
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-4R7G5JB6.js";
|
|
187
192
|
import {
|
|
188
193
|
getGlobalConfigDir
|
|
189
194
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -2947,6 +2952,119 @@ var SessionManager = class {
|
|
|
2947
2952
|
return updatedSession;
|
|
2948
2953
|
}
|
|
2949
2954
|
// ============================================================================
|
|
2955
|
+
// Workflow Execution
|
|
2956
|
+
// ============================================================================
|
|
2957
|
+
/**
|
|
2958
|
+
* Start a new workflow execution. Cancels any existing active execution first,
|
|
2959
|
+
* then inserts a new row and emits events.
|
|
2960
|
+
*/
|
|
2961
|
+
startWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor, params) {
|
|
2962
|
+
const existing = this.getActiveWorkflowExecution(sessionId);
|
|
2963
|
+
if (existing) {
|
|
2964
|
+
this.cancelWorkflow(sessionId, existing.id, existing.workflowId, existing.workflowName, existing.workflowColor);
|
|
2965
|
+
}
|
|
2966
|
+
createWorkflowExecution(executionId, sessionId, workflowId, workflowName, workflowColor, params);
|
|
2967
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "running");
|
|
2968
|
+
const updatedSession = this.requireSession(sessionId);
|
|
2969
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* Update the current step of a running workflow execution.
|
|
2973
|
+
*/
|
|
2974
|
+
updateWorkflowStep(sessionId, executionId, stepId, stepName, workflowId, workflowName, workflowColor) {
|
|
2975
|
+
updateWorkflowExecutionStatus(executionId, "running", stepId, stepName);
|
|
2976
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "running", stepName);
|
|
2977
|
+
const updatedSession = this.requireSession(sessionId);
|
|
2978
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
2979
|
+
}
|
|
2980
|
+
/**
|
|
2981
|
+
* Pause at a user step. Sets status to 'waiting' and records step output.
|
|
2982
|
+
*/
|
|
2983
|
+
waitAtStep(sessionId, executionId, stepId, stepName, stepOutput, workflowId, workflowName, workflowColor) {
|
|
2984
|
+
updateWorkflowExecutionStatus(executionId, "waiting", stepId, stepName, stepOutput);
|
|
2985
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "waiting", stepName);
|
|
2986
|
+
this.setPhase(sessionId, "waiting");
|
|
2987
|
+
const updatedSession = this.requireSession(sessionId);
|
|
2988
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
2989
|
+
}
|
|
2990
|
+
/**
|
|
2991
|
+
* Resume a paused workflow. Returns the saved params and step output.
|
|
2992
|
+
*/
|
|
2993
|
+
resumeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
2994
|
+
const row = getActiveWorkflowExecution(sessionId);
|
|
2995
|
+
if (!row || row.id !== executionId) return null;
|
|
2996
|
+
updateWorkflowExecutionStatus(executionId, "running");
|
|
2997
|
+
emitWorkflowExecutionChanged(
|
|
2998
|
+
sessionId,
|
|
2999
|
+
executionId,
|
|
3000
|
+
workflowId,
|
|
3001
|
+
workflowName,
|
|
3002
|
+
workflowColor,
|
|
3003
|
+
"running",
|
|
3004
|
+
row.current_step_name ?? void 0
|
|
3005
|
+
);
|
|
3006
|
+
const updatedSession = this.requireSession(sessionId);
|
|
3007
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
3008
|
+
return {
|
|
3009
|
+
params: JSON.parse(row.params ?? "{}"),
|
|
3010
|
+
stepOutput: JSON.parse(row.step_output ?? "{}")
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
/**
|
|
3014
|
+
* Mark workflow as completed and clean up.
|
|
3015
|
+
*/
|
|
3016
|
+
completeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
3017
|
+
updateWorkflowExecutionStatus(executionId, "completed");
|
|
3018
|
+
clearWorkflowExecution(executionId);
|
|
3019
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "completed");
|
|
3020
|
+
this.setPhase(sessionId, "done");
|
|
3021
|
+
const updatedSession = this.requireSession(sessionId);
|
|
3022
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
3023
|
+
}
|
|
3024
|
+
/**
|
|
3025
|
+
* Cancel/exit a workflow execution.
|
|
3026
|
+
*/
|
|
3027
|
+
cancelWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
3028
|
+
updateWorkflowExecutionStatus(executionId, "cancelled");
|
|
3029
|
+
clearWorkflowExecution(executionId);
|
|
3030
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "cancelled");
|
|
3031
|
+
this.setPhase(sessionId, "build");
|
|
3032
|
+
const updatedSession = this.requireSession(sessionId);
|
|
3033
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
3034
|
+
}
|
|
3035
|
+
/**
|
|
3036
|
+
* Mark workflow as blocked.
|
|
3037
|
+
*/
|
|
3038
|
+
blockWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
3039
|
+
updateWorkflowExecutionStatus(executionId, "blocked");
|
|
3040
|
+
clearWorkflowExecution(executionId);
|
|
3041
|
+
emitWorkflowExecutionChanged(sessionId, executionId, workflowId, workflowName, workflowColor, "blocked");
|
|
3042
|
+
this.setPhase(sessionId, "blocked");
|
|
3043
|
+
const updatedSession = this.requireSession(sessionId);
|
|
3044
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
3045
|
+
}
|
|
3046
|
+
/**
|
|
3047
|
+
* Get the active workflow execution for a session, mapped to the shared type.
|
|
3048
|
+
*/
|
|
3049
|
+
getActiveWorkflowExecution(sessionId) {
|
|
3050
|
+
const row = getActiveWorkflowExecution(sessionId);
|
|
3051
|
+
if (!row) return null;
|
|
3052
|
+
return {
|
|
3053
|
+
id: row.id,
|
|
3054
|
+
sessionId: row.session_id,
|
|
3055
|
+
workflowId: row.workflow_id,
|
|
3056
|
+
workflowName: row.workflow_name,
|
|
3057
|
+
...row.workflow_color ? { workflowColor: row.workflow_color } : {},
|
|
3058
|
+
status: row.status,
|
|
3059
|
+
...row.current_step_id ? { currentStepId: row.current_step_id } : {},
|
|
3060
|
+
...row.current_step_name ? { currentStepName: row.current_step_name } : {},
|
|
3061
|
+
stepOutput: JSON.parse(row.step_output ?? "{}"),
|
|
3062
|
+
params: JSON.parse(row.params ?? "{}"),
|
|
3063
|
+
createdAt: row.created_at,
|
|
3064
|
+
updatedAt: row.updated_at
|
|
3065
|
+
};
|
|
3066
|
+
}
|
|
3067
|
+
// ============================================================================
|
|
2950
3068
|
// Session Metadata (DB operations)
|
|
2951
3069
|
// ============================================================================
|
|
2952
3070
|
/**
|
|
@@ -5575,7 +5693,7 @@ async function createServerHandle(config3) {
|
|
|
5575
5693
|
setMcpTools(mcpTools);
|
|
5576
5694
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5577
5695
|
}
|
|
5578
|
-
const { signalMcpReady } = await import("./server-
|
|
5696
|
+
const { signalMcpReady } = await import("./server-DYJTLAZS.js");
|
|
5579
5697
|
signalMcpReady();
|
|
5580
5698
|
});
|
|
5581
5699
|
const app = express();
|
|
@@ -5653,7 +5771,7 @@ async function createServerHandle(config3) {
|
|
|
5653
5771
|
res.json({ tools });
|
|
5654
5772
|
});
|
|
5655
5773
|
app.get("/api/projects", async (_req, res) => {
|
|
5656
|
-
const { listProjects } = await import("./projects-
|
|
5774
|
+
const { listProjects } = await import("./projects-M5XKC7O6.js");
|
|
5657
5775
|
const projects = listProjects();
|
|
5658
5776
|
res.json({ projects });
|
|
5659
5777
|
});
|
|
@@ -5662,7 +5780,7 @@ async function createServerHandle(config3) {
|
|
|
5662
5780
|
if (!name || !workdir) {
|
|
5663
5781
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5664
5782
|
}
|
|
5665
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
5783
|
+
const { createDirectoryWithGit } = await import("./project-creator-SMWFMIU5.js");
|
|
5666
5784
|
try {
|
|
5667
5785
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5668
5786
|
res.status(201).json({ project });
|
|
@@ -5707,7 +5825,7 @@ async function createServerHandle(config3) {
|
|
|
5707
5825
|
}
|
|
5708
5826
|
});
|
|
5709
5827
|
app.get("/api/projects/:id", async (req, res) => {
|
|
5710
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5828
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5711
5829
|
const project = getProject2(req.params.id);
|
|
5712
5830
|
if (!project) {
|
|
5713
5831
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5715,7 +5833,7 @@ async function createServerHandle(config3) {
|
|
|
5715
5833
|
res.json({ project });
|
|
5716
5834
|
});
|
|
5717
5835
|
app.put("/api/projects/:id", async (req, res) => {
|
|
5718
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
5836
|
+
const { updateProject: updateProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5719
5837
|
const { name, customInstructions, dangerLevel } = req.body;
|
|
5720
5838
|
const updates = {};
|
|
5721
5839
|
if (name !== void 0) updates.name = name;
|
|
@@ -5728,7 +5846,7 @@ async function createServerHandle(config3) {
|
|
|
5728
5846
|
res.json({ project: updated });
|
|
5729
5847
|
});
|
|
5730
5848
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
5731
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
5849
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-M5XKC7O6.js");
|
|
5732
5850
|
const project = getProject2(req.params.id);
|
|
5733
5851
|
if (!project) {
|
|
5734
5852
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5737,7 +5855,7 @@ async function createServerHandle(config3) {
|
|
|
5737
5855
|
res.json({ success: true });
|
|
5738
5856
|
});
|
|
5739
5857
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
5740
|
-
const { toggleStar } = await import("./projects-
|
|
5858
|
+
const { toggleStar } = await import("./projects-M5XKC7O6.js");
|
|
5741
5859
|
const { isStarred } = req.body;
|
|
5742
5860
|
if (typeof isStarred !== "boolean") {
|
|
5743
5861
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -5749,26 +5867,26 @@ async function createServerHandle(config3) {
|
|
|
5749
5867
|
res.json({ project });
|
|
5750
5868
|
});
|
|
5751
5869
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
5752
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5870
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5753
5871
|
const project = getProject2(req.params.id);
|
|
5754
5872
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5755
|
-
const { listBranches } = await import("./workspace-
|
|
5873
|
+
const { listBranches } = await import("./workspace-IIRKILYL.js");
|
|
5756
5874
|
const branches = await listBranches(project.workdir);
|
|
5757
5875
|
res.json({ branches });
|
|
5758
5876
|
});
|
|
5759
5877
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
5760
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5878
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5761
5879
|
const project = getProject2(req.params.id);
|
|
5762
5880
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5763
5881
|
const { branch } = req.body;
|
|
5764
5882
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5765
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
5883
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
5766
5884
|
if (!await isGitRepository(project.workdir)) {
|
|
5767
5885
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
5768
5886
|
}
|
|
5769
5887
|
try {
|
|
5770
5888
|
await checkoutBranch(project.workdir, branch);
|
|
5771
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5889
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5772
5890
|
const allSessions = sessionManager.listSessions();
|
|
5773
5891
|
for (const s of allSessions) {
|
|
5774
5892
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5782,12 +5900,12 @@ async function createServerHandle(config3) {
|
|
|
5782
5900
|
}
|
|
5783
5901
|
});
|
|
5784
5902
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
5785
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5903
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5786
5904
|
const project = getProject2(req.params.id);
|
|
5787
5905
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5788
5906
|
const { name, sourceBranch } = req.body;
|
|
5789
5907
|
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-
|
|
5908
|
+
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
5791
5909
|
if (!await isGitRepository(project.workdir)) {
|
|
5792
5910
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
5793
5911
|
}
|
|
@@ -5804,7 +5922,7 @@ async function createServerHandle(config3) {
|
|
|
5804
5922
|
);
|
|
5805
5923
|
}
|
|
5806
5924
|
await createBranch(project.workdir, name, sb);
|
|
5807
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5925
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5808
5926
|
const allSessions = sessionManager.listSessions();
|
|
5809
5927
|
for (const s of allSessions) {
|
|
5810
5928
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5821,7 +5939,7 @@ async function createServerHandle(config3) {
|
|
|
5821
5939
|
const session = sessionManager.getSession(req.params.id);
|
|
5822
5940
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5823
5941
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5824
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
5942
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-IIRKILYL.js");
|
|
5825
5943
|
const [branches, defaultBranch] = await Promise.all([
|
|
5826
5944
|
listBranches(effectiveWorkdir),
|
|
5827
5945
|
getDefaultBranch(session.workdir)
|
|
@@ -5835,8 +5953,8 @@ async function createServerHandle(config3) {
|
|
|
5835
5953
|
const { branch } = req.body;
|
|
5836
5954
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5837
5955
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5838
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
5839
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5956
|
+
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-IIRKILYL.js");
|
|
5957
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5840
5958
|
try {
|
|
5841
5959
|
await validateRef2(effectiveWorkdir, branch);
|
|
5842
5960
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -5878,16 +5996,16 @@ All file and git operations should use this branch.
|
|
|
5878
5996
|
const { name, sourceBranch } = req.body;
|
|
5879
5997
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
5880
5998
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5881
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
5882
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5999
|
+
const { validateRef: validateRef2 } = await import("./workspace-IIRKILYL.js");
|
|
6000
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5883
6001
|
try {
|
|
5884
6002
|
await validateRef2(effectiveWorkdir, name);
|
|
5885
6003
|
if (sourceBranch) {
|
|
5886
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6004
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-IIRKILYL.js");
|
|
5887
6005
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
5888
6006
|
await createBranch(effectiveWorkdir, name, sb);
|
|
5889
6007
|
} else {
|
|
5890
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6008
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-IIRKILYL.js");
|
|
5891
6009
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
5892
6010
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
5893
6011
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -5925,17 +6043,17 @@ All file and git operations should use this branch.
|
|
|
5925
6043
|
}
|
|
5926
6044
|
});
|
|
5927
6045
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
5928
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6046
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5929
6047
|
const project = getProject2(req.params.id);
|
|
5930
6048
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5931
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6049
|
+
const { listWorkspaces } = await import("./workspace-IIRKILYL.js");
|
|
5932
6050
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
5933
6051
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
5934
6052
|
res.json({ workspaces: workspacesList });
|
|
5935
6053
|
});
|
|
5936
6054
|
app.get("/api/sessions", async (req, res) => {
|
|
5937
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5938
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6055
|
+
const { getRecentUserPromptsForSession } = await import("./events-SY5B4VED.js");
|
|
6056
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-E55IEQHD.js");
|
|
5939
6057
|
const projectId = req.query["projectId"];
|
|
5940
6058
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5941
6059
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5981,7 +6099,7 @@ All file and git operations should use this branch.
|
|
|
5981
6099
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
5982
6100
|
}
|
|
5983
6101
|
if (disabledServers.length > 0) {
|
|
5984
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6102
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-QWD4V5KW.js");
|
|
5985
6103
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
5986
6104
|
}
|
|
5987
6105
|
} catch {
|
|
@@ -6018,7 +6136,7 @@ All file and git operations should use this branch.
|
|
|
6018
6136
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6019
6137
|
const project = sessionManager.getProject(session.projectId);
|
|
6020
6138
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6021
|
-
const { isGitRepository } = await import("./workspace-
|
|
6139
|
+
const { isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
6022
6140
|
if (!await isGitRepository(project.workdir)) {
|
|
6023
6141
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6024
6142
|
}
|
|
@@ -6036,7 +6154,7 @@ All file and git operations should use this branch.
|
|
|
6036
6154
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6037
6155
|
const project = sessionManager.getProject(session.projectId);
|
|
6038
6156
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6039
|
-
const { isGitRepository } = await import("./workspace-
|
|
6157
|
+
const { isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
6040
6158
|
if (!await isGitRepository(project.workdir)) {
|
|
6041
6159
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6042
6160
|
}
|
|
@@ -6054,10 +6172,10 @@ All file and git operations should use this branch.
|
|
|
6054
6172
|
}
|
|
6055
6173
|
});
|
|
6056
6174
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6057
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6058
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations
|
|
6059
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6060
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6175
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-SY5B4VED.js");
|
|
6176
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
|
|
6177
|
+
const { getPendingQuestionsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6178
|
+
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6061
6179
|
const session = sessionManager.getSession(req.params.id);
|
|
6062
6180
|
if (!session) {
|
|
6063
6181
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -6071,7 +6189,7 @@ All file and git operations should use this branch.
|
|
|
6071
6189
|
const queueState = sessionManager.getQueueState(req.params.id);
|
|
6072
6190
|
const pendingQuestions = getPendingQuestionsForSession(req.params.id);
|
|
6073
6191
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
6074
|
-
const
|
|
6192
|
+
const activeWorkflowExecution = sessionManager.getActiveWorkflowExecution(req.params.id);
|
|
6075
6193
|
res.json({
|
|
6076
6194
|
session,
|
|
6077
6195
|
messages,
|
|
@@ -6080,7 +6198,7 @@ All file and git operations should use this branch.
|
|
|
6080
6198
|
queueState,
|
|
6081
6199
|
pendingQuestions,
|
|
6082
6200
|
pendingConfirmations,
|
|
6083
|
-
|
|
6201
|
+
activeWorkflowExecution
|
|
6084
6202
|
});
|
|
6085
6203
|
});
|
|
6086
6204
|
app.delete("/api/sessions/:id", async (req, res) => {
|
|
@@ -6089,8 +6207,8 @@ All file and git operations should use this branch.
|
|
|
6089
6207
|
if (!session) {
|
|
6090
6208
|
return res.status(404).json({ error: "Session not found" });
|
|
6091
6209
|
}
|
|
6092
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6093
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6210
|
+
const { stopSessionExecution } = await import("./chat-handler-Z7OCNJWO.js");
|
|
6211
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6094
6212
|
sessionManager.clearMessageQueue(sessionId);
|
|
6095
6213
|
stopSessionExecution(sessionId, sessionManager);
|
|
6096
6214
|
abortSession(sessionId);
|
|
@@ -6119,9 +6237,9 @@ All file and git operations should use this branch.
|
|
|
6119
6237
|
res.json({ success: true });
|
|
6120
6238
|
});
|
|
6121
6239
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6122
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6123
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6124
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6240
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-SY5B4VED.js");
|
|
6241
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6242
|
+
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6125
6243
|
const sessionId = req.params.id;
|
|
6126
6244
|
const session = sessionManager.getSession(sessionId);
|
|
6127
6245
|
if (!session) {
|
|
@@ -6234,9 +6352,9 @@ All file and git operations should use this branch.
|
|
|
6234
6352
|
res.json({ success: true });
|
|
6235
6353
|
});
|
|
6236
6354
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6237
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6238
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6239
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6355
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-SY5B4VED.js");
|
|
6356
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6357
|
+
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6240
6358
|
const sessionId = req.params.id;
|
|
6241
6359
|
const session = sessionManager.getSession(sessionId);
|
|
6242
6360
|
if (!session) {
|
|
@@ -6322,7 +6440,7 @@ All file and git operations should use this branch.
|
|
|
6322
6440
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6323
6441
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6324
6442
|
}
|
|
6325
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6443
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-YXOCUUKE.js");
|
|
6326
6444
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6327
6445
|
if (!pendingSessionId) {
|
|
6328
6446
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6334,11 +6452,11 @@ All file and git operations should use this branch.
|
|
|
6334
6452
|
if (!result.found) {
|
|
6335
6453
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6336
6454
|
}
|
|
6337
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6338
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6339
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
6340
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6341
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6455
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-SY5B4VED.js");
|
|
6456
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-O4OYOTPS.js");
|
|
6457
|
+
const { createSessionStateMessage } = await import("./protocol-YDNGGADL.js");
|
|
6458
|
+
const { getPendingQuestionsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6459
|
+
const { getMaxVisibleItems } = await import("./settings-2WVGUPYV.js");
|
|
6342
6460
|
const eventStore = getEventStore2();
|
|
6343
6461
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6344
6462
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6374,7 +6492,7 @@ All file and git operations should use this branch.
|
|
|
6374
6492
|
if (!skip && typeof answer !== "string") {
|
|
6375
6493
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6376
6494
|
}
|
|
6377
|
-
const { provideAnswer } = await import("./tools-
|
|
6495
|
+
const { provideAnswer } = await import("./tools-YXOCUUKE.js");
|
|
6378
6496
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6379
6497
|
if (!found) {
|
|
6380
6498
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6407,7 +6525,7 @@ All file and git operations should use this branch.
|
|
|
6407
6525
|
if (!session) {
|
|
6408
6526
|
return res.status(404).json({ error: "Session not found" });
|
|
6409
6527
|
}
|
|
6410
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6528
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
|
|
6411
6529
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6412
6530
|
return res.json({ success: false, reason: "disabled" });
|
|
6413
6531
|
}
|
|
@@ -6439,7 +6557,7 @@ All file and git operations should use this branch.
|
|
|
6439
6557
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6440
6558
|
model: llmClient.getModel()
|
|
6441
6559
|
};
|
|
6442
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6560
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-VSUL2C7G.js");
|
|
6443
6561
|
runAgentTurn(
|
|
6444
6562
|
{
|
|
6445
6563
|
sessionManager,
|
|
@@ -6477,15 +6595,15 @@ All file and git operations should use this branch.
|
|
|
6477
6595
|
if (!session) {
|
|
6478
6596
|
return res.status(404).json({ error: "Session not found" });
|
|
6479
6597
|
}
|
|
6480
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6481
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6598
|
+
const { stopSessionExecution } = await import("./chat-handler-Z7OCNJWO.js");
|
|
6599
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6482
6600
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6483
6601
|
sessionManager.clearMessageQueue(sessionId);
|
|
6484
6602
|
stopSessionExecution(sessionId, sessionManager);
|
|
6485
6603
|
abortSession(sessionId);
|
|
6486
6604
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6487
6605
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6488
|
-
const eventStore = (await import("./events-
|
|
6606
|
+
const eventStore = (await import("./events-SY5B4VED.js")).getEventStore();
|
|
6489
6607
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6490
6608
|
res.json({ success: true, queuedMessages });
|
|
6491
6609
|
});
|
|
@@ -6499,7 +6617,7 @@ All file and git operations should use this branch.
|
|
|
6499
6617
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6500
6618
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6501
6619
|
}
|
|
6502
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6620
|
+
const { truncateSessionMessages } = await import("./events-SY5B4VED.js");
|
|
6503
6621
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6504
6622
|
res.json({ success: true });
|
|
6505
6623
|
});
|
|
@@ -6516,8 +6634,8 @@ All file and git operations should use this branch.
|
|
|
6516
6634
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
6517
6635
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
6518
6636
|
}
|
|
6519
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6520
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6637
|
+
const { getEventStore: getEventStore2 } = await import("./events-SY5B4VED.js");
|
|
6638
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6521
6639
|
const eventStore = getEventStore2();
|
|
6522
6640
|
const events = eventStore.getEvents(sessionId);
|
|
6523
6641
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -6529,7 +6647,7 @@ All file and git operations should use this branch.
|
|
|
6529
6647
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6530
6648
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6531
6649
|
}
|
|
6532
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6650
|
+
const { truncateSessionMessages } = await import("./events-SY5B4VED.js");
|
|
6533
6651
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6534
6652
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
6535
6653
|
res.json({ success: true });
|
|
@@ -6585,7 +6703,7 @@ All file and git operations should use this branch.
|
|
|
6585
6703
|
res.json({ accepted: true });
|
|
6586
6704
|
});
|
|
6587
6705
|
app.get("/api/settings", async (req, res) => {
|
|
6588
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6706
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6589
6707
|
const keysParam = req.query["keys"];
|
|
6590
6708
|
if (!keysParam) {
|
|
6591
6709
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -6598,19 +6716,19 @@ All file and git operations should use this branch.
|
|
|
6598
6716
|
res.json(result);
|
|
6599
6717
|
});
|
|
6600
6718
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6601
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6719
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6602
6720
|
const key = req.params.key;
|
|
6603
6721
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6604
6722
|
res.json({ key, value });
|
|
6605
6723
|
});
|
|
6606
6724
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6607
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6725
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6608
6726
|
const key = req.params.key;
|
|
6609
6727
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6610
6728
|
res.json({ key, value });
|
|
6611
6729
|
});
|
|
6612
6730
|
app.put("/api/settings/:key", async (req, res) => {
|
|
6613
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
6731
|
+
const { setSetting: setSetting2 } = await import("./settings-2WVGUPYV.js");
|
|
6614
6732
|
const key = req.params.key;
|
|
6615
6733
|
const { value } = req.body;
|
|
6616
6734
|
if (value === void 0) {
|
|
@@ -6637,7 +6755,7 @@ All file and git operations should use this branch.
|
|
|
6637
6755
|
}
|
|
6638
6756
|
});
|
|
6639
6757
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
6640
|
-
const { listAvailableShells } = await import("./platform-
|
|
6758
|
+
const { listAvailableShells } = await import("./platform-7KXP3VVA.js");
|
|
6641
6759
|
res.json({ shells: listAvailableShells() });
|
|
6642
6760
|
});
|
|
6643
6761
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -6796,7 +6914,7 @@ All file and git operations should use this branch.
|
|
|
6796
6914
|
}
|
|
6797
6915
|
});
|
|
6798
6916
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
6799
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6917
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
|
|
6800
6918
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
6801
6919
|
if (!proxyUrl) {
|
|
6802
6920
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -6823,7 +6941,7 @@ All file and git operations should use this branch.
|
|
|
6823
6941
|
const backend = req.query["backend"];
|
|
6824
6942
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6825
6943
|
try {
|
|
6826
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6944
|
+
const { fetchModelsWithContext } = await import("./provider-manager-FVIFMUTO.js");
|
|
6827
6945
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6828
6946
|
const models = await fetchModelsWithContext(
|
|
6829
6947
|
url,
|
|
@@ -6894,7 +7012,7 @@ All file and git operations should use this branch.
|
|
|
6894
7012
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6895
7013
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
6896
7014
|
const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
|
|
6897
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7015
|
+
const { OpenAIHttpClient } = await import("./http-client-3MOFAPO6.js");
|
|
6898
7016
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
6899
7017
|
const profile = getModelProfile2(model);
|
|
6900
7018
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -7152,7 +7270,7 @@ All file and git operations should use this branch.
|
|
|
7152
7270
|
});
|
|
7153
7271
|
async function rebuildMcpTools() {
|
|
7154
7272
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
7155
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7273
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-YXOCUUKE.js");
|
|
7156
7274
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7157
7275
|
setMcpTools2(mcpTools);
|
|
7158
7276
|
}
|
|
@@ -7408,13 +7526,13 @@ All file and git operations should use this branch.
|
|
|
7408
7526
|
})
|
|
7409
7527
|
);
|
|
7410
7528
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
7411
|
-
const { getSessionProcesses } = await import("./manager-
|
|
7529
|
+
const { getSessionProcesses } = await import("./manager-UP3XMLKX.js");
|
|
7412
7530
|
const sessionId = req.params.id;
|
|
7413
7531
|
const processes = getSessionProcesses(sessionId);
|
|
7414
7532
|
res.json({ processes });
|
|
7415
7533
|
});
|
|
7416
7534
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
7417
|
-
const { stopProcess } = await import("./manager-
|
|
7535
|
+
const { stopProcess } = await import("./manager-UP3XMLKX.js");
|
|
7418
7536
|
const sessionId = req.params.id;
|
|
7419
7537
|
const processId = req.params.processId;
|
|
7420
7538
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -7559,7 +7677,7 @@ All file and git operations should use this branch.
|
|
|
7559
7677
|
const state = sessionManager.getContextState(sessionId);
|
|
7560
7678
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
7561
7679
|
});
|
|
7562
|
-
const { QueueProcessor } = await import("./processor-
|
|
7680
|
+
const { QueueProcessor } = await import("./processor-WP34IB3C.js");
|
|
7563
7681
|
const queueProcessor = new QueueProcessor({
|
|
7564
7682
|
sessionManager,
|
|
7565
7683
|
providerManager,
|
|
@@ -7601,7 +7719,7 @@ All file and git operations should use this branch.
|
|
|
7601
7719
|
void (async () => {
|
|
7602
7720
|
await devServerManager.stopAll();
|
|
7603
7721
|
await mcpManager.disconnectAll();
|
|
7604
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
7722
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-GF6OI7MR.js");
|
|
7605
7723
|
stopAllInspectProxies();
|
|
7606
7724
|
const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
|
|
7607
7725
|
cleanupAllProcesses();
|
|
@@ -7643,4 +7761,4 @@ export {
|
|
|
7643
7761
|
createServerHandle,
|
|
7644
7762
|
createServer
|
|
7645
7763
|
};
|
|
7646
|
-
//# sourceMappingURL=chunk-
|
|
7764
|
+
//# sourceMappingURL=chunk-OQXG4MS4.js.map
|