openfox 2.0.92 → 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 +35 -0
- package/dist/CHANGELOG.md +35 -0
- package/dist/{chat-handler-PC5BUJGA.js → chat-handler-Z7OCNJWO.js} +24 -24
- package/dist/{chunk-CND2YWIJ.js → chunk-27SDWNKL.js} +12 -4
- package/dist/{chunk-GH5PL3JW.js → chunk-2BCQDYNA.js} +3 -3
- package/dist/{chunk-VJEVCZZA.js → chunk-3WKAKOU4.js} +3 -3
- package/dist/{chunk-CFK34T26.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-DVVRKNFS.js → chunk-DLCMSSG3.js} +32 -17
- package/dist/{chunk-LT4MPTGU.js → chunk-FVV7TZC2.js} +19 -4
- package/dist/{chunk-6OAJNCRY.js → chunk-GLF65XDS.js} +22 -1
- package/dist/{chunk-NO65CC2R.js → chunk-KNRE3DG4.js} +267 -48
- package/dist/{chunk-C56Z4OVW.js → chunk-KU3YUGAN.js} +2 -2
- package/dist/{chunk-AKZGFLMD.js → chunk-LSDJCJWA.js} +4 -4
- package/dist/{chunk-SXHGRPCI.js → chunk-MC3MCMAF.js} +4 -4
- package/dist/{chunk-NLJXZZTB.js → chunk-MRWR3SIT.js} +4 -2
- package/dist/{chunk-Q7CN4JOO.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-Z24V2LEL.js → chunk-OQXG4MS4.js} +235 -92
- package/dist/{chunk-AXFPEGJI.js → chunk-P637C6X3.js} +24 -4
- package/dist/{chunk-6J5IZ2NL.js → chunk-TSHJW7OC.js} +37 -6
- package/dist/{chunk-54Q4TGG6.js → chunk-UEOEA6BB.js} +2 -2
- package/dist/{chunk-FSLCOA4R.js → chunk-V4QTGYXL.js} +6 -6
- package/dist/{chunk-WPACSSBS.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-4IBFA5IF.js → chunk-ZYDPYFRH.js} +10 -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-HW6GBRAG.js → compactor-RSEV7VYH.js} +10 -10
- package/dist/{dynamic-context-TDD3Q43F.js → dynamic-context-C3BWQ5GK.js} +9 -9
- package/dist/{events-ICX5KVET.js → events-SY5B4VED.js} +9 -7
- package/dist/{folding-L2L4OHX6.js → folding-O4OYOTPS.js} +7 -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-56LSHPPK.js → orchestrator-VSUL2C7G.js} +21 -21
- package/dist/package.json +1 -1
- package/dist/{path-security-XENIR7SX.js → path-security-E55IEQHD.js} +10 -10
- package/dist/{platform-UKZ2QC34.js → platform-7KXP3VVA.js} +4 -4
- package/dist/{processor-H6NFFRI2.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-CaSHnORC.d.ts → protocol-C5ROb3nH.d.ts} +13 -4
- package/dist/{protocol-3GNSIGP4.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-OYOC5O4A.js → serve-NZZVFNMA.js} +29 -28
- package/dist/server/index.d.ts +39 -3
- package/dist/server/index.js +28 -27
- 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-DXBIHSMY.js → tools-YXOCUUKE.js} +19 -19
- package/dist/{types-Cw7L4Bze.d.ts → types-D-dEQIrh.d.ts} +1 -1
- package/dist/{types-CHCZiJvw.d.ts → types-DHxO1nqw.d.ts} +25 -2
- package/dist/{update-7ZIRWYSC.js → update-5HWU675H.js} +2 -2
- package/dist/web/assets/{index-mS37wyUs.css → index-BlV1FebL.css} +1 -1
- package/dist/web/assets/index-DxAR7yc9.js +317 -0
- 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-5OGB3MCV.js +0 -7
- package/dist/http-client-E3CV6E5D.js +0 -11
- package/dist/server-H3525HD6.js +0 -45
- package/dist/web/assets/index-CrenD396.js +0 -316
|
@@ -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
|
/**
|
|
@@ -4208,7 +4326,10 @@ var config = {
|
|
|
4208
4326
|
isDefault: isDefaultCommand,
|
|
4209
4327
|
getDefaultIds: getDefaultCommandIds,
|
|
4210
4328
|
validateCreate: validateNameIdPrompt,
|
|
4211
|
-
mapToResponse: (c) =>
|
|
4329
|
+
mapToResponse: (c) => ({
|
|
4330
|
+
...c.metadata,
|
|
4331
|
+
paramNames: [...new Set(Array.from(c.prompt.matchAll(/\{\{(\w+)\}\}/g), (m) => m[1]))]
|
|
4332
|
+
})
|
|
4212
4333
|
};
|
|
4213
4334
|
function createCommandRoutes(configDir, projectDir) {
|
|
4214
4335
|
return createCrudRoutes(config, configDir, projectDir);
|
|
@@ -4348,6 +4469,26 @@ function createDevServerRoutes() {
|
|
|
4348
4469
|
const result = devServerManager.getLogsSlice(workdir, offset, limit);
|
|
4349
4470
|
res.json({ logs: result.logs, total: result.total, offset, limit });
|
|
4350
4471
|
});
|
|
4472
|
+
router.post("/clear-logs", (req, res) => {
|
|
4473
|
+
const workdir = req.query["workdir"];
|
|
4474
|
+
if (!workdir) return res.status(400).json({ error: "workdir required" });
|
|
4475
|
+
try {
|
|
4476
|
+
devServerManager.clearLogs(workdir);
|
|
4477
|
+
res.json({ ok: true });
|
|
4478
|
+
} catch (err) {
|
|
4479
|
+
res.status(500).json({ error: err instanceof Error ? err.message : "Failed to clear logs" });
|
|
4480
|
+
}
|
|
4481
|
+
});
|
|
4482
|
+
router.post("/insert-marker", (req, res) => {
|
|
4483
|
+
const workdir = req.query["workdir"];
|
|
4484
|
+
if (!workdir) return res.status(400).json({ error: "workdir required" });
|
|
4485
|
+
try {
|
|
4486
|
+
devServerManager.insertMarker(workdir);
|
|
4487
|
+
res.json({ ok: true });
|
|
4488
|
+
} catch (err) {
|
|
4489
|
+
res.status(500).json({ error: err instanceof Error ? err.message : "Failed to insert marker" });
|
|
4490
|
+
}
|
|
4491
|
+
});
|
|
4351
4492
|
router.get("/config", async (req, res) => {
|
|
4352
4493
|
const workdir = req.query["workdir"];
|
|
4353
4494
|
if (!workdir) return res.status(400).json({ error: "workdir required" });
|
|
@@ -5552,7 +5693,7 @@ async function createServerHandle(config3) {
|
|
|
5552
5693
|
setMcpTools(mcpTools);
|
|
5553
5694
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5554
5695
|
}
|
|
5555
|
-
const { signalMcpReady } = await import("./server-
|
|
5696
|
+
const { signalMcpReady } = await import("./server-DYJTLAZS.js");
|
|
5556
5697
|
signalMcpReady();
|
|
5557
5698
|
});
|
|
5558
5699
|
const app = express();
|
|
@@ -5630,7 +5771,7 @@ async function createServerHandle(config3) {
|
|
|
5630
5771
|
res.json({ tools });
|
|
5631
5772
|
});
|
|
5632
5773
|
app.get("/api/projects", async (_req, res) => {
|
|
5633
|
-
const { listProjects } = await import("./projects-
|
|
5774
|
+
const { listProjects } = await import("./projects-M5XKC7O6.js");
|
|
5634
5775
|
const projects = listProjects();
|
|
5635
5776
|
res.json({ projects });
|
|
5636
5777
|
});
|
|
@@ -5639,7 +5780,7 @@ async function createServerHandle(config3) {
|
|
|
5639
5780
|
if (!name || !workdir) {
|
|
5640
5781
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5641
5782
|
}
|
|
5642
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
5783
|
+
const { createDirectoryWithGit } = await import("./project-creator-SMWFMIU5.js");
|
|
5643
5784
|
try {
|
|
5644
5785
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5645
5786
|
res.status(201).json({ project });
|
|
@@ -5684,7 +5825,7 @@ async function createServerHandle(config3) {
|
|
|
5684
5825
|
}
|
|
5685
5826
|
});
|
|
5686
5827
|
app.get("/api/projects/:id", async (req, res) => {
|
|
5687
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5828
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5688
5829
|
const project = getProject2(req.params.id);
|
|
5689
5830
|
if (!project) {
|
|
5690
5831
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5692,7 +5833,7 @@ async function createServerHandle(config3) {
|
|
|
5692
5833
|
res.json({ project });
|
|
5693
5834
|
});
|
|
5694
5835
|
app.put("/api/projects/:id", async (req, res) => {
|
|
5695
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
5836
|
+
const { updateProject: updateProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5696
5837
|
const { name, customInstructions, dangerLevel } = req.body;
|
|
5697
5838
|
const updates = {};
|
|
5698
5839
|
if (name !== void 0) updates.name = name;
|
|
@@ -5705,7 +5846,7 @@ async function createServerHandle(config3) {
|
|
|
5705
5846
|
res.json({ project: updated });
|
|
5706
5847
|
});
|
|
5707
5848
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
5708
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
5849
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-M5XKC7O6.js");
|
|
5709
5850
|
const project = getProject2(req.params.id);
|
|
5710
5851
|
if (!project) {
|
|
5711
5852
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -5714,7 +5855,7 @@ async function createServerHandle(config3) {
|
|
|
5714
5855
|
res.json({ success: true });
|
|
5715
5856
|
});
|
|
5716
5857
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
5717
|
-
const { toggleStar } = await import("./projects-
|
|
5858
|
+
const { toggleStar } = await import("./projects-M5XKC7O6.js");
|
|
5718
5859
|
const { isStarred } = req.body;
|
|
5719
5860
|
if (typeof isStarred !== "boolean") {
|
|
5720
5861
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -5726,26 +5867,26 @@ async function createServerHandle(config3) {
|
|
|
5726
5867
|
res.json({ project });
|
|
5727
5868
|
});
|
|
5728
5869
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
5729
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5870
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5730
5871
|
const project = getProject2(req.params.id);
|
|
5731
5872
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5732
|
-
const { listBranches } = await import("./workspace-
|
|
5873
|
+
const { listBranches } = await import("./workspace-IIRKILYL.js");
|
|
5733
5874
|
const branches = await listBranches(project.workdir);
|
|
5734
5875
|
res.json({ branches });
|
|
5735
5876
|
});
|
|
5736
5877
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
5737
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5878
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5738
5879
|
const project = getProject2(req.params.id);
|
|
5739
5880
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5740
5881
|
const { branch } = req.body;
|
|
5741
5882
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5742
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
5883
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
5743
5884
|
if (!await isGitRepository(project.workdir)) {
|
|
5744
5885
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
5745
5886
|
}
|
|
5746
5887
|
try {
|
|
5747
5888
|
await checkoutBranch(project.workdir, branch);
|
|
5748
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5889
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5749
5890
|
const allSessions = sessionManager.listSessions();
|
|
5750
5891
|
for (const s of allSessions) {
|
|
5751
5892
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5759,12 +5900,12 @@ async function createServerHandle(config3) {
|
|
|
5759
5900
|
}
|
|
5760
5901
|
});
|
|
5761
5902
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
5762
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
5903
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5763
5904
|
const project = getProject2(req.params.id);
|
|
5764
5905
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5765
5906
|
const { name, sourceBranch } = req.body;
|
|
5766
5907
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
5767
|
-
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");
|
|
5768
5909
|
if (!await isGitRepository(project.workdir)) {
|
|
5769
5910
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
5770
5911
|
}
|
|
@@ -5781,7 +5922,7 @@ async function createServerHandle(config3) {
|
|
|
5781
5922
|
);
|
|
5782
5923
|
}
|
|
5783
5924
|
await createBranch(project.workdir, name, sb);
|
|
5784
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5925
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5785
5926
|
const allSessions = sessionManager.listSessions();
|
|
5786
5927
|
for (const s of allSessions) {
|
|
5787
5928
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -5798,7 +5939,7 @@ async function createServerHandle(config3) {
|
|
|
5798
5939
|
const session = sessionManager.getSession(req.params.id);
|
|
5799
5940
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
5800
5941
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5801
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
5942
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-IIRKILYL.js");
|
|
5802
5943
|
const [branches, defaultBranch] = await Promise.all([
|
|
5803
5944
|
listBranches(effectiveWorkdir),
|
|
5804
5945
|
getDefaultBranch(session.workdir)
|
|
@@ -5812,8 +5953,8 @@ async function createServerHandle(config3) {
|
|
|
5812
5953
|
const { branch } = req.body;
|
|
5813
5954
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
5814
5955
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5815
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
5816
|
-
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");
|
|
5817
5958
|
try {
|
|
5818
5959
|
await validateRef2(effectiveWorkdir, branch);
|
|
5819
5960
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -5855,16 +5996,16 @@ All file and git operations should use this branch.
|
|
|
5855
5996
|
const { name, sourceBranch } = req.body;
|
|
5856
5997
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
5857
5998
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
5858
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
5859
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
5999
|
+
const { validateRef: validateRef2 } = await import("./workspace-IIRKILYL.js");
|
|
6000
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-BT4PION7.js");
|
|
5860
6001
|
try {
|
|
5861
6002
|
await validateRef2(effectiveWorkdir, name);
|
|
5862
6003
|
if (sourceBranch) {
|
|
5863
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6004
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-IIRKILYL.js");
|
|
5864
6005
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
5865
6006
|
await createBranch(effectiveWorkdir, name, sb);
|
|
5866
6007
|
} else {
|
|
5867
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6008
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-IIRKILYL.js");
|
|
5868
6009
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
5869
6010
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
5870
6011
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -5902,17 +6043,17 @@ All file and git operations should use this branch.
|
|
|
5902
6043
|
}
|
|
5903
6044
|
});
|
|
5904
6045
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
5905
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6046
|
+
const { getProject: getProject2 } = await import("./projects-M5XKC7O6.js");
|
|
5906
6047
|
const project = getProject2(req.params.id);
|
|
5907
6048
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5908
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6049
|
+
const { listWorkspaces } = await import("./workspace-IIRKILYL.js");
|
|
5909
6050
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
5910
6051
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
5911
6052
|
res.json({ workspaces: workspacesList });
|
|
5912
6053
|
});
|
|
5913
6054
|
app.get("/api/sessions", async (req, res) => {
|
|
5914
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5915
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6055
|
+
const { getRecentUserPromptsForSession } = await import("./events-SY5B4VED.js");
|
|
6056
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-E55IEQHD.js");
|
|
5916
6057
|
const projectId = req.query["projectId"];
|
|
5917
6058
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5918
6059
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5958,7 +6099,7 @@ All file and git operations should use this branch.
|
|
|
5958
6099
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
5959
6100
|
}
|
|
5960
6101
|
if (disabledServers.length > 0) {
|
|
5961
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6102
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-QWD4V5KW.js");
|
|
5962
6103
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
5963
6104
|
}
|
|
5964
6105
|
} catch {
|
|
@@ -5995,7 +6136,7 @@ All file and git operations should use this branch.
|
|
|
5995
6136
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
5996
6137
|
const project = sessionManager.getProject(session.projectId);
|
|
5997
6138
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
5998
|
-
const { isGitRepository } = await import("./workspace-
|
|
6139
|
+
const { isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
5999
6140
|
if (!await isGitRepository(project.workdir)) {
|
|
6000
6141
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6001
6142
|
}
|
|
@@ -6013,7 +6154,7 @@ All file and git operations should use this branch.
|
|
|
6013
6154
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6014
6155
|
const project = sessionManager.getProject(session.projectId);
|
|
6015
6156
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6016
|
-
const { isGitRepository } = await import("./workspace-
|
|
6157
|
+
const { isGitRepository } = await import("./workspace-IIRKILYL.js");
|
|
6017
6158
|
if (!await isGitRepository(project.workdir)) {
|
|
6018
6159
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6019
6160
|
}
|
|
@@ -6031,10 +6172,10 @@ All file and git operations should use this branch.
|
|
|
6031
6172
|
}
|
|
6032
6173
|
});
|
|
6033
6174
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6034
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6035
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6036
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6037
|
-
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");
|
|
6038
6179
|
const session = sessionManager.getSession(req.params.id);
|
|
6039
6180
|
if (!session) {
|
|
6040
6181
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -6048,6 +6189,7 @@ All file and git operations should use this branch.
|
|
|
6048
6189
|
const queueState = sessionManager.getQueueState(req.params.id);
|
|
6049
6190
|
const pendingQuestions = getPendingQuestionsForSession(req.params.id);
|
|
6050
6191
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
6192
|
+
const activeWorkflowExecution = sessionManager.getActiveWorkflowExecution(req.params.id);
|
|
6051
6193
|
res.json({
|
|
6052
6194
|
session,
|
|
6053
6195
|
messages,
|
|
@@ -6055,7 +6197,8 @@ All file and git operations should use this branch.
|
|
|
6055
6197
|
contextState,
|
|
6056
6198
|
queueState,
|
|
6057
6199
|
pendingQuestions,
|
|
6058
|
-
pendingConfirmations
|
|
6200
|
+
pendingConfirmations,
|
|
6201
|
+
activeWorkflowExecution
|
|
6059
6202
|
});
|
|
6060
6203
|
});
|
|
6061
6204
|
app.delete("/api/sessions/:id", async (req, res) => {
|
|
@@ -6064,8 +6207,8 @@ All file and git operations should use this branch.
|
|
|
6064
6207
|
if (!session) {
|
|
6065
6208
|
return res.status(404).json({ error: "Session not found" });
|
|
6066
6209
|
}
|
|
6067
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6068
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6210
|
+
const { stopSessionExecution } = await import("./chat-handler-Z7OCNJWO.js");
|
|
6211
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6069
6212
|
sessionManager.clearMessageQueue(sessionId);
|
|
6070
6213
|
stopSessionExecution(sessionId, sessionManager);
|
|
6071
6214
|
abortSession(sessionId);
|
|
@@ -6094,9 +6237,9 @@ All file and git operations should use this branch.
|
|
|
6094
6237
|
res.json({ success: true });
|
|
6095
6238
|
});
|
|
6096
6239
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6097
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6098
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6099
|
-
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");
|
|
6100
6243
|
const sessionId = req.params.id;
|
|
6101
6244
|
const session = sessionManager.getSession(sessionId);
|
|
6102
6245
|
if (!session) {
|
|
@@ -6209,9 +6352,9 @@ All file and git operations should use this branch.
|
|
|
6209
6352
|
res.json({ success: true });
|
|
6210
6353
|
});
|
|
6211
6354
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6212
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6213
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6214
|
-
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");
|
|
6215
6358
|
const sessionId = req.params.id;
|
|
6216
6359
|
const session = sessionManager.getSession(sessionId);
|
|
6217
6360
|
if (!session) {
|
|
@@ -6297,7 +6440,7 @@ All file and git operations should use this branch.
|
|
|
6297
6440
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6298
6441
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6299
6442
|
}
|
|
6300
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6443
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-YXOCUUKE.js");
|
|
6301
6444
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6302
6445
|
if (!pendingSessionId) {
|
|
6303
6446
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6309,11 +6452,11 @@ All file and git operations should use this branch.
|
|
|
6309
6452
|
if (!result.found) {
|
|
6310
6453
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6311
6454
|
}
|
|
6312
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6313
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6314
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
6315
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6316
|
-
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");
|
|
6317
6460
|
const eventStore = getEventStore2();
|
|
6318
6461
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6319
6462
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6349,7 +6492,7 @@ All file and git operations should use this branch.
|
|
|
6349
6492
|
if (!skip && typeof answer !== "string") {
|
|
6350
6493
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6351
6494
|
}
|
|
6352
|
-
const { provideAnswer } = await import("./tools-
|
|
6495
|
+
const { provideAnswer } = await import("./tools-YXOCUUKE.js");
|
|
6353
6496
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6354
6497
|
if (!found) {
|
|
6355
6498
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6382,7 +6525,7 @@ All file and git operations should use this branch.
|
|
|
6382
6525
|
if (!session) {
|
|
6383
6526
|
return res.status(404).json({ error: "Session not found" });
|
|
6384
6527
|
}
|
|
6385
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6528
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
|
|
6386
6529
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6387
6530
|
return res.json({ success: false, reason: "disabled" });
|
|
6388
6531
|
}
|
|
@@ -6414,7 +6557,7 @@ All file and git operations should use this branch.
|
|
|
6414
6557
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6415
6558
|
model: llmClient.getModel()
|
|
6416
6559
|
};
|
|
6417
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6560
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-VSUL2C7G.js");
|
|
6418
6561
|
runAgentTurn(
|
|
6419
6562
|
{
|
|
6420
6563
|
sessionManager,
|
|
@@ -6452,15 +6595,15 @@ All file and git operations should use this branch.
|
|
|
6452
6595
|
if (!session) {
|
|
6453
6596
|
return res.status(404).json({ error: "Session not found" });
|
|
6454
6597
|
}
|
|
6455
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6456
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6598
|
+
const { stopSessionExecution } = await import("./chat-handler-Z7OCNJWO.js");
|
|
6599
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YXOCUUKE.js");
|
|
6457
6600
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6458
6601
|
sessionManager.clearMessageQueue(sessionId);
|
|
6459
6602
|
stopSessionExecution(sessionId, sessionManager);
|
|
6460
6603
|
abortSession(sessionId);
|
|
6461
6604
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6462
6605
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6463
|
-
const eventStore = (await import("./events-
|
|
6606
|
+
const eventStore = (await import("./events-SY5B4VED.js")).getEventStore();
|
|
6464
6607
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6465
6608
|
res.json({ success: true, queuedMessages });
|
|
6466
6609
|
});
|
|
@@ -6474,7 +6617,7 @@ All file and git operations should use this branch.
|
|
|
6474
6617
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6475
6618
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6476
6619
|
}
|
|
6477
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6620
|
+
const { truncateSessionMessages } = await import("./events-SY5B4VED.js");
|
|
6478
6621
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6479
6622
|
res.json({ success: true });
|
|
6480
6623
|
});
|
|
@@ -6491,8 +6634,8 @@ All file and git operations should use this branch.
|
|
|
6491
6634
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
6492
6635
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
6493
6636
|
}
|
|
6494
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6495
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6637
|
+
const { getEventStore: getEventStore2 } = await import("./events-SY5B4VED.js");
|
|
6638
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-O4OYOTPS.js");
|
|
6496
6639
|
const eventStore = getEventStore2();
|
|
6497
6640
|
const events = eventStore.getEvents(sessionId);
|
|
6498
6641
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -6504,7 +6647,7 @@ All file and git operations should use this branch.
|
|
|
6504
6647
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6505
6648
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6506
6649
|
}
|
|
6507
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6650
|
+
const { truncateSessionMessages } = await import("./events-SY5B4VED.js");
|
|
6508
6651
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6509
6652
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
6510
6653
|
res.json({ success: true });
|
|
@@ -6560,7 +6703,7 @@ All file and git operations should use this branch.
|
|
|
6560
6703
|
res.json({ accepted: true });
|
|
6561
6704
|
});
|
|
6562
6705
|
app.get("/api/settings", async (req, res) => {
|
|
6563
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6706
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6564
6707
|
const keysParam = req.query["keys"];
|
|
6565
6708
|
if (!keysParam) {
|
|
6566
6709
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -6573,19 +6716,19 @@ All file and git operations should use this branch.
|
|
|
6573
6716
|
res.json(result);
|
|
6574
6717
|
});
|
|
6575
6718
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6576
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6719
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6577
6720
|
const key = req.params.key;
|
|
6578
6721
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6579
6722
|
res.json({ key, value });
|
|
6580
6723
|
});
|
|
6581
6724
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6582
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
6725
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-2WVGUPYV.js");
|
|
6583
6726
|
const key = req.params.key;
|
|
6584
6727
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
6585
6728
|
res.json({ key, value });
|
|
6586
6729
|
});
|
|
6587
6730
|
app.put("/api/settings/:key", async (req, res) => {
|
|
6588
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
6731
|
+
const { setSetting: setSetting2 } = await import("./settings-2WVGUPYV.js");
|
|
6589
6732
|
const key = req.params.key;
|
|
6590
6733
|
const { value } = req.body;
|
|
6591
6734
|
if (value === void 0) {
|
|
@@ -6612,7 +6755,7 @@ All file and git operations should use this branch.
|
|
|
6612
6755
|
}
|
|
6613
6756
|
});
|
|
6614
6757
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
6615
|
-
const { listAvailableShells } = await import("./platform-
|
|
6758
|
+
const { listAvailableShells } = await import("./platform-7KXP3VVA.js");
|
|
6616
6759
|
res.json({ shells: listAvailableShells() });
|
|
6617
6760
|
});
|
|
6618
6761
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -6771,7 +6914,7 @@ All file and git operations should use this branch.
|
|
|
6771
6914
|
}
|
|
6772
6915
|
});
|
|
6773
6916
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
6774
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6917
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-2WVGUPYV.js");
|
|
6775
6918
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
6776
6919
|
if (!proxyUrl) {
|
|
6777
6920
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -6798,7 +6941,7 @@ All file and git operations should use this branch.
|
|
|
6798
6941
|
const backend = req.query["backend"];
|
|
6799
6942
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6800
6943
|
try {
|
|
6801
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6944
|
+
const { fetchModelsWithContext } = await import("./provider-manager-FVIFMUTO.js");
|
|
6802
6945
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6803
6946
|
const models = await fetchModelsWithContext(
|
|
6804
6947
|
url,
|
|
@@ -6869,7 +7012,7 @@ All file and git operations should use this branch.
|
|
|
6869
7012
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
6870
7013
|
const { getBackendCapabilities } = await import("./backend-P3GHHLHJ.js");
|
|
6871
7014
|
const { buildNonStreamingCreateParams } = await import("./client-pure-5YE5WFJP.js");
|
|
6872
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7015
|
+
const { OpenAIHttpClient } = await import("./http-client-3MOFAPO6.js");
|
|
6873
7016
|
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
6874
7017
|
const profile = getModelProfile2(model);
|
|
6875
7018
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -7127,7 +7270,7 @@ All file and git operations should use this branch.
|
|
|
7127
7270
|
});
|
|
7128
7271
|
async function rebuildMcpTools() {
|
|
7129
7272
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
7130
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7273
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-YXOCUUKE.js");
|
|
7131
7274
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7132
7275
|
setMcpTools2(mcpTools);
|
|
7133
7276
|
}
|
|
@@ -7383,13 +7526,13 @@ All file and git operations should use this branch.
|
|
|
7383
7526
|
})
|
|
7384
7527
|
);
|
|
7385
7528
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
7386
|
-
const { getSessionProcesses } = await import("./manager-
|
|
7529
|
+
const { getSessionProcesses } = await import("./manager-UP3XMLKX.js");
|
|
7387
7530
|
const sessionId = req.params.id;
|
|
7388
7531
|
const processes = getSessionProcesses(sessionId);
|
|
7389
7532
|
res.json({ processes });
|
|
7390
7533
|
});
|
|
7391
7534
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
7392
|
-
const { stopProcess } = await import("./manager-
|
|
7535
|
+
const { stopProcess } = await import("./manager-UP3XMLKX.js");
|
|
7393
7536
|
const sessionId = req.params.id;
|
|
7394
7537
|
const processId = req.params.processId;
|
|
7395
7538
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -7534,7 +7677,7 @@ All file and git operations should use this branch.
|
|
|
7534
7677
|
const state = sessionManager.getContextState(sessionId);
|
|
7535
7678
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
7536
7679
|
});
|
|
7537
|
-
const { QueueProcessor } = await import("./processor-
|
|
7680
|
+
const { QueueProcessor } = await import("./processor-WP34IB3C.js");
|
|
7538
7681
|
const queueProcessor = new QueueProcessor({
|
|
7539
7682
|
sessionManager,
|
|
7540
7683
|
providerManager,
|
|
@@ -7576,7 +7719,7 @@ All file and git operations should use this branch.
|
|
|
7576
7719
|
void (async () => {
|
|
7577
7720
|
await devServerManager.stopAll();
|
|
7578
7721
|
await mcpManager.disconnectAll();
|
|
7579
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
7722
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-GF6OI7MR.js");
|
|
7580
7723
|
stopAllInspectProxies();
|
|
7581
7724
|
const { cleanupAllProcesses } = await import("./store-SARB6V2N.js");
|
|
7582
7725
|
cleanupAllProcesses();
|
|
@@ -7618,4 +7761,4 @@ export {
|
|
|
7618
7761
|
createServerHandle,
|
|
7619
7762
|
createServer
|
|
7620
7763
|
};
|
|
7621
|
-
//# sourceMappingURL=chunk-
|
|
7764
|
+
//# sourceMappingURL=chunk-OQXG4MS4.js.map
|