openfox 2.0.114 → 2.0.116
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 +43 -0
- package/dist/CHANGELOG.md +43 -0
- package/dist/{ask-ZYPCJKZD.js → ask-UBIRH3SO.js} +2 -2
- package/dist/{auth-YY5PJYSC.js → auth-GTGIGX5X.js} +2 -2
- package/dist/{auto-config-T5GR2N6X.js → auto-config-AAUO4PKW.js} +2 -2
- package/dist/{backend-LVYHLGQJ.js → backend-67OLCS5O.js} +2 -2
- package/dist/{branch.api-XVTYACSH.js → branch.api-UMKSQMSA.js} +2 -2
- package/dist/changelog-FZUE6OSG.js +63 -0
- package/dist/{chat-handler-KWXRSWXZ.js → chat-handler-Z6BEY66U.js} +31 -31
- package/dist/{chunk-2XD65L7M.js → chunk-27NABDXB.js} +2 -2
- package/dist/{chunk-YGJIK3CG.js → chunk-2FCLCUVR.js} +5 -5
- package/dist/{chunk-UTIQ7OO5.js → chunk-3KBRMBTP.js} +2 -2
- package/dist/{chunk-SFZGMB2G.js → chunk-3PG65AXG.js} +18 -3
- package/dist/{chunk-QD7MRMCH.js → chunk-4E52GUXJ.js} +231 -173
- package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
- package/dist/{chunk-K733B5T2.js → chunk-4HV3PDEK.js} +135 -134
- package/dist/{chunk-PBW3YC3G.js → chunk-5PT4UMRR.js} +5 -1
- package/dist/{chunk-NWJLWLKF.js → chunk-6XHDNSA3.js} +11 -11
- package/dist/{chunk-SA34STZ6.js → chunk-AESOGRFK.js} +2 -2
- package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
- package/dist/{chunk-7GWARYQC.js → chunk-BH3BBUGB.js} +24 -22
- package/dist/{chunk-L63Q4JQJ.js → chunk-EQ5CGNOT.js} +3 -3
- package/dist/{chunk-NLO64UE3.js → chunk-EQ7DK2TG.js} +10 -6
- package/dist/{chunk-MUSPWEBB.js → chunk-GZTMCTUS.js} +4 -4
- package/dist/{chunk-HP5CIB66.js → chunk-HD6Y77RO.js} +2 -2
- package/dist/chunk-HNHSUQCN.js +7 -0
- package/dist/{chunk-W77NBJAZ.js → chunk-HYPXL7K5.js} +178 -33
- package/dist/{chunk-OTYAEEX3.js → chunk-HZSKKJHQ.js} +9 -8
- package/dist/{chunk-JP7NM545.js → chunk-JLAR2CMV.js} +2 -2
- package/dist/{chunk-3O77NT4T.js → chunk-KLQEL2DZ.js} +10 -4
- package/dist/{chunk-UPBWEHIL.js → chunk-LNNBLB6G.js} +20 -5
- package/dist/{chunk-OXSTNSCF.js → chunk-LTYL6ZGH.js} +2 -2
- package/dist/{chunk-P5UANBBX.js → chunk-M6X6AIEG.js} +2 -2
- package/dist/{chunk-LXYPMFTH.js → chunk-MKWS7TQH.js} +4 -4
- package/dist/{chunk-SBSUDHL4.js → chunk-O6DU226D.js} +2 -2
- package/dist/{chunk-HV6IALXF.js → chunk-QJWTBVJO.js} +14 -14
- package/dist/{chunk-BZVW77PI.js → chunk-QQVPUZQB.js} +157 -21
- package/dist/{chunk-GUHHUDNL.js → chunk-SQLJRO3J.js} +10 -10
- package/dist/{chunk-JXLRL5JR.js → chunk-TGVDUK4N.js} +7 -7
- package/dist/{chunk-L737Y63F.js → chunk-TOKQ2UVG.js} +2 -2
- package/dist/{chunk-FW4NDUBL.js → chunk-U4HMAYAD.js} +15 -14
- package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
- package/dist/{chunk-VPVLO436.js → chunk-X3XKYGUN.js} +4 -4
- package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
- package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
- package/dist/{chunk-TKKP56QK.js → chunk-ZTOG6LJD.js} +3 -3
- package/dist/cli/dev.js +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/client-KCNTDTIR.js +16 -0
- package/dist/{client-pure-VFZIIK4S.js → client-pure-B5DHEKQJ.js} +3 -3
- package/dist/command-defaults/mark-done.command.md +14 -0
- package/dist/compactor-LAXZLPPA.js +32 -0
- package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
- package/dist/{dynamic-context-MVGOF5V2.js → dynamic-context-YHWFFP53.js} +10 -10
- package/dist/{events-PI7IMPHT.js → events-IVPAMMR5.js} +9 -8
- package/dist/{folding-FO57K4JM.js → folding-RTGU63BW.js} +7 -6
- package/dist/http-client-IPUW2MSW.js +11 -0
- package/dist/inspect-proxy-WPEDMCG7.js +13 -0
- package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
- package/dist/launch-PAVQAWGP.js +52 -0
- package/dist/{manager-66YAEO7K.js → manager-EMLSLMMT.js} +6 -6
- package/dist/{model-overrides-L53PZNZA.js → model-overrides-7F2EOA4U.js} +5 -5
- package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
- package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
- package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
- package/dist/orchestrator-CS3KXLZE.js +63 -0
- package/dist/package.json +5 -2
- package/dist/{path-security-RSEI3YKB.js → path-security-JTCHWYG3.js} +13 -12
- package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
- package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
- package/dist/{platform-WA4GK5BO.js → platform-ECDDYMAR.js} +5 -5
- package/dist/{processor-WDZSFBVO.js → processor-RZD4JRDX.js} +30 -30
- package/dist/profiles-GYHXBWPV.js +10 -0
- package/dist/{project-creator-676WQXVI.js → project-creator-PMQ65NKN.js} +4 -4
- package/dist/{projects-SSBWIYL4.js → projects-NDPNOV6D.js} +6 -4
- package/dist/{protocol-BzHs024-.d.ts → protocol-CfUkCYxF.d.ts} +12 -3
- package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-PLIWRBCF.js → provider-Q7J4UFTS.js} +11 -11
- package/dist/{provider-manager-2QSJTPWS.js → provider-manager-TMBO4DFG.js} +9 -9
- package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
- package/dist/{registry-ZP4TN2IN.js → registry-5QL3BOWN.js} +6 -5
- package/dist/{serve-MZ3BCCWC.js → serve-KR22J37W.js} +36 -36
- package/dist/server/index.d.ts +26 -6
- package/dist/server/index.js +35 -35
- package/dist/server-ESKTIZL5.js +55 -0
- package/dist/service-M7XJHAK4.js +25 -0
- package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
- package/dist/{session-overrides-LXN6W7SA.js → session-overrides-CWBKPHMF.js} +8 -7
- package/dist/{sessions-CHPVUG6H.js → sessions-I7ELDIIP.js} +9 -6
- package/dist/{settings-NEBM3GQX.js → settings-FGXQHKUH.js} +4 -4
- package/dist/shared/index.d.ts +3 -3
- package/dist/shared/index.js +2 -2
- package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
- package/dist/{tasks-TJXG2V3U.js → tasks-X5H5HM4J.js} +12 -12
- package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
- package/dist/{tools-CIM26IFB.js → tools-KBS6X3EN.js} +28 -28
- package/dist/{types-CbggXFvR.d.ts → types-CIVhQMvD.d.ts} +1 -1
- package/dist/{types-CMtHpDWT.d.ts → types-Df7NM9b5.d.ts} +2 -0
- package/dist/{update-UZBBO42X.js → update-TDS6LP5N.js} +4 -4
- package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
- package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
- package/dist/web/assets/index-ChtRS33s.js +324 -0
- package/dist/web/assets/{index-BmILAZrT.css → index-c43YT-4A.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +2 -2
- package/dist/{workspace-2XODU4YJ.js → workspace-IQLLHMYR.js} +5 -5
- package/package.json +5 -2
- package/dist/chunk-NCZRWCJN.js +0 -7
- package/dist/client-EM7ISGUP.js +0 -16
- package/dist/compactor-V3LR7APW.js +0 -31
- package/dist/http-client-33EZ3BLR.js +0 -11
- package/dist/inspect-proxy-NHKQQ2CD.js +0 -13
- package/dist/launch-L5ROVNI3.js +0 -52
- package/dist/orchestrator-XK5K3RPL.js +0 -63
- package/dist/profiles-5J7F4BML.js +0 -10
- package/dist/server-EPXODFMB.js +0 -55
- package/dist/service-54PGIPDQ.js +0 -25
- package/dist/web/assets/index-rZHXkfMq.js +0 -324
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
terminalManager,
|
|
17
17
|
tokenFromPassword,
|
|
18
18
|
verifyPassword
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BH3BBUGB.js";
|
|
20
20
|
import {
|
|
21
21
|
TEMPLATE_VARIABLES
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HYPXL7K5.js";
|
|
23
23
|
import {
|
|
24
24
|
createToolRegistry,
|
|
25
25
|
devServerManager,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
setMcpManagerForTools,
|
|
30
30
|
setMcpTools,
|
|
31
31
|
setNotifyMcpServersChanged
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4HV3PDEK.js";
|
|
33
33
|
import {
|
|
34
34
|
deleteOwnedSkill,
|
|
35
35
|
deleteProjectSkill,
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
setSkillEnabled,
|
|
49
49
|
skillExists,
|
|
50
50
|
updateOwnedSkill
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-2FCLCUVR.js";
|
|
52
52
|
import {
|
|
53
53
|
openFolder
|
|
54
54
|
} from "./chunk-WLJJRX22.js";
|
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
ALWAYS_ALLOWED,
|
|
57
57
|
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
58
58
|
TOP_LEVEL_ONLY_TOOLS
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-27NABDXB.js";
|
|
60
60
|
import {
|
|
61
61
|
createMcpTools
|
|
62
62
|
} from "./chunk-JE7LW7Y6.js";
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
validateRef,
|
|
76
76
|
validateWorkspaceName,
|
|
77
77
|
workspaceExists
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-O6DU226D.js";
|
|
79
79
|
import {
|
|
80
80
|
commandExists,
|
|
81
81
|
deleteCommand,
|
|
@@ -102,11 +102,11 @@ import {
|
|
|
102
102
|
saveWorkflow,
|
|
103
103
|
saveWorkflowToProject,
|
|
104
104
|
workflowExists
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-HZSKKJHQ.js";
|
|
106
106
|
import {
|
|
107
107
|
getSessionDisabledServers,
|
|
108
108
|
setSessionDisabledServers
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-EQ5CGNOT.js";
|
|
110
110
|
import {
|
|
111
111
|
emitAssistantMessageStart,
|
|
112
112
|
emitContextState,
|
|
@@ -123,38 +123,14 @@ import {
|
|
|
123
123
|
getEventStore,
|
|
124
124
|
getSessionState,
|
|
125
125
|
initEventStore
|
|
126
|
-
} from "./chunk-
|
|
127
|
-
import {
|
|
128
|
-
createContextStateMessage,
|
|
129
|
-
toClientSession
|
|
130
|
-
} from "./chunk-I7FY2LTR.js";
|
|
131
|
-
import {
|
|
132
|
-
getPathSeparator,
|
|
133
|
-
isAbsolutePath
|
|
134
|
-
} from "./chunk-SA34STZ6.js";
|
|
135
|
-
import {
|
|
136
|
-
EventEmitter
|
|
137
|
-
} from "./chunk-JURM3RPZ.js";
|
|
138
|
-
import {
|
|
139
|
-
getAgentModelOverride,
|
|
140
|
-
getAgentModelOverrides,
|
|
141
|
-
resolveLLMClientForAgent,
|
|
142
|
-
setAgentModelOverride
|
|
143
|
-
} from "./chunk-JP7NM545.js";
|
|
144
|
-
import {
|
|
145
|
-
getProject,
|
|
146
|
-
getProjectByWorkdir,
|
|
147
|
-
updateProject
|
|
148
|
-
} from "./chunk-SFZGMB2G.js";
|
|
149
|
-
import {
|
|
150
|
-
VERSION
|
|
151
|
-
} from "./chunk-NCZRWCJN.js";
|
|
126
|
+
} from "./chunk-TGVDUK4N.js";
|
|
152
127
|
import {
|
|
153
128
|
clearWorkflowExecution,
|
|
154
129
|
createSession,
|
|
155
130
|
createWorkflowExecution,
|
|
156
131
|
deleteSession,
|
|
157
132
|
getActiveWorkflowExecution,
|
|
133
|
+
getLatestWorkflowExecution,
|
|
158
134
|
getSession,
|
|
159
135
|
getSessionCachedPrompt,
|
|
160
136
|
listHomeSessions,
|
|
@@ -171,7 +147,27 @@ import {
|
|
|
171
147
|
updateSessionRunning,
|
|
172
148
|
updateSessionWorkdir,
|
|
173
149
|
updateWorkflowExecutionStatus
|
|
174
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
151
|
+
import {
|
|
152
|
+
createContextStateMessage,
|
|
153
|
+
toClientSession
|
|
154
|
+
} from "./chunk-4GHLULHB.js";
|
|
155
|
+
import {
|
|
156
|
+
getPathSeparator,
|
|
157
|
+
isAbsolutePath
|
|
158
|
+
} from "./chunk-AESOGRFK.js";
|
|
159
|
+
import {
|
|
160
|
+
EventEmitter
|
|
161
|
+
} from "./chunk-JURM3RPZ.js";
|
|
162
|
+
import {
|
|
163
|
+
getAgentModelOverride,
|
|
164
|
+
getAgentModelOverrides,
|
|
165
|
+
resolveLLMClientForAgent,
|
|
166
|
+
setAgentModelOverride
|
|
167
|
+
} from "./chunk-JLAR2CMV.js";
|
|
168
|
+
import {
|
|
169
|
+
VERSION
|
|
170
|
+
} from "./chunk-HNHSUQCN.js";
|
|
175
171
|
import {
|
|
176
172
|
agentExists,
|
|
177
173
|
deleteAgent,
|
|
@@ -188,20 +184,25 @@ import {
|
|
|
188
184
|
saveAgent,
|
|
189
185
|
saveAgentToProject,
|
|
190
186
|
setRuntimeConfig
|
|
191
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-LNNBLB6G.js";
|
|
192
188
|
import {
|
|
193
189
|
findFileByInternalId,
|
|
194
190
|
pathExists
|
|
195
191
|
} from "./chunk-OSXPQSLW.js";
|
|
192
|
+
import {
|
|
193
|
+
getProject,
|
|
194
|
+
getProjectByWorkdir,
|
|
195
|
+
updateProject
|
|
196
|
+
} from "./chunk-3PG65AXG.js";
|
|
196
197
|
import {
|
|
197
198
|
createProviderManager,
|
|
198
199
|
detectModel,
|
|
199
200
|
getLlmStatus,
|
|
200
201
|
parseDefaultModelSelection
|
|
201
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-GZTMCTUS.js";
|
|
202
203
|
import {
|
|
203
204
|
getModelProfile
|
|
204
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
205
206
|
import {
|
|
206
207
|
getBackendDisplayName
|
|
207
208
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -211,22 +212,22 @@ import {
|
|
|
211
212
|
import {
|
|
212
213
|
SessionNotFoundError,
|
|
213
214
|
WorkspaceInUseError
|
|
214
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-LTYL6ZGH.js";
|
|
215
216
|
import {
|
|
216
217
|
deleteSetting,
|
|
217
218
|
getSetting,
|
|
218
219
|
setSetting
|
|
219
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-HD6Y77RO.js";
|
|
220
221
|
import {
|
|
221
222
|
initDatabase
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-5PT4UMRR.js";
|
|
223
224
|
import {
|
|
224
225
|
logger,
|
|
225
226
|
setLogLevel
|
|
226
227
|
} from "./chunk-K44MW7JJ.js";
|
|
227
228
|
import {
|
|
228
229
|
createServerMessage
|
|
229
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-ZKLE2Q3I.js";
|
|
230
231
|
import {
|
|
231
232
|
getGlobalConfigDir
|
|
232
233
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -2816,6 +2817,16 @@ var SessionManager = class {
|
|
|
2816
2817
|
const session = this.requireSession(sessionId);
|
|
2817
2818
|
return session.workspace ?? session.workdir;
|
|
2818
2819
|
}
|
|
2820
|
+
/**
|
|
2821
|
+
* Get the project root working directory for a session.
|
|
2822
|
+
* Ignores any active workspace — session.workdir is always the project root,
|
|
2823
|
+
* which is where project-scoped .openfox/ content (agents, skills, commands,
|
|
2824
|
+
* workflows) lives and is managed from.
|
|
2825
|
+
*/
|
|
2826
|
+
getProjectWorkdir(sessionId) {
|
|
2827
|
+
const session = this.requireSession(sessionId);
|
|
2828
|
+
return session.workdir;
|
|
2829
|
+
}
|
|
2819
2830
|
// ============================================================================
|
|
2820
2831
|
// Session Lifecycle
|
|
2821
2832
|
// ============================================================================
|
|
@@ -3158,11 +3169,13 @@ var SessionManager = class {
|
|
|
3158
3169
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
3159
3170
|
}
|
|
3160
3171
|
/**
|
|
3161
|
-
* Resume a paused
|
|
3172
|
+
* Resume a paused (waiting) or blocked workflow execution. Flips it back to
|
|
3173
|
+
* 'running' and returns the saved params and step output.
|
|
3162
3174
|
*/
|
|
3163
3175
|
resumeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
3164
|
-
const row =
|
|
3176
|
+
const row = getLatestWorkflowExecution(sessionId);
|
|
3165
3177
|
if (!row || row.id !== executionId) return null;
|
|
3178
|
+
if (row.status !== "waiting" && row.status !== "blocked") return null;
|
|
3166
3179
|
updateWorkflowExecutionStatus(executionId, "running", void 0, void 0, void 0, []);
|
|
3167
3180
|
emitWorkflowExecutionChanged(
|
|
3168
3181
|
sessionId,
|
|
@@ -3268,6 +3281,43 @@ var SessionManager = class {
|
|
|
3268
3281
|
updatedAt: row.updated_at
|
|
3269
3282
|
};
|
|
3270
3283
|
}
|
|
3284
|
+
/**
|
|
3285
|
+
* Latest workflow execution for a session regardless of status, mapped to the
|
|
3286
|
+
* shared type. Used to locate a blocked execution when the user retries its
|
|
3287
|
+
* step — blocked rows are excluded from getActiveWorkflowExecution.
|
|
3288
|
+
*/
|
|
3289
|
+
getLatestWorkflowExecution(sessionId) {
|
|
3290
|
+
const row = getLatestWorkflowExecution(sessionId);
|
|
3291
|
+
if (!row) return null;
|
|
3292
|
+
return {
|
|
3293
|
+
id: row.id,
|
|
3294
|
+
sessionId: row.session_id,
|
|
3295
|
+
workflowId: row.workflow_id,
|
|
3296
|
+
workflowName: row.workflow_name,
|
|
3297
|
+
...row.workflow_color ? { workflowColor: row.workflow_color } : {},
|
|
3298
|
+
status: row.status,
|
|
3299
|
+
...row.current_step_id ? { currentStepId: row.current_step_id } : {},
|
|
3300
|
+
...row.current_step_name ? { currentStepName: row.current_step_name } : {},
|
|
3301
|
+
stepOutput: JSON.parse(row.step_output ?? "{}"),
|
|
3302
|
+
params: JSON.parse(row.params ?? "{}"),
|
|
3303
|
+
...row.sub_group ? { subGroup: row.sub_group } : {},
|
|
3304
|
+
...row.pending_choices ? { pendingChoices: JSON.parse(row.pending_choices) } : {},
|
|
3305
|
+
createdAt: row.created_at,
|
|
3306
|
+
updatedAt: row.updated_at
|
|
3307
|
+
};
|
|
3308
|
+
}
|
|
3309
|
+
/**
|
|
3310
|
+
* The execution a client should render: the active run, or a blocked one
|
|
3311
|
+
* awaiting a user-triggered retry. Completed/cancelled runs are not
|
|
3312
|
+
* surfaced — the UI only acts on running/waiting/blocked.
|
|
3313
|
+
*/
|
|
3314
|
+
getDisplayWorkflowExecution(sessionId) {
|
|
3315
|
+
const active = this.getActiveWorkflowExecution(sessionId);
|
|
3316
|
+
if (active) return active;
|
|
3317
|
+
const latest = this.getLatestWorkflowExecution(sessionId);
|
|
3318
|
+
if (latest && latest.status === "blocked") return latest;
|
|
3319
|
+
return null;
|
|
3320
|
+
}
|
|
3271
3321
|
// ============================================================================
|
|
3272
3322
|
// Session Metadata (DB operations)
|
|
3273
3323
|
// ============================================================================
|
|
@@ -3587,9 +3637,13 @@ var SessionManager = class {
|
|
|
3587
3637
|
/**
|
|
3588
3638
|
* Record that a file was read.
|
|
3589
3639
|
*/
|
|
3590
|
-
recordFileRead(sessionId, filePath, contentHash) {
|
|
3640
|
+
recordFileRead(sessionId, filePath, contentHash, relPath) {
|
|
3591
3641
|
const cache = this.readFilesCache.get(sessionId) ?? {};
|
|
3592
|
-
cache[filePath] = {
|
|
3642
|
+
cache[filePath] = {
|
|
3643
|
+
hash: contentHash,
|
|
3644
|
+
readAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3645
|
+
...relPath ? { relPath } : {}
|
|
3646
|
+
};
|
|
3593
3647
|
this.readFilesCache.set(sessionId, cache);
|
|
3594
3648
|
}
|
|
3595
3649
|
/**
|
|
@@ -3601,12 +3655,13 @@ var SessionManager = class {
|
|
|
3601
3655
|
/**
|
|
3602
3656
|
* Update file hash after write.
|
|
3603
3657
|
*/
|
|
3604
|
-
updateFileHash(sessionId, filePath, contentHash) {
|
|
3658
|
+
updateFileHash(sessionId, filePath, contentHash, relPath) {
|
|
3605
3659
|
const cache = this.readFilesCache.get(sessionId) ?? {};
|
|
3606
3660
|
const existingEntry = cache[filePath];
|
|
3607
3661
|
cache[filePath] = {
|
|
3608
3662
|
hash: contentHash,
|
|
3609
|
-
readAt: existingEntry?.readAt ?? (/* @__PURE__ */ new Date()).toISOString()
|
|
3663
|
+
readAt: existingEntry?.readAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
3664
|
+
...relPath ? { relPath } : {}
|
|
3610
3665
|
};
|
|
3611
3666
|
this.readFilesCache.set(sessionId, cache);
|
|
3612
3667
|
}
|
|
@@ -5321,7 +5376,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
5321
5376
|
try {
|
|
5322
5377
|
const { challenge, completion } = await adapter.beginLogin({ providerId: provider.id });
|
|
5323
5378
|
void completion.then(async ({ credentialRef }) => {
|
|
5324
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
5379
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
5325
5380
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
5326
5381
|
const updatedConfig = updateProvider(globalConfig, provider.id, { credentialRef, authAdapter: adapter.id });
|
|
5327
5382
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -5358,7 +5413,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
5358
5413
|
const ref = provider.credentialRef ?? provider.id;
|
|
5359
5414
|
await adapter.logout(ref);
|
|
5360
5415
|
}
|
|
5361
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5416
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
5362
5417
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
5363
5418
|
const updatedConfig = {
|
|
5364
5419
|
...globalConfig,
|
|
@@ -5858,7 +5913,7 @@ async function createServerHandle(config3) {
|
|
|
5858
5913
|
const mcpManager = new McpManager({
|
|
5859
5914
|
onToolsDiscovered: async (name, tools) => {
|
|
5860
5915
|
try {
|
|
5861
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5916
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
5862
5917
|
const mode = config3.mode ?? "production";
|
|
5863
5918
|
const globalConfig = await loadGlobalConfig(mode, config3.globalConfigPath);
|
|
5864
5919
|
const mcpServers2 = {
|
|
@@ -5892,7 +5947,7 @@ async function createServerHandle(config3) {
|
|
|
5892
5947
|
toolRegistry = createToolRegistry();
|
|
5893
5948
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5894
5949
|
}
|
|
5895
|
-
const { signalMcpReady } = await import("./server-
|
|
5950
|
+
const { signalMcpReady } = await import("./server-ESKTIZL5.js");
|
|
5896
5951
|
signalMcpReady();
|
|
5897
5952
|
});
|
|
5898
5953
|
const app = express();
|
|
@@ -5918,7 +5973,7 @@ async function createServerHandle(config3) {
|
|
|
5918
5973
|
app.get("/api/health", (_req, res) => {
|
|
5919
5974
|
res.json({ status: "ok", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
5920
5975
|
});
|
|
5921
|
-
app.get("/api/changelog", async (
|
|
5976
|
+
app.get("/api/changelog", async (req, res) => {
|
|
5922
5977
|
try {
|
|
5923
5978
|
const fs = await import("fs");
|
|
5924
5979
|
const path = await import("path");
|
|
@@ -5929,7 +5984,9 @@ async function createServerHandle(config3) {
|
|
|
5929
5984
|
changelogPath = path.resolve(dirname8, "../../CHANGELOG.md");
|
|
5930
5985
|
}
|
|
5931
5986
|
const content = fs.readFileSync(changelogPath, "utf-8");
|
|
5932
|
-
|
|
5987
|
+
const since = typeof req.query["since"] === "string" ? req.query["since"] : void 0;
|
|
5988
|
+
const { trimChangelog } = await import("./changelog-FZUE6OSG.js");
|
|
5989
|
+
res.json({ content: since ? trimChangelog(content, since) : content });
|
|
5933
5990
|
} catch {
|
|
5934
5991
|
res.json({ content: "# Changelog\n\nUnable to load changelog." });
|
|
5935
5992
|
}
|
|
@@ -5973,7 +6030,7 @@ async function createServerHandle(config3) {
|
|
|
5973
6030
|
res.json({ tools });
|
|
5974
6031
|
});
|
|
5975
6032
|
app.get("/api/projects", async (_req, res) => {
|
|
5976
|
-
const { listProjects: listProjects2 } = await import("./projects-
|
|
6033
|
+
const { listProjects: listProjects2 } = await import("./projects-NDPNOV6D.js");
|
|
5977
6034
|
const projects = listProjects2();
|
|
5978
6035
|
res.json({ projects });
|
|
5979
6036
|
});
|
|
@@ -5982,7 +6039,7 @@ async function createServerHandle(config3) {
|
|
|
5982
6039
|
if (!name || !workdir) {
|
|
5983
6040
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5984
6041
|
}
|
|
5985
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
6042
|
+
const { createDirectoryWithGit } = await import("./project-creator-PMQ65NKN.js");
|
|
5986
6043
|
try {
|
|
5987
6044
|
const project = await createDirectoryWithGit(name, workdir);
|
|
5988
6045
|
res.status(201).json({ project });
|
|
@@ -6000,7 +6057,7 @@ async function createServerHandle(config3) {
|
|
|
6000
6057
|
if (!targetPath) {
|
|
6001
6058
|
return res.status(400).json({ error: "path is required" });
|
|
6002
6059
|
}
|
|
6003
|
-
const { checkPermissions } = await import("./permissions-
|
|
6060
|
+
const { checkPermissions } = await import("./permissions-UKR524ZB.js");
|
|
6004
6061
|
const result = await checkPermissions(targetPath);
|
|
6005
6062
|
if (result.success) {
|
|
6006
6063
|
res.json(result);
|
|
@@ -6017,7 +6074,7 @@ async function createServerHandle(config3) {
|
|
|
6017
6074
|
if (!["group", "ownership", "join_group", "join_group_and_group"].includes(action)) {
|
|
6018
6075
|
return res.status(400).json({ error: 'action must be "group", "ownership", "join_group", or "join_group_and_group"' });
|
|
6019
6076
|
}
|
|
6020
|
-
const { fixPermissions } = await import("./permissions-
|
|
6077
|
+
const { fixPermissions } = await import("./permissions-UKR524ZB.js");
|
|
6021
6078
|
const result = await fixPermissions(targetPath, action);
|
|
6022
6079
|
if (result.success) {
|
|
6023
6080
|
res.json(result);
|
|
@@ -6027,7 +6084,7 @@ async function createServerHandle(config3) {
|
|
|
6027
6084
|
}
|
|
6028
6085
|
});
|
|
6029
6086
|
app.get("/api/projects/:id", async (req, res) => {
|
|
6030
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6087
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6031
6088
|
const project = getProject2(req.params.id);
|
|
6032
6089
|
if (!project) {
|
|
6033
6090
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6035,13 +6092,13 @@ async function createServerHandle(config3) {
|
|
|
6035
6092
|
res.json({ project });
|
|
6036
6093
|
});
|
|
6037
6094
|
app.get("/api/projects/:id/open-folder", async (req, res) => {
|
|
6038
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6095
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6039
6096
|
const project = getProject2(req.params.id);
|
|
6040
6097
|
if (!project) {
|
|
6041
6098
|
return res.status(404).json({ error: "Project not found" });
|
|
6042
6099
|
}
|
|
6043
6100
|
try {
|
|
6044
|
-
const { openFolder: openFolder2 } = await import("./openFolder-
|
|
6101
|
+
const { openFolder: openFolder2 } = await import("./openFolder-XCMSU3OI.js");
|
|
6045
6102
|
await openFolder2(project.workdir);
|
|
6046
6103
|
res.json({ success: true });
|
|
6047
6104
|
} catch (err) {
|
|
@@ -6049,12 +6106,13 @@ async function createServerHandle(config3) {
|
|
|
6049
6106
|
}
|
|
6050
6107
|
});
|
|
6051
6108
|
app.put("/api/projects/:id", async (req, res) => {
|
|
6052
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
6053
|
-
const { name, customInstructions, dangerLevel } = req.body;
|
|
6109
|
+
const { updateProject: updateProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6110
|
+
const { name, customInstructions, dangerLevel, defaultAgent } = req.body;
|
|
6054
6111
|
const updates = {};
|
|
6055
6112
|
if (name !== void 0) updates.name = name;
|
|
6056
6113
|
if (customInstructions !== void 0) updates.customInstructions = customInstructions;
|
|
6057
6114
|
if (dangerLevel !== void 0) updates.dangerLevel = dangerLevel;
|
|
6115
|
+
if (defaultAgent !== void 0) updates.defaultAgent = defaultAgent;
|
|
6058
6116
|
const updated = updateProject2(req.params.id, updates);
|
|
6059
6117
|
if (!updated) {
|
|
6060
6118
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6062,7 +6120,7 @@ async function createServerHandle(config3) {
|
|
|
6062
6120
|
res.json({ project: updated });
|
|
6063
6121
|
});
|
|
6064
6122
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
6065
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
6123
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-NDPNOV6D.js");
|
|
6066
6124
|
const project = getProject2(req.params.id);
|
|
6067
6125
|
if (!project) {
|
|
6068
6126
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6071,7 +6129,7 @@ async function createServerHandle(config3) {
|
|
|
6071
6129
|
res.json({ success: true });
|
|
6072
6130
|
});
|
|
6073
6131
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
6074
|
-
const { toggleStar } = await import("./projects-
|
|
6132
|
+
const { toggleStar } = await import("./projects-NDPNOV6D.js");
|
|
6075
6133
|
const { isStarred } = req.body;
|
|
6076
6134
|
if (typeof isStarred !== "boolean") {
|
|
6077
6135
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -6085,9 +6143,9 @@ async function createServerHandle(config3) {
|
|
|
6085
6143
|
const sessionFavoriteRouter = express.Router();
|
|
6086
6144
|
registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
|
|
6087
6145
|
app.use("/api", sessionFavoriteRouter);
|
|
6088
|
-
const { createTasksService } = await import("./service-
|
|
6089
|
-
const { registerTaskRoutes } = await import("./tasks-
|
|
6090
|
-
const { setTasksService } = await import("./tools-
|
|
6146
|
+
const { createTasksService } = await import("./service-M7XJHAK4.js");
|
|
6147
|
+
const { registerTaskRoutes } = await import("./tasks-X5H5HM4J.js");
|
|
6148
|
+
const { setTasksService } = await import("./tools-KBS6X3EN.js");
|
|
6091
6149
|
const tasksService = createTasksService({
|
|
6092
6150
|
sessionManager,
|
|
6093
6151
|
config: config3,
|
|
@@ -6100,26 +6158,26 @@ async function createServerHandle(config3) {
|
|
|
6100
6158
|
registerTaskRoutes(tasksRouter, tasksService);
|
|
6101
6159
|
app.use("/api", tasksRouter);
|
|
6102
6160
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
6103
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6161
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6104
6162
|
const project = getProject2(req.params.id);
|
|
6105
6163
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6106
|
-
const { listBranches } = await import("./workspace-
|
|
6164
|
+
const { listBranches } = await import("./workspace-IQLLHMYR.js");
|
|
6107
6165
|
const branches = await listBranches(project.workdir);
|
|
6108
6166
|
res.json({ branches });
|
|
6109
6167
|
});
|
|
6110
6168
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
6111
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6169
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6112
6170
|
const project = getProject2(req.params.id);
|
|
6113
6171
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6114
6172
|
const { branch } = req.body;
|
|
6115
6173
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6116
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
6174
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6117
6175
|
if (!await isGitRepository(project.workdir)) {
|
|
6118
6176
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6119
6177
|
}
|
|
6120
6178
|
try {
|
|
6121
6179
|
await checkoutBranch(project.workdir, branch);
|
|
6122
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6180
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6123
6181
|
const allSessions = sessionManager.listSessions();
|
|
6124
6182
|
for (const s of allSessions) {
|
|
6125
6183
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6133,12 +6191,12 @@ async function createServerHandle(config3) {
|
|
|
6133
6191
|
}
|
|
6134
6192
|
});
|
|
6135
6193
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
6136
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6194
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6137
6195
|
const project = getProject2(req.params.id);
|
|
6138
6196
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6139
6197
|
const { name, sourceBranch } = req.body;
|
|
6140
6198
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6141
|
-
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-
|
|
6199
|
+
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6142
6200
|
if (!await isGitRepository(project.workdir)) {
|
|
6143
6201
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6144
6202
|
}
|
|
@@ -6155,7 +6213,7 @@ async function createServerHandle(config3) {
|
|
|
6155
6213
|
);
|
|
6156
6214
|
}
|
|
6157
6215
|
await createBranch(project.workdir, name, sb);
|
|
6158
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6216
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6159
6217
|
const allSessions = sessionManager.listSessions();
|
|
6160
6218
|
for (const s of allSessions) {
|
|
6161
6219
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6172,7 +6230,7 @@ async function createServerHandle(config3) {
|
|
|
6172
6230
|
const session = sessionManager.getSession(req.params.id);
|
|
6173
6231
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
6174
6232
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6175
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
6233
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-IQLLHMYR.js");
|
|
6176
6234
|
const [branches, defaultBranch] = await Promise.all([
|
|
6177
6235
|
listBranches(effectiveWorkdir),
|
|
6178
6236
|
getDefaultBranch(session.workdir)
|
|
@@ -6186,8 +6244,8 @@ async function createServerHandle(config3) {
|
|
|
6186
6244
|
const { branch } = req.body;
|
|
6187
6245
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6188
6246
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6189
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
6190
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6247
|
+
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-IQLLHMYR.js");
|
|
6248
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6191
6249
|
try {
|
|
6192
6250
|
await validateRef2(effectiveWorkdir, branch);
|
|
6193
6251
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -6229,16 +6287,16 @@ All file and git operations should use this branch.
|
|
|
6229
6287
|
const { name, sourceBranch } = req.body;
|
|
6230
6288
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6231
6289
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6232
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
6233
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6290
|
+
const { validateRef: validateRef2 } = await import("./workspace-IQLLHMYR.js");
|
|
6291
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6234
6292
|
try {
|
|
6235
6293
|
await validateRef2(effectiveWorkdir, name);
|
|
6236
6294
|
if (sourceBranch) {
|
|
6237
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6295
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-IQLLHMYR.js");
|
|
6238
6296
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
6239
6297
|
await createBranch(effectiveWorkdir, name, sb);
|
|
6240
6298
|
} else {
|
|
6241
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6299
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-IQLLHMYR.js");
|
|
6242
6300
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
6243
6301
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
6244
6302
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -6276,17 +6334,17 @@ All file and git operations should use this branch.
|
|
|
6276
6334
|
}
|
|
6277
6335
|
});
|
|
6278
6336
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
6279
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6337
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6280
6338
|
const project = getProject2(req.params.id);
|
|
6281
6339
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6282
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6340
|
+
const { listWorkspaces } = await import("./workspace-IQLLHMYR.js");
|
|
6283
6341
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
6284
6342
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
6285
6343
|
res.json({ workspaces: workspacesList });
|
|
6286
6344
|
});
|
|
6287
6345
|
app.get("/api/sessions", async (req, res) => {
|
|
6288
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6289
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6346
|
+
const { getRecentUserPromptsForSession } = await import("./events-IVPAMMR5.js");
|
|
6347
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-JTCHWYG3.js");
|
|
6290
6348
|
const projectId = req.query["projectId"];
|
|
6291
6349
|
const rawLimit = req.query["limit"];
|
|
6292
6350
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6341,7 +6399,7 @@ All file and git operations should use this branch.
|
|
|
6341
6399
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
6342
6400
|
}
|
|
6343
6401
|
if (disabledServers.length > 0) {
|
|
6344
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6402
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-CWBKPHMF.js");
|
|
6345
6403
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
6346
6404
|
}
|
|
6347
6405
|
} catch {
|
|
@@ -6378,7 +6436,7 @@ All file and git operations should use this branch.
|
|
|
6378
6436
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6379
6437
|
const project = sessionManager.getProject(session.projectId);
|
|
6380
6438
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6381
|
-
const { isGitRepository } = await import("./workspace-
|
|
6439
|
+
const { isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6382
6440
|
if (!await isGitRepository(project.workdir)) {
|
|
6383
6441
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6384
6442
|
}
|
|
@@ -6396,7 +6454,7 @@ All file and git operations should use this branch.
|
|
|
6396
6454
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6397
6455
|
const project = sessionManager.getProject(session.projectId);
|
|
6398
6456
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6399
|
-
const { isGitRepository } = await import("./workspace-
|
|
6457
|
+
const { isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6400
6458
|
if (!await isGitRepository(project.workdir)) {
|
|
6401
6459
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6402
6460
|
}
|
|
@@ -6414,12 +6472,12 @@ All file and git operations should use this branch.
|
|
|
6414
6472
|
}
|
|
6415
6473
|
});
|
|
6416
6474
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6417
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6418
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6419
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6420
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6421
|
-
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-
|
|
6422
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-
|
|
6475
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-IVPAMMR5.js");
|
|
6476
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
|
|
6477
|
+
const { getPendingQuestionsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6478
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6479
|
+
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
|
|
6480
|
+
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6423
6481
|
let session = sessionManager.getSession(req.params.id);
|
|
6424
6482
|
if (!session) {
|
|
6425
6483
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -6440,7 +6498,7 @@ All file and git operations should use this branch.
|
|
|
6440
6498
|
const queueState = sessionManager.getQueueState(req.params.id);
|
|
6441
6499
|
const pendingQuestions = getPendingQuestionsForSession(req.params.id);
|
|
6442
6500
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
6443
|
-
const activeWorkflowExecution = sessionManager.
|
|
6501
|
+
const activeWorkflowExecution = sessionManager.getDisplayWorkflowExecution(req.params.id);
|
|
6444
6502
|
res.json({
|
|
6445
6503
|
session: toClientSession(session),
|
|
6446
6504
|
messages,
|
|
@@ -6458,8 +6516,8 @@ All file and git operations should use this branch.
|
|
|
6458
6516
|
if (!session) {
|
|
6459
6517
|
return res.status(404).json({ error: "Session not found" });
|
|
6460
6518
|
}
|
|
6461
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6462
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6519
|
+
const { stopSessionExecution } = await import("./chat-handler-Z6BEY66U.js");
|
|
6520
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6463
6521
|
sessionManager.clearMessageQueue(sessionId);
|
|
6464
6522
|
stopSessionExecution(sessionId, sessionManager);
|
|
6465
6523
|
abortSession(sessionId);
|
|
@@ -6488,9 +6546,9 @@ All file and git operations should use this branch.
|
|
|
6488
6546
|
res.json({ success: true });
|
|
6489
6547
|
});
|
|
6490
6548
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6491
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6492
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6493
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6549
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
|
|
6550
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6551
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6494
6552
|
const sessionId = req.params.id;
|
|
6495
6553
|
const session = sessionManager.getSession(sessionId);
|
|
6496
6554
|
if (!session) {
|
|
@@ -6525,7 +6583,7 @@ All file and git operations should use this branch.
|
|
|
6525
6583
|
if (!result.success) {
|
|
6526
6584
|
return res.status(500).json({ error: result.error ?? "Failed to set default model" });
|
|
6527
6585
|
}
|
|
6528
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6586
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
6529
6587
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6530
6588
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
|
|
6531
6589
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -6603,11 +6661,11 @@ All file and git operations should use this branch.
|
|
|
6603
6661
|
res.json({ success: true });
|
|
6604
6662
|
});
|
|
6605
6663
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6606
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6607
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6608
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6609
|
-
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-
|
|
6610
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-
|
|
6664
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
|
|
6665
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6666
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6667
|
+
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
|
|
6668
|
+
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6611
6669
|
const sessionId = req.params.id;
|
|
6612
6670
|
const session = sessionManager.getSession(sessionId);
|
|
6613
6671
|
if (!session) {
|
|
@@ -6617,7 +6675,7 @@ All file and git operations should use this branch.
|
|
|
6617
6675
|
if (!mode) {
|
|
6618
6676
|
return res.status(400).json({ error: "mode is required" });
|
|
6619
6677
|
}
|
|
6620
|
-
const allAgents = await loadAllAgentsDefault();
|
|
6678
|
+
const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
|
|
6621
6679
|
const topLevelIds = getTopLevelAgents(allAgents).map((a) => a.metadata.id);
|
|
6622
6680
|
if (!topLevelIds.includes(mode)) {
|
|
6623
6681
|
return res.status(400).json({ error: `Invalid mode. Must be one of: ${topLevelIds.join(", ")}` });
|
|
@@ -6709,7 +6767,7 @@ All file and git operations should use this branch.
|
|
|
6709
6767
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6710
6768
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6711
6769
|
}
|
|
6712
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6770
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-KBS6X3EN.js");
|
|
6713
6771
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6714
6772
|
if (!pendingSessionId) {
|
|
6715
6773
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6721,11 +6779,11 @@ All file and git operations should use this branch.
|
|
|
6721
6779
|
if (!result.found) {
|
|
6722
6780
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6723
6781
|
}
|
|
6724
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6725
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6726
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
6727
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6728
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6782
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-IVPAMMR5.js");
|
|
6783
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
|
|
6784
|
+
const { createSessionStateMessage } = await import("./protocol-HYA5BYVN.js");
|
|
6785
|
+
const { getPendingQuestionsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6786
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6729
6787
|
const eventStore = getEventStore2();
|
|
6730
6788
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6731
6789
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6761,7 +6819,7 @@ All file and git operations should use this branch.
|
|
|
6761
6819
|
if (!skip && typeof answer !== "string") {
|
|
6762
6820
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6763
6821
|
}
|
|
6764
|
-
const { provideAnswer } = await import("./tools-
|
|
6822
|
+
const { provideAnswer } = await import("./tools-KBS6X3EN.js");
|
|
6765
6823
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6766
6824
|
if (!found) {
|
|
6767
6825
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6794,7 +6852,7 @@ All file and git operations should use this branch.
|
|
|
6794
6852
|
if (!session) {
|
|
6795
6853
|
return res.status(404).json({ error: "Session not found" });
|
|
6796
6854
|
}
|
|
6797
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6855
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
6798
6856
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6799
6857
|
return res.json({ success: false, reason: "disabled" });
|
|
6800
6858
|
}
|
|
@@ -6826,7 +6884,7 @@ All file and git operations should use this branch.
|
|
|
6826
6884
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6827
6885
|
model: llmClient.getModel()
|
|
6828
6886
|
};
|
|
6829
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6887
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-CS3KXLZE.js");
|
|
6830
6888
|
runAgentTurn(
|
|
6831
6889
|
{
|
|
6832
6890
|
sessionManager,
|
|
@@ -6864,15 +6922,15 @@ All file and git operations should use this branch.
|
|
|
6864
6922
|
if (!session) {
|
|
6865
6923
|
return res.status(404).json({ error: "Session not found" });
|
|
6866
6924
|
}
|
|
6867
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6868
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6925
|
+
const { stopSessionExecution } = await import("./chat-handler-Z6BEY66U.js");
|
|
6926
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6869
6927
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6870
6928
|
sessionManager.clearMessageQueue(sessionId);
|
|
6871
6929
|
stopSessionExecution(sessionId, sessionManager);
|
|
6872
6930
|
abortSession(sessionId);
|
|
6873
6931
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6874
6932
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6875
|
-
const eventStore = (await import("./events-
|
|
6933
|
+
const eventStore = (await import("./events-IVPAMMR5.js")).getEventStore();
|
|
6876
6934
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6877
6935
|
res.json({ success: true, queuedMessages });
|
|
6878
6936
|
});
|
|
@@ -6886,7 +6944,7 @@ All file and git operations should use this branch.
|
|
|
6886
6944
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6887
6945
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6888
6946
|
}
|
|
6889
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6947
|
+
const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
|
|
6890
6948
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6891
6949
|
res.json({ success: true });
|
|
6892
6950
|
});
|
|
@@ -6906,8 +6964,8 @@ All file and git operations should use this branch.
|
|
|
6906
6964
|
if (attachments !== void 0 && !Array.isArray(attachments)) {
|
|
6907
6965
|
return res.status(400).json({ error: "attachments must be an array if provided" });
|
|
6908
6966
|
}
|
|
6909
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6910
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6967
|
+
const { getEventStore: getEventStore2 } = await import("./events-IVPAMMR5.js");
|
|
6968
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6911
6969
|
const eventStore = getEventStore2();
|
|
6912
6970
|
const events = eventStore.getEvents(sessionId);
|
|
6913
6971
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -6919,7 +6977,7 @@ All file and git operations should use this branch.
|
|
|
6919
6977
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6920
6978
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6921
6979
|
}
|
|
6922
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6980
|
+
const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
|
|
6923
6981
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6924
6982
|
sessionManager.queueMessage(
|
|
6925
6983
|
sessionId,
|
|
@@ -6981,7 +7039,7 @@ All file and git operations should use this branch.
|
|
|
6981
7039
|
res.json({ accepted: true });
|
|
6982
7040
|
});
|
|
6983
7041
|
app.get("/api/settings", async (req, res) => {
|
|
6984
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7042
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
6985
7043
|
const keysParam = req.query["keys"];
|
|
6986
7044
|
if (!keysParam) {
|
|
6987
7045
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -6994,19 +7052,19 @@ All file and git operations should use this branch.
|
|
|
6994
7052
|
res.json(result);
|
|
6995
7053
|
});
|
|
6996
7054
|
app.get("/api/settings/:key", async (req, res) => {
|
|
6997
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7055
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
6998
7056
|
const key = req.params.key;
|
|
6999
7057
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7000
7058
|
res.json({ key, value });
|
|
7001
7059
|
});
|
|
7002
7060
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7003
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7061
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
7004
7062
|
const key = req.params.key;
|
|
7005
7063
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7006
7064
|
res.json({ key, value });
|
|
7007
7065
|
});
|
|
7008
7066
|
app.put("/api/settings/:key", async (req, res) => {
|
|
7009
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
7067
|
+
const { setSetting: setSetting2 } = await import("./settings-FGXQHKUH.js");
|
|
7010
7068
|
const key = req.params.key;
|
|
7011
7069
|
const { value } = req.body;
|
|
7012
7070
|
if (value === void 0) {
|
|
@@ -7033,7 +7091,7 @@ All file and git operations should use this branch.
|
|
|
7033
7091
|
}
|
|
7034
7092
|
});
|
|
7035
7093
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
7036
|
-
const { listAvailableShells } = await import("./platform-
|
|
7094
|
+
const { listAvailableShells } = await import("./platform-ECDDYMAR.js");
|
|
7037
7095
|
res.json({ shells: listAvailableShells() });
|
|
7038
7096
|
});
|
|
7039
7097
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -7042,7 +7100,7 @@ All file and git operations should use this branch.
|
|
|
7042
7100
|
let visionFallback;
|
|
7043
7101
|
let globalWorkdir;
|
|
7044
7102
|
try {
|
|
7045
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
7103
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-TUCHLIWD.js");
|
|
7046
7104
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7047
7105
|
const fallback = getVisionFallback(globalConfig);
|
|
7048
7106
|
if (fallback) {
|
|
@@ -7123,7 +7181,7 @@ All file and git operations should use this branch.
|
|
|
7123
7181
|
}));
|
|
7124
7182
|
}
|
|
7125
7183
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7126
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7184
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
7127
7185
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7128
7186
|
if (!proxyUrl) {
|
|
7129
7187
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7215,7 +7273,7 @@ All file and git operations should use this branch.
|
|
|
7215
7273
|
}
|
|
7216
7274
|
});
|
|
7217
7275
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7218
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7276
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
7219
7277
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7220
7278
|
if (!proxyUrl) {
|
|
7221
7279
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7242,8 +7300,8 @@ All file and git operations should use this branch.
|
|
|
7242
7300
|
const backend = req.query["backend"];
|
|
7243
7301
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7244
7302
|
try {
|
|
7245
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
7246
|
-
const { getModelProfile: getModelProfile2 } = await import("./profiles-
|
|
7303
|
+
const { fetchModelsWithContext } = await import("./provider-manager-TMBO4DFG.js");
|
|
7304
|
+
const { getModelProfile: getModelProfile2 } = await import("./profiles-GYHXBWPV.js");
|
|
7247
7305
|
const models = await fetchModelsWithContext(
|
|
7248
7306
|
url,
|
|
7249
7307
|
apiKey,
|
|
@@ -7278,7 +7336,7 @@ All file and git operations should use this branch.
|
|
|
7278
7336
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7279
7337
|
if (!models?.length) return res.status(400).json({ error: "models is required" });
|
|
7280
7338
|
try {
|
|
7281
|
-
const { autoConfig } = await import("./auto-config-
|
|
7339
|
+
const { autoConfig } = await import("./auto-config-AAUO4PKW.js");
|
|
7282
7340
|
const result = await autoConfig({
|
|
7283
7341
|
url,
|
|
7284
7342
|
...apiKey ? { apiKey } : {},
|
|
@@ -7310,11 +7368,11 @@ All file and git operations should use this branch.
|
|
|
7310
7368
|
});
|
|
7311
7369
|
return res.json({ success: true, message: { content: response2.content }, raw: response2 });
|
|
7312
7370
|
}
|
|
7313
|
-
const { getModelProfile: getModelProfile2 } = await import("./profiles-
|
|
7314
|
-
const { getBackendCapabilities } = await import("./backend-
|
|
7315
|
-
const { buildNonStreamingCreateParams } = await import("./client-pure-
|
|
7316
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7317
|
-
const { ensureVersionPrefix } = await import("./url-utils-
|
|
7371
|
+
const { getModelProfile: getModelProfile2 } = await import("./profiles-GYHXBWPV.js");
|
|
7372
|
+
const { getBackendCapabilities } = await import("./backend-67OLCS5O.js");
|
|
7373
|
+
const { buildNonStreamingCreateParams } = await import("./client-pure-B5DHEKQJ.js");
|
|
7374
|
+
const { OpenAIHttpClient } = await import("./http-client-IPUW2MSW.js");
|
|
7375
|
+
const { ensureVersionPrefix } = await import("./url-utils-C5BM7NF7.js");
|
|
7318
7376
|
const profile = getModelProfile2(model);
|
|
7319
7377
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
7320
7378
|
const modelSettings = {};
|
|
@@ -7383,7 +7441,7 @@ All file and git operations should use this branch.
|
|
|
7383
7441
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
7384
7442
|
}
|
|
7385
7443
|
try {
|
|
7386
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
7444
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
7387
7445
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7388
7446
|
const providerBackend = backend;
|
|
7389
7447
|
const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
|
|
@@ -7424,7 +7482,7 @@ All file and git operations should use this branch.
|
|
|
7424
7482
|
app.post("/api/init/config", async (req, res) => {
|
|
7425
7483
|
const { workdir, visionFallback } = req.body;
|
|
7426
7484
|
try {
|
|
7427
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7485
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7428
7486
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7429
7487
|
const updatedVf = visionFallback ? { ...globalConfig.visionFallback, ...visionFallback } : globalConfig.visionFallback;
|
|
7430
7488
|
const updatedConfig = {
|
|
@@ -7459,7 +7517,7 @@ All file and git operations should use this branch.
|
|
|
7459
7517
|
}
|
|
7460
7518
|
const updates = parsed.data;
|
|
7461
7519
|
try {
|
|
7462
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7520
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7463
7521
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7464
7522
|
const filteredUpdates = Object.fromEntries(Object.entries(updates).filter(([, v]) => v !== void 0));
|
|
7465
7523
|
const updatedConfig = {
|
|
@@ -7501,8 +7559,8 @@ All file and git operations should use this branch.
|
|
|
7501
7559
|
}
|
|
7502
7560
|
const testConfig = parsed.data;
|
|
7503
7561
|
try {
|
|
7504
|
-
const { resolveVisionFallback } = await import("./config-
|
|
7505
|
-
const { loadGlobalConfig } = await import("./config-
|
|
7562
|
+
const { resolveVisionFallback } = await import("./config-TUCHLIWD.js");
|
|
7563
|
+
const { loadGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7506
7564
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7507
7565
|
const filteredTestConfig = Object.fromEntries(Object.entries(testConfig).filter(([, v]) => v !== void 0));
|
|
7508
7566
|
const testVisionFallback = {
|
|
@@ -7553,7 +7611,7 @@ All file and git operations should use this branch.
|
|
|
7553
7611
|
});
|
|
7554
7612
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
7555
7613
|
const { id } = req.params;
|
|
7556
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
7614
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-TUCHLIWD.js");
|
|
7557
7615
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7558
7616
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
7559
7617
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -7565,7 +7623,7 @@ All file and git operations should use this branch.
|
|
|
7565
7623
|
const { id } = req.params;
|
|
7566
7624
|
const { isLocal } = req.body;
|
|
7567
7625
|
try {
|
|
7568
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
7626
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
7569
7627
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7570
7628
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
7571
7629
|
if (!provider) {
|
|
@@ -7597,7 +7655,7 @@ All file and git operations should use this branch.
|
|
|
7597
7655
|
transportAdapter
|
|
7598
7656
|
} = req.body;
|
|
7599
7657
|
try {
|
|
7600
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
7658
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
7601
7659
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7602
7660
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
7603
7661
|
if (!provider) {
|
|
@@ -7638,7 +7696,7 @@ All file and git operations should use this branch.
|
|
|
7638
7696
|
return res.status(400).json({ error: result.error });
|
|
7639
7697
|
}
|
|
7640
7698
|
const llmClient = getLLMClient();
|
|
7641
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
7699
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
7642
7700
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7643
7701
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
7644
7702
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -7664,8 +7722,8 @@ All file and git operations should use this branch.
|
|
|
7664
7722
|
});
|
|
7665
7723
|
});
|
|
7666
7724
|
async function rebuildMcpTools() {
|
|
7667
|
-
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-
|
|
7668
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7725
|
+
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FJAFLDZA.js");
|
|
7726
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-KBS6X3EN.js");
|
|
7669
7727
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7670
7728
|
setMcpTools2(mcpTools);
|
|
7671
7729
|
toolRegistry = createToolRegistry();
|
|
@@ -7740,7 +7798,7 @@ All file and git operations should use this branch.
|
|
|
7740
7798
|
};
|
|
7741
7799
|
await mcpManager.addServer(name, serverCfg);
|
|
7742
7800
|
const server = mcpManager.getServer(name);
|
|
7743
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7801
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7744
7802
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7745
7803
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
|
|
7746
7804
|
await saveGlobalConfig(
|
|
@@ -7801,8 +7859,8 @@ All file and git operations should use this branch.
|
|
|
7801
7859
|
return res.status(400).json({ error: "oauth must be a boolean" });
|
|
7802
7860
|
}
|
|
7803
7861
|
try {
|
|
7804
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7805
|
-
const { applyMcpServerUpdate } = await import("./update-server-
|
|
7862
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7863
|
+
const { applyMcpServerUpdate } = await import("./update-server-SVPV6ZJZ.js");
|
|
7806
7864
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7807
7865
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
7808
7866
|
const patch = {
|
|
@@ -7848,9 +7906,9 @@ All file and git operations should use this branch.
|
|
|
7848
7906
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
7849
7907
|
}
|
|
7850
7908
|
mcpManager.removeServer(name);
|
|
7851
|
-
const { clearMcpOAuthEntry } = await import("./oauth-store-
|
|
7909
|
+
const { clearMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
7852
7910
|
await clearMcpOAuthEntry(name);
|
|
7853
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7911
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7854
7912
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7855
7913
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
|
|
7856
7914
|
delete updatedMcpServers[name];
|
|
@@ -7895,8 +7953,8 @@ All file and git operations should use this branch.
|
|
|
7895
7953
|
}
|
|
7896
7954
|
async function completeMcpOAuth(name, serverUrl, code) {
|
|
7897
7955
|
const { auth } = await import("@modelcontextprotocol/sdk/client/auth.js");
|
|
7898
|
-
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-
|
|
7899
|
-
const { clearMcpOAuthAuthorizationState } = await import("./oauth-store-
|
|
7956
|
+
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-DGBC2YM6.js");
|
|
7957
|
+
const { clearMcpOAuthAuthorizationState } = await import("./oauth-store-KECHUT54.js");
|
|
7900
7958
|
const provider = new McpOAuthProvider2(name, serverUrl);
|
|
7901
7959
|
try {
|
|
7902
7960
|
const result = await auth(provider, { serverUrl, authorizationCode: code });
|
|
@@ -7928,7 +7986,7 @@ All file and git operations should use this branch.
|
|
|
7928
7986
|
}
|
|
7929
7987
|
try {
|
|
7930
7988
|
const { auth } = await import("@modelcontextprotocol/sdk/client/auth.js");
|
|
7931
|
-
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-
|
|
7989
|
+
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-DGBC2YM6.js");
|
|
7932
7990
|
const provider = new McpOAuthProvider2(name, server.config.url);
|
|
7933
7991
|
const result = await auth(provider, { serverUrl: server.config.url });
|
|
7934
7992
|
if (result === "AUTHORIZED") {
|
|
@@ -7950,7 +8008,7 @@ All file and git operations should use this branch.
|
|
|
7950
8008
|
if (!code || !state) {
|
|
7951
8009
|
return res.status(400).type("html").send(oauthCallbackPage("Missing authorization code or state."));
|
|
7952
8010
|
}
|
|
7953
|
-
const { findMcpOAuthEntryByState } = await import("./oauth-store-
|
|
8011
|
+
const { findMcpOAuthEntryByState } = await import("./oauth-store-KECHUT54.js");
|
|
7954
8012
|
const pending = await findMcpOAuthEntryByState(state);
|
|
7955
8013
|
if (!pending) {
|
|
7956
8014
|
return res.status(400).type("html").send(oauthCallbackPage("No pending authorization matches this callback."));
|
|
@@ -7985,7 +8043,7 @@ All file and git operations should use this branch.
|
|
|
7985
8043
|
if (!parsed.code || !parsed.state) {
|
|
7986
8044
|
return res.status(400).json({ error: "Paste the whole callback URL, both code and state are needed" });
|
|
7987
8045
|
}
|
|
7988
|
-
const { readMcpOAuthEntry } = await import("./oauth-store-
|
|
8046
|
+
const { readMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
7989
8047
|
const entry = await readMcpOAuthEntry(name, serverUrl);
|
|
7990
8048
|
if (!entry?.state || entry.state !== parsed.state) {
|
|
7991
8049
|
return res.status(400).json({ error: "This callback does not match the pending authorization" });
|
|
@@ -8002,7 +8060,7 @@ All file and git operations should use this branch.
|
|
|
8002
8060
|
if (!mcpManager.getServer(name)) {
|
|
8003
8061
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
8004
8062
|
}
|
|
8005
|
-
const { clearMcpOAuthEntry } = await import("./oauth-store-
|
|
8063
|
+
const { clearMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
8006
8064
|
await clearMcpOAuthEntry(name);
|
|
8007
8065
|
await applyMcpOAuthResult(name);
|
|
8008
8066
|
res.json({ success: true });
|
|
@@ -8017,7 +8075,7 @@ All file and git operations should use this branch.
|
|
|
8017
8075
|
await mcpManager.setToolEnabled(name, toolName, enabled);
|
|
8018
8076
|
const server = mcpManager.getServer(name);
|
|
8019
8077
|
if (server) {
|
|
8020
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
8078
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
8021
8079
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
8022
8080
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
8023
8081
|
const serverCfg = mcpServers2[name];
|
|
@@ -8046,7 +8104,7 @@ All file and git operations should use this branch.
|
|
|
8046
8104
|
res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
|
|
8047
8105
|
}
|
|
8048
8106
|
});
|
|
8049
|
-
const { listProjects } = await import("./projects-
|
|
8107
|
+
const { listProjects } = await import("./projects-NDPNOV6D.js");
|
|
8050
8108
|
const allProjects = listProjects();
|
|
8051
8109
|
const projectDir = allProjects.find(
|
|
8052
8110
|
(p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
|
|
@@ -8073,13 +8131,13 @@ All file and git operations should use this branch.
|
|
|
8073
8131
|
})
|
|
8074
8132
|
);
|
|
8075
8133
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
8076
|
-
const { getSessionProcesses } = await import("./manager-
|
|
8134
|
+
const { getSessionProcesses } = await import("./manager-EMLSLMMT.js");
|
|
8077
8135
|
const sessionId = req.params.id;
|
|
8078
8136
|
const processes = getSessionProcesses(sessionId);
|
|
8079
8137
|
res.json({ processes });
|
|
8080
8138
|
});
|
|
8081
8139
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
8082
|
-
const { stopProcess } = await import("./manager-
|
|
8140
|
+
const { stopProcess } = await import("./manager-EMLSLMMT.js");
|
|
8083
8141
|
const sessionId = req.params.id;
|
|
8084
8142
|
const processId = req.params.processId;
|
|
8085
8143
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -8093,7 +8151,7 @@ All file and git operations should use this branch.
|
|
|
8093
8151
|
res.status(500).json({ error: err instanceof Error ? err.message : "Failed to stop process" });
|
|
8094
8152
|
}
|
|
8095
8153
|
});
|
|
8096
|
-
const { getCurrentBranch } = await import("./branch.api-
|
|
8154
|
+
const { getCurrentBranch } = await import("./branch.api-UMKSQMSA.js");
|
|
8097
8155
|
app.get("/api/branch", async (req, res) => {
|
|
8098
8156
|
await getCurrentBranch(req, res);
|
|
8099
8157
|
});
|
|
@@ -8219,7 +8277,7 @@ All file and git operations should use this branch.
|
|
|
8219
8277
|
);
|
|
8220
8278
|
const wss = wssExports.wss;
|
|
8221
8279
|
deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
|
|
8222
|
-
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-
|
|
8280
|
+
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-PAVQAWGP.js");
|
|
8223
8281
|
deferTasksLaunchWorkflow = (sessionId, launch) => {
|
|
8224
8282
|
const session = sessionManager.getSession(sessionId);
|
|
8225
8283
|
let llmClient = getLLMClient();
|
|
@@ -8257,7 +8315,7 @@ All file and git operations should use this branch.
|
|
|
8257
8315
|
const state = sessionManager.getContextState(sessionId);
|
|
8258
8316
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
8259
8317
|
});
|
|
8260
|
-
const { QueueProcessor } = await import("./processor-
|
|
8318
|
+
const { QueueProcessor } = await import("./processor-RZD4JRDX.js");
|
|
8261
8319
|
const queueProcessor = new QueueProcessor({
|
|
8262
8320
|
sessionManager,
|
|
8263
8321
|
providerManager,
|
|
@@ -8301,9 +8359,9 @@ All file and git operations should use this branch.
|
|
|
8301
8359
|
void (async () => {
|
|
8302
8360
|
await devServerManager.stopAll();
|
|
8303
8361
|
await mcpManager.disconnectAll();
|
|
8304
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
8362
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-WPEDMCG7.js");
|
|
8305
8363
|
stopAllInspectProxies();
|
|
8306
|
-
const { cleanupAllProcesses } = await import("./store-
|
|
8364
|
+
const { cleanupAllProcesses } = await import("./store-JYPZ2RXB.js");
|
|
8307
8365
|
cleanupAllProcesses();
|
|
8308
8366
|
viteServer?.close();
|
|
8309
8367
|
if (config3.globalConfigPath) {
|
|
@@ -8343,4 +8401,4 @@ export {
|
|
|
8343
8401
|
createServerHandle,
|
|
8344
8402
|
createServer
|
|
8345
8403
|
};
|
|
8346
|
-
//# sourceMappingURL=chunk-
|
|
8404
|
+
//# sourceMappingURL=chunk-4E52GUXJ.js.map
|