openfox 2.0.122 → 2.0.124
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 +27 -0
- package/dist/CHANGELOG.md +27 -0
- package/dist/{auto-config-YXNCBYEY.js → auto-config-454YE6KC.js} +24 -17
- package/dist/{chat-handler-JQUVSZT3.js → chat-handler-N43TBYLV.js} +29 -28
- package/dist/{chunk-DIALH34K.js → chunk-3B232XG4.js} +2 -2
- package/dist/{chunk-RMOKNQAS.js → chunk-3NMLSANH.js} +2 -2
- package/dist/{chunk-22D7ZR2X.js → chunk-57UCBFBD.js} +50 -37
- package/dist/{chunk-SCP5KBNB.js → chunk-5CCM655F.js} +149 -63
- package/dist/{chunk-EZ67GBEO.js → chunk-66MG44TF.js} +2 -2
- package/dist/{chunk-YBOU4ZFD.js → chunk-7YP4O4XE.js} +3 -3
- package/dist/{chunk-UJRWYZHM.js → chunk-A6EZBX62.js} +59 -23
- package/dist/{chunk-SLW3KKPP.js → chunk-AQBRI7TM.js} +21 -8
- package/dist/{chunk-OXANSWVZ.js → chunk-EHFIUXWZ.js} +2 -2
- package/dist/{chunk-AIXVERRI.js → chunk-FAL4WO4V.js} +6 -6
- package/dist/{chunk-Y7FGHKBW.js → chunk-GIJUWPRQ.js} +2 -2
- package/dist/chunk-ISE55FOR.js +89 -0
- package/dist/{chunk-6A2VIV36.js → chunk-JEZN37KV.js} +3 -3
- package/dist/{chunk-2N7KFNMY.js → chunk-KBESUA3W.js} +3 -3
- package/dist/{chunk-5A4YN6I7.js → chunk-KD4W3I6C.js} +112 -33
- package/dist/{chunk-UOEAKQBH.js → chunk-KGFERMCV.js} +15 -15
- package/dist/{chunk-FGVMRFDW.js → chunk-N2Q3KYWM.js} +2 -2
- package/dist/{chunk-NYQKSKDB.js → chunk-OYBUJIC3.js} +9 -1
- package/dist/{chunk-KDC4QHE7.js → chunk-QJNBQCAF.js} +22 -18
- package/dist/{chunk-I22B6KWV.js → chunk-RV5G7QQU.js} +3 -3
- package/dist/{chunk-ZT7YTM2U.js → chunk-RXLAFEZB.js} +4 -4
- package/dist/chunk-SBADOWVC.js +7 -0
- package/dist/{chunk-J77SLE3M.js → chunk-SYTEO5LA.js} +3 -2
- package/dist/{chunk-STYGFTEB.js → chunk-UGEFD67O.js} +6 -6
- package/dist/{chunk-POTCPZJF.js → chunk-VPRB5FNR.js} +2 -2
- package/dist/{chunk-WIZUASFY.js → chunk-VUBFPRKT.js} +278 -142
- package/dist/{chunk-YDDBPKVP.js → chunk-W4SM4FFZ.js} +15 -15
- package/dist/{chunk-J3IJJ55E.js → chunk-YJD5A375.js} +7 -7
- package/dist/{chunk-LSEHJ2WI.js → chunk-ZIL6VKLU.js} +3 -3
- package/dist/{chunk-LWXLNE6M.js → chunk-ZIYETXOW.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-JKPDMJ7S.js → client-XHJHOFMU.js} +5 -5
- package/dist/{compactor-MKD3CAFM.js → compactor-VTATJTPN.js} +12 -12
- package/dist/{dynamic-context-IWFD7U3D.js → dynamic-context-KTQCAPTK.js} +9 -9
- package/dist/{events-6P4TDTSD.js → events-GMHRX4LF.js} +8 -8
- package/dist/{folding-3LA2WX2B.js → folding-7K2GRPF4.js} +6 -6
- package/dist/http-client-N4ASJEKJ.js +11 -0
- package/dist/{inspect-proxy-IDLUAQH5.js → inspect-proxy-UKPU3Z64.js} +4 -4
- package/dist/launch-Z5D5YFRJ.js +53 -0
- package/dist/{manager-NFKTUR64.js → manager-NOKJQTTF.js} +5 -5
- package/dist/model-catalog-ZLOWTQA7.js +14 -0
- package/dist/{orchestrator-PEXLQK3T.js → orchestrator-BQBBO4US.js} +31 -30
- package/dist/package.json +1 -1
- package/dist/{path-security-JUF56IB6.js → path-security-YTPZ35SL.js} +14 -12
- package/dist/{platform-FM57ZJHA.js → platform-EMKWQTZX.js} +4 -4
- package/dist/{processor-2GEVRLJP.js → processor-WTRVYXAO.js} +39 -35
- package/dist/{project-creator-J4ITWDZI.js → project-creator-JF3YVQAH.js} +3 -3
- package/dist/{projects-FHRTSV6N.js → projects-TPSLCJP2.js} +3 -3
- package/dist/{protocol-BLin669D.d.ts → protocol-DCMH9Ufp.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-TAFJCWVP.js → provider-LICG53GG.js} +7 -6
- package/dist/{provider-manager-EDJN6ARI.js → provider-manager-3QC2MSSR.js} +7 -6
- package/dist/{registry-37GL3DAP.js → registry-Z4GVYFTV.js} +5 -5
- package/dist/{serve-3BPQGWYE.js → serve-75G5Z7UQ.js} +34 -33
- package/dist/server/index.d.ts +27 -6
- package/dist/server/index.js +31 -30
- package/dist/server-N3VATHIA.js +56 -0
- package/dist/{service-2IOCVEXQ.js → service-OURGS2SI.js} +10 -9
- package/dist/{session-overrides-EOKSZO2X.js → session-overrides-4WAD3X5Q.js} +7 -7
- package/dist/{sessions-XFNU4DZ6.js → sessions-D7VRCHQY.js} +8 -6
- package/dist/{settings-SYYDPV43.js → settings-VOWWO4VG.js} +3 -3
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tasks-G7ACMQM2.js → tasks-4SOLTX6A.js} +11 -10
- package/dist/{tools-IKMNLLAY.js → tools-G44LBKD4.js} +24 -23
- package/dist/{types-B5_9KtfJ.d.ts → types-Cr4EgGwK.d.ts} +1 -1
- package/dist/{types-DeQIEC1U.d.ts → types-PAKlAzp9.d.ts} +16 -0
- package/dist/{update-QX6IIUKB.js → update-R2TEHD7V.js} +2 -2
- package/dist/web/assets/{index-D9sfxcRH.css → index-DFMllFkv.css} +1 -1
- package/dist/web/assets/index-GZTGHRRr.js +324 -0
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/{workspace-ZNZFEONU.js → workspace-J3JEGF6U.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-VC3YCHDO.js +0 -7
- package/dist/http-client-IKOARXI7.js +0 -11
- package/dist/launch-FOUIDMGW.js +0 -52
- package/dist/server-HPIR55OH.js +0 -55
- package/dist/web/assets/index-CJuw9bwD.js +0 -324
|
@@ -16,13 +16,10 @@ import {
|
|
|
16
16
|
terminalManager,
|
|
17
17
|
tokenFromPassword,
|
|
18
18
|
verifyPassword
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-57UCBFBD.js";
|
|
20
20
|
import {
|
|
21
21
|
TEMPLATE_VARIABLES
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import {
|
|
24
|
-
openFolder
|
|
25
|
-
} from "./chunk-WLJJRX22.js";
|
|
22
|
+
} from "./chunk-KGFERMCV.js";
|
|
26
23
|
import {
|
|
27
24
|
createToolRegistry,
|
|
28
25
|
devServerManager,
|
|
@@ -36,7 +33,7 @@ import {
|
|
|
36
33
|
setMcpManagerForTools,
|
|
37
34
|
setMcpTools,
|
|
38
35
|
setNotifyMcpServersChanged
|
|
39
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5CCM655F.js";
|
|
40
37
|
import {
|
|
41
38
|
deleteOwnedSkill,
|
|
42
39
|
deleteProjectSkill,
|
|
@@ -55,7 +52,15 @@ import {
|
|
|
55
52
|
setSkillEnabled,
|
|
56
53
|
skillExists,
|
|
57
54
|
updateOwnedSkill
|
|
58
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ZIL6VKLU.js";
|
|
56
|
+
import {
|
|
57
|
+
openFolder
|
|
58
|
+
} from "./chunk-WLJJRX22.js";
|
|
59
|
+
import {
|
|
60
|
+
ALWAYS_ALLOWED,
|
|
61
|
+
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
62
|
+
TOP_LEVEL_ONLY_TOOLS
|
|
63
|
+
} from "./chunk-GIJUWPRQ.js";
|
|
59
64
|
import {
|
|
60
65
|
createMcpTools
|
|
61
66
|
} from "./chunk-JE7LW7Y6.js";
|
|
@@ -74,7 +79,7 @@ import {
|
|
|
74
79
|
validateRef,
|
|
75
80
|
validateWorkspaceName,
|
|
76
81
|
workspaceExists
|
|
77
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-3NMLSANH.js";
|
|
78
83
|
import {
|
|
79
84
|
commandExists,
|
|
80
85
|
deleteCommand,
|
|
@@ -101,23 +106,11 @@ import {
|
|
|
101
106
|
saveWorkflow,
|
|
102
107
|
saveWorkflowToProject,
|
|
103
108
|
workflowExists
|
|
104
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-UGEFD67O.js";
|
|
105
110
|
import {
|
|
106
111
|
getSessionDisabledServers,
|
|
107
112
|
setSessionDisabledServers
|
|
108
|
-
} from "./chunk-
|
|
109
|
-
import {
|
|
110
|
-
createContextStateMessage,
|
|
111
|
-
toClientSession
|
|
112
|
-
} from "./chunk-XAAEP5XM.js";
|
|
113
|
-
import {
|
|
114
|
-
EventEmitter
|
|
115
|
-
} from "./chunk-JURM3RPZ.js";
|
|
116
|
-
import {
|
|
117
|
-
ALWAYS_ALLOWED,
|
|
118
|
-
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
119
|
-
TOP_LEVEL_ONLY_TOOLS
|
|
120
|
-
} from "./chunk-Y7FGHKBW.js";
|
|
113
|
+
} from "./chunk-7YP4O4XE.js";
|
|
121
114
|
import {
|
|
122
115
|
emitAssistantMessageStart,
|
|
123
116
|
emitContextState,
|
|
@@ -134,7 +127,7 @@ import {
|
|
|
134
127
|
getEventStore,
|
|
135
128
|
getSessionState,
|
|
136
129
|
initEventStore
|
|
137
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-YJD5A375.js";
|
|
138
131
|
import {
|
|
139
132
|
clearWorkflowExecution,
|
|
140
133
|
createSession,
|
|
@@ -154,19 +147,33 @@ import {
|
|
|
154
147
|
updateSessionDangerLevel,
|
|
155
148
|
updateSessionMessageCount,
|
|
156
149
|
updateSessionMetadata,
|
|
150
|
+
updateSessionPinnedEffort,
|
|
157
151
|
updateSessionProvider,
|
|
158
152
|
updateSessionProviderActive,
|
|
159
153
|
updateSessionRunning,
|
|
160
154
|
updateSessionWorkdir,
|
|
161
155
|
updateWorkflowExecutionStatus
|
|
162
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-AQBRI7TM.js";
|
|
157
|
+
import {
|
|
158
|
+
createContextStateMessage,
|
|
159
|
+
toClientSession
|
|
160
|
+
} from "./chunk-XAAEP5XM.js";
|
|
163
161
|
import {
|
|
164
162
|
getPathSeparator,
|
|
165
163
|
isAbsolutePath
|
|
166
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-66MG44TF.js";
|
|
165
|
+
import {
|
|
166
|
+
EventEmitter
|
|
167
|
+
} from "./chunk-JURM3RPZ.js";
|
|
168
|
+
import {
|
|
169
|
+
createProviderManager,
|
|
170
|
+
detectModel,
|
|
171
|
+
getLlmStatus,
|
|
172
|
+
parseDefaultModelSelection
|
|
173
|
+
} from "./chunk-A6EZBX62.js";
|
|
167
174
|
import {
|
|
168
175
|
VERSION
|
|
169
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-SBADOWVC.js";
|
|
170
177
|
import {
|
|
171
178
|
agentExists,
|
|
172
179
|
deleteAgent,
|
|
@@ -183,7 +190,7 @@ import {
|
|
|
183
190
|
saveAgent,
|
|
184
191
|
saveAgentToProject,
|
|
185
192
|
setRuntimeConfig
|
|
186
|
-
} from "./chunk-
|
|
193
|
+
} from "./chunk-KBESUA3W.js";
|
|
187
194
|
import {
|
|
188
195
|
findFileByInternalId,
|
|
189
196
|
pathExists
|
|
@@ -192,13 +199,7 @@ import {
|
|
|
192
199
|
getProject,
|
|
193
200
|
getProjectByWorkdir,
|
|
194
201
|
updateProject
|
|
195
|
-
} from "./chunk-
|
|
196
|
-
import {
|
|
197
|
-
createProviderManager,
|
|
198
|
-
detectModel,
|
|
199
|
-
getLlmStatus,
|
|
200
|
-
parseDefaultModelSelection
|
|
201
|
-
} from "./chunk-UJRWYZHM.js";
|
|
202
|
+
} from "./chunk-3B232XG4.js";
|
|
202
203
|
import {
|
|
203
204
|
getModelProfile
|
|
204
205
|
} from "./chunk-GJL3QSMP.js";
|
|
@@ -211,15 +212,18 @@ import {
|
|
|
211
212
|
import {
|
|
212
213
|
SessionNotFoundError,
|
|
213
214
|
WorkspaceInUseError
|
|
214
|
-
} from "./chunk-
|
|
215
|
+
} from "./chunk-VPRB5FNR.js";
|
|
215
216
|
import {
|
|
216
217
|
deleteSetting,
|
|
217
218
|
getSetting,
|
|
218
219
|
setSetting
|
|
219
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-N2Q3KYWM.js";
|
|
220
221
|
import {
|
|
221
222
|
initDatabase
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-OYBUJIC3.js";
|
|
224
|
+
import {
|
|
225
|
+
isReasoningEffortValue
|
|
226
|
+
} from "./chunk-ISE55FOR.js";
|
|
223
227
|
import {
|
|
224
228
|
logger,
|
|
225
229
|
setLogLevel
|
|
@@ -2766,13 +2770,17 @@ var SessionManager = class {
|
|
|
2766
2770
|
* client for that provider+model. Falls back to the global client if no
|
|
2767
2771
|
* override is set or the provider no longer exists.
|
|
2768
2772
|
*
|
|
2773
|
+
* A session-pinned effort ("Keep current reasoning effort") wins over the
|
|
2774
|
+
* override's own effort, mirroring resolveEffectiveProviderModel.
|
|
2775
|
+
*
|
|
2769
2776
|
* @param preferredFallback - When provided, used as fallback instead of
|
|
2770
2777
|
* providerManager.getLLMClient(). This is important in mock/test mode
|
|
2771
2778
|
* where the caller already has a mock client that should be preserved.
|
|
2772
2779
|
*/
|
|
2773
|
-
createClientForAgent(agentId, preferredFallback) {
|
|
2780
|
+
createClientForAgent(sessionId, agentId, preferredFallback) {
|
|
2774
2781
|
const fallback = preferredFallback ?? this.providerManager.getLLMClient();
|
|
2775
|
-
const
|
|
2782
|
+
const pinnedEffort = getSession(sessionId)?.providerPinnedEffort ?? void 0;
|
|
2783
|
+
const resolved = resolveLLMClientForAgent(agentId, fallback, this.providerManager, pinnedEffort);
|
|
2776
2784
|
if (resolved.warning) {
|
|
2777
2785
|
logger.warn("Agent model override unavailable, falling back", {
|
|
2778
2786
|
agentId,
|
|
@@ -2790,24 +2798,50 @@ var SessionManager = class {
|
|
|
2790
2798
|
* into it. The global default comes from config (pure), never from the provider
|
|
2791
2799
|
* manager's active state, so a stale override never lingers.
|
|
2792
2800
|
*
|
|
2801
|
+
* The reasoning effort follows the same source: the agent override's effort,
|
|
2802
|
+
* the session pick's effort, or undefined (falls back to the model default).
|
|
2803
|
+
* A session-pinned effort ("Keep current reasoning effort" on an agent/workflow
|
|
2804
|
+
* switch) overrides the effort of agent overrides and session-stored values
|
|
2805
|
+
* WITHOUT replacing the provider/model.
|
|
2806
|
+
*
|
|
2793
2807
|
* When `agentId` is omitted, the current session mode's agent override applies.
|
|
2794
2808
|
*/
|
|
2795
2809
|
resolveEffectiveProviderModel(sessionId, agentId) {
|
|
2796
2810
|
const dbSession = getSession(sessionId);
|
|
2811
|
+
const pinnedEffort = dbSession?.providerPinnedEffort ?? void 0;
|
|
2797
2812
|
if (dbSession?.providerManual && dbSession?.providerManualActive && dbSession.providerId && dbSession.providerModel) {
|
|
2798
|
-
|
|
2813
|
+
const effort = pinnedEffort ?? dbSession.providerReasoningEffort;
|
|
2814
|
+
return {
|
|
2815
|
+
providerId: dbSession.providerId,
|
|
2816
|
+
model: dbSession.providerModel,
|
|
2817
|
+
...effort ? { reasoningEffort: effort } : {}
|
|
2818
|
+
};
|
|
2799
2819
|
}
|
|
2800
2820
|
const mode = agentId ?? dbSession?.mode ?? void 0;
|
|
2801
2821
|
const override = mode ? getAgentModelOverride(mode) : void 0;
|
|
2802
2822
|
if (override) {
|
|
2803
|
-
|
|
2823
|
+
const effort = pinnedEffort ?? override.reasoningEffort;
|
|
2824
|
+
return {
|
|
2825
|
+
providerId: override.providerId,
|
|
2826
|
+
model: override.model,
|
|
2827
|
+
...effort ? { reasoningEffort: effort } : {}
|
|
2828
|
+
};
|
|
2804
2829
|
}
|
|
2805
2830
|
if (dbSession?.providerId && dbSession?.providerModel) {
|
|
2806
|
-
|
|
2831
|
+
const effort = pinnedEffort ?? dbSession.providerReasoningEffort;
|
|
2832
|
+
return {
|
|
2833
|
+
providerId: dbSession.providerId,
|
|
2834
|
+
model: dbSession.providerModel,
|
|
2835
|
+
...effort ? { reasoningEffort: effort } : {}
|
|
2836
|
+
};
|
|
2807
2837
|
}
|
|
2808
2838
|
const { providerId, model } = parseDefaultModelSelection(this.providerManager.getDefaultModelSelection());
|
|
2809
2839
|
if (providerId && model) {
|
|
2810
|
-
return {
|
|
2840
|
+
return {
|
|
2841
|
+
providerId,
|
|
2842
|
+
model,
|
|
2843
|
+
...pinnedEffort ? { reasoningEffort: pinnedEffort } : {}
|
|
2844
|
+
};
|
|
2811
2845
|
}
|
|
2812
2846
|
return { providerId: null, model: null };
|
|
2813
2847
|
}
|
|
@@ -3158,13 +3192,31 @@ var SessionManager = class {
|
|
|
3158
3192
|
/**
|
|
3159
3193
|
* Set session provider/model. Updates DB directly.
|
|
3160
3194
|
*/
|
|
3161
|
-
setSessionProvider(sessionId, providerId, providerModel, providerManual) {
|
|
3162
|
-
logger.debug("Setting session provider", { sessionId, providerId, providerModel });
|
|
3163
|
-
updateSessionProvider(sessionId, providerId, providerModel, providerManual);
|
|
3195
|
+
setSessionProvider(sessionId, providerId, providerModel, providerManual, reasoningEffort) {
|
|
3196
|
+
logger.debug("Setting session provider", { sessionId, providerId, providerModel, reasoningEffort });
|
|
3197
|
+
updateSessionProvider(sessionId, providerId, providerModel, providerManual, reasoningEffort);
|
|
3198
|
+
if (providerId === null || providerManual === true) {
|
|
3199
|
+
this.clearSessionPinnedEffort(sessionId);
|
|
3200
|
+
}
|
|
3201
|
+
const updatedSession = this.requireSession(sessionId);
|
|
3202
|
+
this.emit({ type: "session_updated", session: updatedSession });
|
|
3203
|
+
return updatedSession;
|
|
3204
|
+
}
|
|
3205
|
+
/**
|
|
3206
|
+
* Pin a reasoning effort for the session ("Keep current reasoning effort" on an
|
|
3207
|
+
* agent/workflow switch). Overrides agent override efforts without touching the
|
|
3208
|
+
* provider/model resolution. Passing null clears the pin.
|
|
3209
|
+
*/
|
|
3210
|
+
setSessionPinnedEffort(sessionId, effort) {
|
|
3211
|
+
logger.debug("Setting session pinned effort", { sessionId, effort });
|
|
3212
|
+
updateSessionPinnedEffort(sessionId, effort);
|
|
3164
3213
|
const updatedSession = this.requireSession(sessionId);
|
|
3165
3214
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
3166
3215
|
return updatedSession;
|
|
3167
3216
|
}
|
|
3217
|
+
clearSessionPinnedEffort(sessionId) {
|
|
3218
|
+
updateSessionPinnedEffort(sessionId, null);
|
|
3219
|
+
}
|
|
3168
3220
|
/**
|
|
3169
3221
|
* Toggle whether the manual pick is currently active (does NOT emit — used as
|
|
3170
3222
|
* part of larger operations such as mode switches, which emit their own event).
|
|
@@ -3795,6 +3847,7 @@ var SessionManager = class {
|
|
|
3795
3847
|
const state = getSessionState(sessionId, maxTokens);
|
|
3796
3848
|
const dynamicContextChanged = this.getDynamicContextChanged(sessionId);
|
|
3797
3849
|
const debugDump = this.debugDumpStore.get(sessionId);
|
|
3850
|
+
const warmCache = !!this.getCachedPrompt(sessionId);
|
|
3798
3851
|
if (!state) {
|
|
3799
3852
|
return {
|
|
3800
3853
|
currentTokens: 0,
|
|
@@ -3803,10 +3856,16 @@ var SessionManager = class {
|
|
|
3803
3856
|
dangerZone: false,
|
|
3804
3857
|
canCompact: false,
|
|
3805
3858
|
dynamicContextChanged,
|
|
3859
|
+
...warmCache ? { warmCache } : {},
|
|
3806
3860
|
...debugDump ? { debugDump } : {}
|
|
3807
3861
|
};
|
|
3808
3862
|
}
|
|
3809
|
-
return {
|
|
3863
|
+
return {
|
|
3864
|
+
...state.contextState,
|
|
3865
|
+
dynamicContextChanged,
|
|
3866
|
+
...warmCache ? { warmCache } : {},
|
|
3867
|
+
...debugDump ? { debugDump } : {}
|
|
3868
|
+
};
|
|
3810
3869
|
}
|
|
3811
3870
|
// ============================================================================
|
|
3812
3871
|
// LSP Manager
|
|
@@ -4596,7 +4655,8 @@ var config2 = {
|
|
|
4596
4655
|
const overrides = getAgentModelOverrides();
|
|
4597
4656
|
const modelOverrides = {};
|
|
4598
4657
|
for (const [agentId, override] of Object.entries(overrides)) {
|
|
4599
|
-
|
|
4658
|
+
const suffix = override.reasoningEffort ? `:${override.reasoningEffort}` : "";
|
|
4659
|
+
modelOverrides[agentId] = `${override.providerId}/${override.model}${suffix}`;
|
|
4600
4660
|
}
|
|
4601
4661
|
return { modelOverrides };
|
|
4602
4662
|
},
|
|
@@ -4604,13 +4664,20 @@ var config2 = {
|
|
|
4604
4664
|
router.get("/:id/model", (req, res) => {
|
|
4605
4665
|
const { id } = req.params;
|
|
4606
4666
|
const override = getAgentModelOverride(id);
|
|
4607
|
-
res.json(override ?? { providerId: null, model: null });
|
|
4667
|
+
res.json(override ?? { providerId: null, model: null, reasoningEffort: null });
|
|
4608
4668
|
});
|
|
4609
4669
|
router.put("/:id/model", (req, res) => {
|
|
4610
4670
|
const { id } = req.params;
|
|
4611
|
-
const { providerId, model } = req.body;
|
|
4671
|
+
const { providerId, model, reasoningEffort } = req.body;
|
|
4672
|
+
if (reasoningEffort !== void 0 && !isReasoningEffortValue(reasoningEffort)) {
|
|
4673
|
+
return res.status(400).json({ error: `Unsupported reasoningEffort: ${reasoningEffort}` });
|
|
4674
|
+
}
|
|
4612
4675
|
if (providerId && model) {
|
|
4613
|
-
setAgentModelOverride(id, {
|
|
4676
|
+
setAgentModelOverride(id, {
|
|
4677
|
+
providerId,
|
|
4678
|
+
model,
|
|
4679
|
+
...reasoningEffort ? { reasoningEffort } : {}
|
|
4680
|
+
});
|
|
4614
4681
|
} else {
|
|
4615
4682
|
setAgentModelOverride(id, null);
|
|
4616
4683
|
}
|
|
@@ -5913,7 +5980,7 @@ async function createServerHandle(config3) {
|
|
|
5913
5980
|
const useMock = process.env["OPENFOX_MOCK_LLM"] === "true";
|
|
5914
5981
|
const getMockClient = useMock ? createMockLLMClient : null;
|
|
5915
5982
|
const getLLMClient = () => getMockClient ? getMockClient() : providerManager.getLLMClient();
|
|
5916
|
-
const getLLMClientForProvider = (providerId, model) => getMockClient ? getMockClient() : providerManager.createClient(providerId, model);
|
|
5983
|
+
const getLLMClientForProvider = (providerId, model, reasoningEffort) => getMockClient ? getMockClient() : providerManager.createClient(providerId, model, reasoningEffort);
|
|
5917
5984
|
if (useMock) {
|
|
5918
5985
|
logger.info("Using MOCK LLM client - deterministic responses for testing");
|
|
5919
5986
|
}
|
|
@@ -5991,7 +6058,7 @@ async function createServerHandle(config3) {
|
|
|
5991
6058
|
toolRegistry = createToolRegistry();
|
|
5992
6059
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5993
6060
|
}
|
|
5994
|
-
const { signalMcpReady } = await import("./server-
|
|
6061
|
+
const { signalMcpReady } = await import("./server-N3VATHIA.js");
|
|
5995
6062
|
signalMcpReady();
|
|
5996
6063
|
});
|
|
5997
6064
|
const app = express();
|
|
@@ -6074,7 +6141,7 @@ async function createServerHandle(config3) {
|
|
|
6074
6141
|
res.json({ tools });
|
|
6075
6142
|
});
|
|
6076
6143
|
app.get("/api/projects", async (_req, res) => {
|
|
6077
|
-
const { listProjects: listProjects2 } = await import("./projects-
|
|
6144
|
+
const { listProjects: listProjects2 } = await import("./projects-TPSLCJP2.js");
|
|
6078
6145
|
const projects = listProjects2();
|
|
6079
6146
|
res.json({ projects });
|
|
6080
6147
|
});
|
|
@@ -6083,7 +6150,7 @@ async function createServerHandle(config3) {
|
|
|
6083
6150
|
if (!name || !workdir) {
|
|
6084
6151
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
6085
6152
|
}
|
|
6086
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
6153
|
+
const { createDirectoryWithGit } = await import("./project-creator-JF3YVQAH.js");
|
|
6087
6154
|
try {
|
|
6088
6155
|
const project = await createDirectoryWithGit(name, workdir);
|
|
6089
6156
|
res.status(201).json({ project });
|
|
@@ -6128,7 +6195,7 @@ async function createServerHandle(config3) {
|
|
|
6128
6195
|
}
|
|
6129
6196
|
});
|
|
6130
6197
|
app.get("/api/projects/:id", async (req, res) => {
|
|
6131
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6198
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6132
6199
|
const project = getProject2(req.params.id);
|
|
6133
6200
|
if (!project) {
|
|
6134
6201
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6136,7 +6203,7 @@ async function createServerHandle(config3) {
|
|
|
6136
6203
|
res.json({ project });
|
|
6137
6204
|
});
|
|
6138
6205
|
app.get("/api/projects/:id/open-folder", async (req, res) => {
|
|
6139
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6206
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6140
6207
|
const project = getProject2(req.params.id);
|
|
6141
6208
|
if (!project) {
|
|
6142
6209
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6150,7 +6217,7 @@ async function createServerHandle(config3) {
|
|
|
6150
6217
|
}
|
|
6151
6218
|
});
|
|
6152
6219
|
app.put("/api/projects/:id", async (req, res) => {
|
|
6153
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
6220
|
+
const { updateProject: updateProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6154
6221
|
const { name, customInstructions, dangerLevel, defaultAgent } = req.body;
|
|
6155
6222
|
const updates = {};
|
|
6156
6223
|
if (name !== void 0) updates.name = name;
|
|
@@ -6164,7 +6231,7 @@ async function createServerHandle(config3) {
|
|
|
6164
6231
|
res.json({ project: updated });
|
|
6165
6232
|
});
|
|
6166
6233
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
6167
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
6234
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-TPSLCJP2.js");
|
|
6168
6235
|
const project = getProject2(req.params.id);
|
|
6169
6236
|
if (!project) {
|
|
6170
6237
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6173,7 +6240,7 @@ async function createServerHandle(config3) {
|
|
|
6173
6240
|
res.json({ success: true });
|
|
6174
6241
|
});
|
|
6175
6242
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
6176
|
-
const { toggleStar } = await import("./projects-
|
|
6243
|
+
const { toggleStar } = await import("./projects-TPSLCJP2.js");
|
|
6177
6244
|
const { isStarred } = req.body;
|
|
6178
6245
|
if (typeof isStarred !== "boolean") {
|
|
6179
6246
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -6187,9 +6254,9 @@ async function createServerHandle(config3) {
|
|
|
6187
6254
|
const sessionFavoriteRouter = express.Router();
|
|
6188
6255
|
registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
|
|
6189
6256
|
app.use("/api", sessionFavoriteRouter);
|
|
6190
|
-
const { createTasksService } = await import("./service-
|
|
6191
|
-
const { registerTaskRoutes } = await import("./tasks-
|
|
6192
|
-
const { setTasksService } = await import("./tools-
|
|
6257
|
+
const { createTasksService } = await import("./service-OURGS2SI.js");
|
|
6258
|
+
const { registerTaskRoutes } = await import("./tasks-4SOLTX6A.js");
|
|
6259
|
+
const { setTasksService } = await import("./tools-G44LBKD4.js");
|
|
6193
6260
|
const tasksService = createTasksService({
|
|
6194
6261
|
sessionManager,
|
|
6195
6262
|
config: config3,
|
|
@@ -6202,26 +6269,26 @@ async function createServerHandle(config3) {
|
|
|
6202
6269
|
registerTaskRoutes(tasksRouter, tasksService);
|
|
6203
6270
|
app.use("/api", tasksRouter);
|
|
6204
6271
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
6205
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6272
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6206
6273
|
const project = getProject2(req.params.id);
|
|
6207
6274
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6208
|
-
const { listBranches } = await import("./workspace-
|
|
6275
|
+
const { listBranches } = await import("./workspace-J3JEGF6U.js");
|
|
6209
6276
|
const branches = await listBranches(project.workdir);
|
|
6210
6277
|
res.json({ branches });
|
|
6211
6278
|
});
|
|
6212
6279
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
6213
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6280
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6214
6281
|
const project = getProject2(req.params.id);
|
|
6215
6282
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6216
6283
|
const { branch } = req.body;
|
|
6217
6284
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6218
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
6285
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-J3JEGF6U.js");
|
|
6219
6286
|
if (!await isGitRepository(project.workdir)) {
|
|
6220
6287
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6221
6288
|
}
|
|
6222
6289
|
try {
|
|
6223
6290
|
await checkoutBranch(project.workdir, branch);
|
|
6224
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6291
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D7VRCHQY.js");
|
|
6225
6292
|
const allSessions = sessionManager.listSessions();
|
|
6226
6293
|
for (const s of allSessions) {
|
|
6227
6294
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6235,12 +6302,12 @@ async function createServerHandle(config3) {
|
|
|
6235
6302
|
}
|
|
6236
6303
|
});
|
|
6237
6304
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
6238
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6305
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6239
6306
|
const project = getProject2(req.params.id);
|
|
6240
6307
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6241
6308
|
const { name, sourceBranch } = req.body;
|
|
6242
6309
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6243
|
-
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-
|
|
6310
|
+
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-J3JEGF6U.js");
|
|
6244
6311
|
if (!await isGitRepository(project.workdir)) {
|
|
6245
6312
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6246
6313
|
}
|
|
@@ -6257,7 +6324,7 @@ async function createServerHandle(config3) {
|
|
|
6257
6324
|
);
|
|
6258
6325
|
}
|
|
6259
6326
|
await createBranch(project.workdir, name, sb);
|
|
6260
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6327
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D7VRCHQY.js");
|
|
6261
6328
|
const allSessions = sessionManager.listSessions();
|
|
6262
6329
|
for (const s of allSessions) {
|
|
6263
6330
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6274,7 +6341,7 @@ async function createServerHandle(config3) {
|
|
|
6274
6341
|
const session = sessionManager.getSession(req.params.id);
|
|
6275
6342
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
6276
6343
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6277
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
6344
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-J3JEGF6U.js");
|
|
6278
6345
|
const [branches, defaultBranch] = await Promise.all([
|
|
6279
6346
|
listBranches(effectiveWorkdir),
|
|
6280
6347
|
getDefaultBranch(session.workdir)
|
|
@@ -6288,8 +6355,8 @@ async function createServerHandle(config3) {
|
|
|
6288
6355
|
const { branch } = req.body;
|
|
6289
6356
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6290
6357
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6291
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
6292
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6358
|
+
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-J3JEGF6U.js");
|
|
6359
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D7VRCHQY.js");
|
|
6293
6360
|
try {
|
|
6294
6361
|
await validateRef2(effectiveWorkdir, branch);
|
|
6295
6362
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -6331,16 +6398,16 @@ All file and git operations should use this branch.
|
|
|
6331
6398
|
const { name, sourceBranch } = req.body;
|
|
6332
6399
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6333
6400
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6334
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
6335
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6401
|
+
const { validateRef: validateRef2 } = await import("./workspace-J3JEGF6U.js");
|
|
6402
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-D7VRCHQY.js");
|
|
6336
6403
|
try {
|
|
6337
6404
|
await validateRef2(effectiveWorkdir, name);
|
|
6338
6405
|
if (sourceBranch) {
|
|
6339
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6406
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-J3JEGF6U.js");
|
|
6340
6407
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
6341
6408
|
await createBranch(effectiveWorkdir, name, sb);
|
|
6342
6409
|
} else {
|
|
6343
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6410
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-J3JEGF6U.js");
|
|
6344
6411
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
6345
6412
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
6346
6413
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -6378,17 +6445,17 @@ All file and git operations should use this branch.
|
|
|
6378
6445
|
}
|
|
6379
6446
|
});
|
|
6380
6447
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
6381
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6448
|
+
const { getProject: getProject2 } = await import("./projects-TPSLCJP2.js");
|
|
6382
6449
|
const project = getProject2(req.params.id);
|
|
6383
6450
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6384
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6451
|
+
const { listWorkspaces } = await import("./workspace-J3JEGF6U.js");
|
|
6385
6452
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
6386
6453
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
6387
6454
|
res.json({ workspaces: workspacesList });
|
|
6388
6455
|
});
|
|
6389
6456
|
app.get("/api/sessions", async (req, res) => {
|
|
6390
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6391
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6457
|
+
const { getRecentUserPromptsForSession } = await import("./events-GMHRX4LF.js");
|
|
6458
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-YTPZ35SL.js");
|
|
6392
6459
|
const projectId = req.query["projectId"];
|
|
6393
6460
|
const rawLimit = req.query["limit"];
|
|
6394
6461
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6443,7 +6510,7 @@ All file and git operations should use this branch.
|
|
|
6443
6510
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
6444
6511
|
}
|
|
6445
6512
|
if (disabledServers.length > 0) {
|
|
6446
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6513
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-4WAD3X5Q.js");
|
|
6447
6514
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
6448
6515
|
}
|
|
6449
6516
|
} catch {
|
|
@@ -6480,7 +6547,7 @@ All file and git operations should use this branch.
|
|
|
6480
6547
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6481
6548
|
const project = sessionManager.getProject(session.projectId);
|
|
6482
6549
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6483
|
-
const { isGitRepository } = await import("./workspace-
|
|
6550
|
+
const { isGitRepository } = await import("./workspace-J3JEGF6U.js");
|
|
6484
6551
|
if (!await isGitRepository(project.workdir)) {
|
|
6485
6552
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6486
6553
|
}
|
|
@@ -6498,7 +6565,7 @@ All file and git operations should use this branch.
|
|
|
6498
6565
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6499
6566
|
const project = sessionManager.getProject(session.projectId);
|
|
6500
6567
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6501
|
-
const { isGitRepository } = await import("./workspace-
|
|
6568
|
+
const { isGitRepository } = await import("./workspace-J3JEGF6U.js");
|
|
6502
6569
|
if (!await isGitRepository(project.workdir)) {
|
|
6503
6570
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6504
6571
|
}
|
|
@@ -6516,10 +6583,10 @@ All file and git operations should use this branch.
|
|
|
6516
6583
|
}
|
|
6517
6584
|
});
|
|
6518
6585
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6519
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6520
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6521
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6522
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6586
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-GMHRX4LF.js");
|
|
6587
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-7K2GRPF4.js");
|
|
6588
|
+
const { getPendingQuestionsForSession } = await import("./tools-G44LBKD4.js");
|
|
6589
|
+
const { getMaxVisibleItems } = await import("./settings-VOWWO4VG.js");
|
|
6523
6590
|
const session = sessionManager.getSession(req.params.id);
|
|
6524
6591
|
if (!session) {
|
|
6525
6592
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -6547,9 +6614,9 @@ All file and git operations should use this branch.
|
|
|
6547
6614
|
});
|
|
6548
6615
|
app.get("/api/sessions/:id/status", async (req, res) => {
|
|
6549
6616
|
const { projectSessionStatus } = await import("./session-status-6Q5B5PEN.js");
|
|
6550
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6551
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6552
|
-
const { foldPendingConfirmations } = await import("./folding-
|
|
6617
|
+
const { getPendingQuestionsForSession } = await import("./tools-G44LBKD4.js");
|
|
6618
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-GMHRX4LF.js");
|
|
6619
|
+
const { foldPendingConfirmations } = await import("./folding-7K2GRPF4.js");
|
|
6553
6620
|
const sessionId = req.params["id"];
|
|
6554
6621
|
if (!sessionId) {
|
|
6555
6622
|
return res.status(400).json({ error: "Session id is required" });
|
|
@@ -6579,8 +6646,8 @@ All file and git operations should use this branch.
|
|
|
6579
6646
|
if (!session) {
|
|
6580
6647
|
return res.status(404).json({ error: "Session not found" });
|
|
6581
6648
|
}
|
|
6582
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6583
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6649
|
+
const { stopSessionExecution } = await import("./chat-handler-N43TBYLV.js");
|
|
6650
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-G44LBKD4.js");
|
|
6584
6651
|
sessionManager.clearMessageQueue(sessionId);
|
|
6585
6652
|
stopSessionExecution(sessionId, sessionManager);
|
|
6586
6653
|
abortSession(sessionId);
|
|
@@ -6609,21 +6676,24 @@ All file and git operations should use this branch.
|
|
|
6609
6676
|
res.json({ success: true });
|
|
6610
6677
|
});
|
|
6611
6678
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6612
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6613
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6614
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6679
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GMHRX4LF.js");
|
|
6680
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-7K2GRPF4.js");
|
|
6681
|
+
const { getMaxVisibleItems } = await import("./settings-VOWWO4VG.js");
|
|
6615
6682
|
const sessionId = req.params.id;
|
|
6616
6683
|
const session = sessionManager.getSession(sessionId);
|
|
6617
6684
|
if (!session) {
|
|
6618
6685
|
return res.status(404).json({ error: "Session not found" });
|
|
6619
6686
|
}
|
|
6620
|
-
const { providerId, model } = req.body;
|
|
6687
|
+
const { providerId, model, reasoningEffort } = req.body;
|
|
6621
6688
|
if (!providerId) {
|
|
6622
6689
|
return res.status(400).json({ error: "providerId is required" });
|
|
6623
6690
|
}
|
|
6691
|
+
if (reasoningEffort !== void 0 && reasoningEffort !== null && !isReasoningEffortValue(reasoningEffort)) {
|
|
6692
|
+
return res.status(400).json({ error: `Unsupported reasoningEffort: ${reasoningEffort}` });
|
|
6693
|
+
}
|
|
6624
6694
|
const provider = providerManager.getProviders().find((p) => p.id === providerId);
|
|
6625
6695
|
const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
|
|
6626
|
-
sessionManager.setSessionProvider(sessionId, providerId, resolvedModel, true);
|
|
6696
|
+
sessionManager.setSessionProvider(sessionId, providerId, resolvedModel, true, reasoningEffort);
|
|
6627
6697
|
sessionManager.setSessionProviderActive(sessionId, true);
|
|
6628
6698
|
const contextState = sessionManager.getContextState(sessionId);
|
|
6629
6699
|
const eventStore = getEventStore2();
|
|
@@ -6635,15 +6705,15 @@ All file and git operations should use this branch.
|
|
|
6635
6705
|
res.json({ session: toClientSession(updatedSession), messages, hiddenCount, contextState });
|
|
6636
6706
|
});
|
|
6637
6707
|
app.delete("/api/sessions/:id/provider", async (req, res) => {
|
|
6638
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6639
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6640
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6708
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GMHRX4LF.js");
|
|
6709
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-7K2GRPF4.js");
|
|
6710
|
+
const { getMaxVisibleItems } = await import("./settings-VOWWO4VG.js");
|
|
6641
6711
|
const sessionId = req.params.id;
|
|
6642
6712
|
const session = sessionManager.getSession(sessionId);
|
|
6643
6713
|
if (!session) {
|
|
6644
6714
|
return res.status(404).json({ error: "Session not found" });
|
|
6645
6715
|
}
|
|
6646
|
-
sessionManager.setSessionProvider(sessionId, null, null, false);
|
|
6716
|
+
sessionManager.setSessionProvider(sessionId, null, null, false, null);
|
|
6647
6717
|
sessionManager.setSessionProviderActive(sessionId, true);
|
|
6648
6718
|
const eventStore = getEventStore2();
|
|
6649
6719
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
@@ -6653,6 +6723,28 @@ All file and git operations should use this branch.
|
|
|
6653
6723
|
const updatedSession = sessionManager.getSession(sessionId);
|
|
6654
6724
|
res.json({ session: toClientSession(updatedSession), messages, hiddenCount });
|
|
6655
6725
|
});
|
|
6726
|
+
app.post("/api/sessions/:id/pin-effort", async (req, res) => {
|
|
6727
|
+
const sessionId = req.params.id;
|
|
6728
|
+
const session = sessionManager.getSession(sessionId);
|
|
6729
|
+
if (!session) {
|
|
6730
|
+
return res.status(404).json({ error: "Session not found" });
|
|
6731
|
+
}
|
|
6732
|
+
const { effort } = req.body;
|
|
6733
|
+
if (!effort || !isReasoningEffortValue(effort)) {
|
|
6734
|
+
return res.status(400).json({ error: `Unsupported reasoningEffort: ${effort}` });
|
|
6735
|
+
}
|
|
6736
|
+
const updated = sessionManager.setSessionPinnedEffort(sessionId, effort);
|
|
6737
|
+
res.json({ session: toClientSession(updated) });
|
|
6738
|
+
});
|
|
6739
|
+
app.delete("/api/sessions/:id/pin-effort", async (req, res) => {
|
|
6740
|
+
const sessionId = req.params.id;
|
|
6741
|
+
const session = sessionManager.getSession(sessionId);
|
|
6742
|
+
if (!session) {
|
|
6743
|
+
return res.status(404).json({ error: "Session not found" });
|
|
6744
|
+
}
|
|
6745
|
+
const updated = sessionManager.setSessionPinnedEffort(sessionId, null);
|
|
6746
|
+
res.json({ session: toClientSession(updated) });
|
|
6747
|
+
});
|
|
6656
6748
|
app.post("/api/default-model", async (req, res) => {
|
|
6657
6749
|
const { providerId, model } = req.body;
|
|
6658
6750
|
if (!providerId || !model) {
|
|
@@ -6744,9 +6836,9 @@ All file and git operations should use this branch.
|
|
|
6744
6836
|
res.json({ success: true });
|
|
6745
6837
|
});
|
|
6746
6838
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6747
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6748
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6749
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6839
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-GMHRX4LF.js");
|
|
6840
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-7K2GRPF4.js");
|
|
6841
|
+
const { getMaxVisibleItems } = await import("./settings-VOWWO4VG.js");
|
|
6750
6842
|
const sessionId = req.params.id;
|
|
6751
6843
|
const session = sessionManager.getSession(sessionId);
|
|
6752
6844
|
if (!session) {
|
|
@@ -6832,7 +6924,7 @@ All file and git operations should use this branch.
|
|
|
6832
6924
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6833
6925
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6834
6926
|
}
|
|
6835
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6927
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-G44LBKD4.js");
|
|
6836
6928
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6837
6929
|
if (!pendingSessionId) {
|
|
6838
6930
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6844,11 +6936,11 @@ All file and git operations should use this branch.
|
|
|
6844
6936
|
if (!result.found) {
|
|
6845
6937
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6846
6938
|
}
|
|
6847
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6848
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6939
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-GMHRX4LF.js");
|
|
6940
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-7K2GRPF4.js");
|
|
6849
6941
|
const { createSessionStateMessage } = await import("./protocol-TLODRZSB.js");
|
|
6850
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6851
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6942
|
+
const { getPendingQuestionsForSession } = await import("./tools-G44LBKD4.js");
|
|
6943
|
+
const { getMaxVisibleItems } = await import("./settings-VOWWO4VG.js");
|
|
6852
6944
|
const eventStore = getEventStore2();
|
|
6853
6945
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6854
6946
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6885,7 +6977,7 @@ All file and git operations should use this branch.
|
|
|
6885
6977
|
if (!skip && typeof answer !== "string") {
|
|
6886
6978
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6887
6979
|
}
|
|
6888
|
-
const { provideAnswer } = await import("./tools-
|
|
6980
|
+
const { provideAnswer } = await import("./tools-G44LBKD4.js");
|
|
6889
6981
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6890
6982
|
if (!found) {
|
|
6891
6983
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6918,7 +7010,7 @@ All file and git operations should use this branch.
|
|
|
6918
7010
|
if (!session) {
|
|
6919
7011
|
return res.status(404).json({ error: "Session not found" });
|
|
6920
7012
|
}
|
|
6921
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7013
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-VOWWO4VG.js");
|
|
6922
7014
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6923
7015
|
return res.json({ success: false, reason: "disabled" });
|
|
6924
7016
|
}
|
|
@@ -6951,7 +7043,7 @@ All file and git operations should use this branch.
|
|
|
6951
7043
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6952
7044
|
model: llmClient.getModel()
|
|
6953
7045
|
};
|
|
6954
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
7046
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-BQBBO4US.js");
|
|
6955
7047
|
runAgentTurn(
|
|
6956
7048
|
{
|
|
6957
7049
|
sessionManager,
|
|
@@ -6989,15 +7081,15 @@ All file and git operations should use this branch.
|
|
|
6989
7081
|
if (!session) {
|
|
6990
7082
|
return res.status(404).json({ error: "Session not found" });
|
|
6991
7083
|
}
|
|
6992
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6993
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
7084
|
+
const { stopSessionExecution } = await import("./chat-handler-N43TBYLV.js");
|
|
7085
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-G44LBKD4.js");
|
|
6994
7086
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6995
7087
|
sessionManager.clearMessageQueue(sessionId);
|
|
6996
7088
|
stopSessionExecution(sessionId, sessionManager);
|
|
6997
7089
|
abortSession(sessionId);
|
|
6998
7090
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6999
7091
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
7000
|
-
const eventStore = (await import("./events-
|
|
7092
|
+
const eventStore = (await import("./events-GMHRX4LF.js")).getEventStore();
|
|
7001
7093
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
7002
7094
|
res.json({ success: true, queuedMessages });
|
|
7003
7095
|
});
|
|
@@ -7011,7 +7103,7 @@ All file and git operations should use this branch.
|
|
|
7011
7103
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
7012
7104
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
7013
7105
|
}
|
|
7014
|
-
const { truncateSessionMessages } = await import("./events-
|
|
7106
|
+
const { truncateSessionMessages } = await import("./events-GMHRX4LF.js");
|
|
7015
7107
|
truncateSessionMessages(sessionId, messageIndex);
|
|
7016
7108
|
res.json({ success: true });
|
|
7017
7109
|
});
|
|
@@ -7031,8 +7123,8 @@ All file and git operations should use this branch.
|
|
|
7031
7123
|
if (attachments !== void 0 && !Array.isArray(attachments)) {
|
|
7032
7124
|
return res.status(400).json({ error: "attachments must be an array if provided" });
|
|
7033
7125
|
}
|
|
7034
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
7035
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
7126
|
+
const { getEventStore: getEventStore2 } = await import("./events-GMHRX4LF.js");
|
|
7127
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-7K2GRPF4.js");
|
|
7036
7128
|
const eventStore = getEventStore2();
|
|
7037
7129
|
const events = eventStore.getEvents(sessionId);
|
|
7038
7130
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -7044,7 +7136,7 @@ All file and git operations should use this branch.
|
|
|
7044
7136
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
7045
7137
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
7046
7138
|
}
|
|
7047
|
-
const { truncateSessionMessages } = await import("./events-
|
|
7139
|
+
const { truncateSessionMessages } = await import("./events-GMHRX4LF.js");
|
|
7048
7140
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
7049
7141
|
sessionManager.queueMessage(
|
|
7050
7142
|
sessionId,
|
|
@@ -7106,7 +7198,7 @@ All file and git operations should use this branch.
|
|
|
7106
7198
|
res.json({ accepted: true });
|
|
7107
7199
|
});
|
|
7108
7200
|
app.get("/api/settings", async (req, res) => {
|
|
7109
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7201
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-VOWWO4VG.js");
|
|
7110
7202
|
const keysParam = req.query["keys"];
|
|
7111
7203
|
if (!keysParam) {
|
|
7112
7204
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -7119,19 +7211,19 @@ All file and git operations should use this branch.
|
|
|
7119
7211
|
res.json(result);
|
|
7120
7212
|
});
|
|
7121
7213
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7122
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7214
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-VOWWO4VG.js");
|
|
7123
7215
|
const key = req.params.key;
|
|
7124
7216
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7125
7217
|
res.json({ key, value });
|
|
7126
7218
|
});
|
|
7127
7219
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7128
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7220
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-VOWWO4VG.js");
|
|
7129
7221
|
const key = req.params.key;
|
|
7130
7222
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7131
7223
|
res.json({ key, value });
|
|
7132
7224
|
});
|
|
7133
7225
|
app.put("/api/settings/:key", async (req, res) => {
|
|
7134
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
7226
|
+
const { setSetting: setSetting2 } = await import("./settings-VOWWO4VG.js");
|
|
7135
7227
|
const key = req.params.key;
|
|
7136
7228
|
const { value } = req.body;
|
|
7137
7229
|
if (value === void 0) {
|
|
@@ -7158,7 +7250,7 @@ All file and git operations should use this branch.
|
|
|
7158
7250
|
}
|
|
7159
7251
|
});
|
|
7160
7252
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
7161
|
-
const { listAvailableShells } = await import("./platform-
|
|
7253
|
+
const { listAvailableShells } = await import("./platform-EMKWQTZX.js");
|
|
7162
7254
|
res.json({ shells: listAvailableShells() });
|
|
7163
7255
|
});
|
|
7164
7256
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -7231,6 +7323,7 @@ All file and git operations should use this branch.
|
|
|
7231
7323
|
...m.apiModelId !== void 0 && { apiModelId: m.apiModelId },
|
|
7232
7324
|
...m.requestBody !== void 0 && { requestBody: m.requestBody },
|
|
7233
7325
|
...m.reasoningEfforts !== void 0 && { reasoningEfforts: m.reasoningEfforts },
|
|
7326
|
+
...m.reasoningEffortOverride !== void 0 && { reasoningEffortOverride: m.reasoningEffortOverride },
|
|
7234
7327
|
...m.supportsVision !== void 0 && { supportsVision: m.supportsVision },
|
|
7235
7328
|
...m.thinkingEnabled !== void 0 && { thinkingEnabled: m.thinkingEnabled },
|
|
7236
7329
|
...m.thinkingLevel !== void 0 && { thinkingLevel: m.thinkingLevel },
|
|
@@ -7249,7 +7342,7 @@ All file and git operations should use this branch.
|
|
|
7249
7342
|
}));
|
|
7250
7343
|
}
|
|
7251
7344
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7252
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7345
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-VOWWO4VG.js");
|
|
7253
7346
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7254
7347
|
if (!proxyUrl) {
|
|
7255
7348
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7341,7 +7434,7 @@ All file and git operations should use this branch.
|
|
|
7341
7434
|
}
|
|
7342
7435
|
});
|
|
7343
7436
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7344
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7437
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-VOWWO4VG.js");
|
|
7345
7438
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7346
7439
|
if (!proxyUrl) {
|
|
7347
7440
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7368,8 +7461,9 @@ All file and git operations should use this branch.
|
|
|
7368
7461
|
const backend = req.query["backend"];
|
|
7369
7462
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7370
7463
|
try {
|
|
7371
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
7464
|
+
const { fetchModelsWithContext } = await import("./provider-manager-3QC2MSSR.js");
|
|
7372
7465
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-3YLLEJ2B.js");
|
|
7466
|
+
const { getCatalogEntry } = await import("./model-catalog-ZLOWTQA7.js");
|
|
7373
7467
|
const models = await fetchModelsWithContext(
|
|
7374
7468
|
url,
|
|
7375
7469
|
apiKey,
|
|
@@ -7381,13 +7475,15 @@ All file and git operations should use this branch.
|
|
|
7381
7475
|
res.json({
|
|
7382
7476
|
models: models.map((m) => {
|
|
7383
7477
|
const profile = getModelProfile2(m.id);
|
|
7478
|
+
const catalog = getCatalogEntry(m.id);
|
|
7384
7479
|
return {
|
|
7385
7480
|
id: m.id,
|
|
7386
7481
|
contextWindow: m.contextWindow,
|
|
7387
7482
|
defaultTemperature: profile.temperature,
|
|
7388
7483
|
defaultTopP: profile.topP,
|
|
7389
7484
|
defaultTopK: profile.topK,
|
|
7390
|
-
defaultMaxTokens: profile.defaultMaxTokens
|
|
7485
|
+
defaultMaxTokens: profile.defaultMaxTokens,
|
|
7486
|
+
...catalog ? { reasoningEfforts: catalog.reasoningEfforts } : {}
|
|
7391
7487
|
};
|
|
7392
7488
|
}),
|
|
7393
7489
|
url
|
|
@@ -7404,7 +7500,7 @@ All file and git operations should use this branch.
|
|
|
7404
7500
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7405
7501
|
if (!models?.length) return res.status(400).json({ error: "models is required" });
|
|
7406
7502
|
try {
|
|
7407
|
-
const { autoConfig } = await import("./auto-config-
|
|
7503
|
+
const { autoConfig } = await import("./auto-config-454YE6KC.js");
|
|
7408
7504
|
const result = await autoConfig({
|
|
7409
7505
|
url,
|
|
7410
7506
|
...apiKey ? { apiKey } : {},
|
|
@@ -7439,7 +7535,7 @@ All file and git operations should use this branch.
|
|
|
7439
7535
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-3YLLEJ2B.js");
|
|
7440
7536
|
const { getBackendCapabilities } = await import("./backend-67OLCS5O.js");
|
|
7441
7537
|
const { buildNonStreamingCreateParams } = await import("./client-pure-QSY7TJGK.js");
|
|
7442
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7538
|
+
const { OpenAIHttpClient } = await import("./http-client-N4ASJEKJ.js");
|
|
7443
7539
|
const { ensureVersionPrefix } = await import("./url-utils-C5BM7NF7.js");
|
|
7444
7540
|
const profile = getModelProfile2(model);
|
|
7445
7541
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -7757,6 +7853,44 @@ All file and git operations should use this branch.
|
|
|
7757
7853
|
const models = await providerManager.getProviderModels(id);
|
|
7758
7854
|
res.json({ models });
|
|
7759
7855
|
});
|
|
7856
|
+
app.put("/api/providers/:id/models/:modelId/settings", async (req, res) => {
|
|
7857
|
+
const { id, modelId } = req.params;
|
|
7858
|
+
const { thinkingLevel, thinkingEnabled } = req.body;
|
|
7859
|
+
if (thinkingLevel !== void 0 && !isReasoningEffortValue(thinkingLevel)) {
|
|
7860
|
+
return res.status(400).json({ error: `Invalid reasoning effort '${thinkingLevel}'` });
|
|
7861
|
+
}
|
|
7862
|
+
if (thinkingEnabled !== void 0 && typeof thinkingEnabled !== "boolean") {
|
|
7863
|
+
return res.status(400).json({ error: "thinkingEnabled must be a boolean" });
|
|
7864
|
+
}
|
|
7865
|
+
try {
|
|
7866
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
7867
|
+
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7868
|
+
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
7869
|
+
if (!provider) {
|
|
7870
|
+
return res.status(404).json({ error: "Provider not found" });
|
|
7871
|
+
}
|
|
7872
|
+
const models = provider.models ?? [];
|
|
7873
|
+
if (!models.some((m) => m.id === modelId)) {
|
|
7874
|
+
return res.status(404).json({ error: "Model not found" });
|
|
7875
|
+
}
|
|
7876
|
+
const updatedModels = models.map(
|
|
7877
|
+
(m) => m.id === modelId ? {
|
|
7878
|
+
...m,
|
|
7879
|
+
...thinkingLevel !== void 0 ? { thinkingLevel } : {},
|
|
7880
|
+
...thinkingEnabled !== void 0 ? { thinkingEnabled } : {}
|
|
7881
|
+
} : m
|
|
7882
|
+
);
|
|
7883
|
+
const updatedConfig = updateProvider(globalConfig, id, { models: updatedModels });
|
|
7884
|
+
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
7885
|
+
await providerManager.updateModelSettings(id, modelId, {
|
|
7886
|
+
...thinkingLevel !== void 0 ? { thinkingLevel } : {},
|
|
7887
|
+
...thinkingEnabled !== void 0 ? { thinkingEnabled } : {}
|
|
7888
|
+
});
|
|
7889
|
+
res.json({ success: true, model: updatedModels.find((m) => m.id === modelId) });
|
|
7890
|
+
} catch (error) {
|
|
7891
|
+
res.status(500).json({ error: error instanceof Error ? error.message : "Failed to update model settings" });
|
|
7892
|
+
}
|
|
7893
|
+
});
|
|
7760
7894
|
app.post("/api/providers/:id/activate", async (req, res) => {
|
|
7761
7895
|
const { id } = req.params;
|
|
7762
7896
|
const body = req.body;
|
|
@@ -7792,7 +7926,7 @@ All file and git operations should use this branch.
|
|
|
7792
7926
|
});
|
|
7793
7927
|
async function rebuildMcpTools() {
|
|
7794
7928
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FJAFLDZA.js");
|
|
7795
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7929
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-G44LBKD4.js");
|
|
7796
7930
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7797
7931
|
setMcpTools2(mcpTools);
|
|
7798
7932
|
toolRegistry = createToolRegistry();
|
|
@@ -8173,7 +8307,7 @@ All file and git operations should use this branch.
|
|
|
8173
8307
|
res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
|
|
8174
8308
|
}
|
|
8175
8309
|
});
|
|
8176
|
-
const { listProjects } = await import("./projects-
|
|
8310
|
+
const { listProjects } = await import("./projects-TPSLCJP2.js");
|
|
8177
8311
|
const allProjects = listProjects();
|
|
8178
8312
|
const projectDir = allProjects.find(
|
|
8179
8313
|
(p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
|
|
@@ -8200,13 +8334,13 @@ All file and git operations should use this branch.
|
|
|
8200
8334
|
})
|
|
8201
8335
|
);
|
|
8202
8336
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
8203
|
-
const { getSessionProcesses } = await import("./manager-
|
|
8337
|
+
const { getSessionProcesses } = await import("./manager-NOKJQTTF.js");
|
|
8204
8338
|
const sessionId = req.params.id;
|
|
8205
8339
|
const processes = getSessionProcesses(sessionId);
|
|
8206
8340
|
res.json({ processes });
|
|
8207
8341
|
});
|
|
8208
8342
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
8209
|
-
const { stopProcess } = await import("./manager-
|
|
8343
|
+
const { stopProcess } = await import("./manager-NOKJQTTF.js");
|
|
8210
8344
|
const sessionId = req.params.id;
|
|
8211
8345
|
const processId = req.params.processId;
|
|
8212
8346
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -8346,16 +8480,17 @@ All file and git operations should use this branch.
|
|
|
8346
8480
|
);
|
|
8347
8481
|
const wss = wssExports.wss;
|
|
8348
8482
|
deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
|
|
8349
|
-
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-
|
|
8483
|
+
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-Z5D5YFRJ.js");
|
|
8350
8484
|
deferTasksLaunchWorkflow = (sessionId, launch) => {
|
|
8351
8485
|
const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
|
|
8352
8486
|
let llmClient = getLLMClient();
|
|
8353
8487
|
if (effective.providerId && effective.model) {
|
|
8354
8488
|
const resolvedModel = providerManager.resolveModel(effective.providerId, effective.model);
|
|
8355
|
-
llmClient = getLLMClientForProvider(effective.providerId, resolvedModel ?? effective.model) ?? getLLMClient();
|
|
8489
|
+
llmClient = getLLMClientForProvider(effective.providerId, resolvedModel ?? effective.model, effective.reasoningEffort) ?? getLLMClient();
|
|
8356
8490
|
}
|
|
8357
8491
|
const provider = providerManager.getActiveProvider();
|
|
8358
8492
|
const controller = new AbortController();
|
|
8493
|
+
const statsEffort = llmClient.getReasoningEffort?.();
|
|
8359
8494
|
launchWorkflowRun(
|
|
8360
8495
|
{
|
|
8361
8496
|
sessionManager,
|
|
@@ -8366,7 +8501,8 @@ All file and git operations should use this branch.
|
|
|
8366
8501
|
providerId: provider?.id ?? `provider:${llmClient.getModel()}`,
|
|
8367
8502
|
providerName: provider?.name ?? "Unknown Provider",
|
|
8368
8503
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
8369
|
-
model: llmClient.getModel()
|
|
8504
|
+
model: llmClient.getModel(),
|
|
8505
|
+
...statsEffort ? { reasoningEffort: statsEffort } : {}
|
|
8370
8506
|
},
|
|
8371
8507
|
broadcastForSession: wssExports.broadcastForSession
|
|
8372
8508
|
},
|
|
@@ -8384,7 +8520,7 @@ All file and git operations should use this branch.
|
|
|
8384
8520
|
const state = sessionManager.getContextState(sessionId);
|
|
8385
8521
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
8386
8522
|
});
|
|
8387
|
-
const { QueueProcessor } = await import("./processor-
|
|
8523
|
+
const { QueueProcessor } = await import("./processor-WTRVYXAO.js");
|
|
8388
8524
|
const queueProcessor = new QueueProcessor({
|
|
8389
8525
|
sessionManager,
|
|
8390
8526
|
providerManager,
|
|
@@ -8428,7 +8564,7 @@ All file and git operations should use this branch.
|
|
|
8428
8564
|
void (async () => {
|
|
8429
8565
|
await devServerManager.stopAll();
|
|
8430
8566
|
await mcpManager.disconnectAll();
|
|
8431
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
8567
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-UKPU3Z64.js");
|
|
8432
8568
|
stopAllInspectProxies();
|
|
8433
8569
|
const { cleanupAllProcesses } = await import("./store-JYPZ2RXB.js");
|
|
8434
8570
|
cleanupAllProcesses();
|
|
@@ -8470,4 +8606,4 @@ export {
|
|
|
8470
8606
|
createServerHandle,
|
|
8471
8607
|
createServer
|
|
8472
8608
|
};
|
|
8473
|
-
//# sourceMappingURL=chunk-
|
|
8609
|
+
//# sourceMappingURL=chunk-VUBFPRKT.js.map
|