openfox 2.0.120 → 2.0.121
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 +19 -0
- package/dist/CHANGELOG.md +19 -0
- package/dist/agent-defaults/code-reviewer.agent.md +3 -8
- package/dist/{chat-handler-TIR5CMWE.js → chat-handler-A5ORR5BB.js} +27 -28
- package/dist/{chunk-LNNBLB6G.js → chunk-2N7KFNMY.js} +3 -3
- package/dist/{chunk-XZGQZ42D.js → chunk-5A4YN6I7.js} +5 -5
- package/dist/{chunk-IW46BUOP.js → chunk-5QTERLHH.js} +6 -6
- package/dist/{chunk-IQFPRQWM.js → chunk-62GUO2EG.js} +5 -3
- package/dist/{chunk-A5JAVQKG.js → chunk-6A2VIV36.js} +4 -4
- package/dist/{chunk-VUQCQXXJ.js → chunk-7OHXF5GW.js} +6 -3
- package/dist/{chunk-3PG65AXG.js → chunk-DIALH34K.js} +2 -2
- package/dist/{chunk-AESOGRFK.js → chunk-EZ67GBEO.js} +2 -2
- package/dist/{chunk-CYXAMXN5.js → chunk-F2IM5J4I.js} +4 -4
- package/dist/{chunk-HD6Y77RO.js → chunk-FGVMRFDW.js} +2 -2
- package/dist/{chunk-ZTOG6LJD.js → chunk-I22B6KWV.js} +3 -3
- package/dist/{chunk-JOCR4CF4.js → chunk-J3IJJ55E.js} +5 -5
- package/dist/{chunk-KFQKBXLO.js → chunk-J77SLE3M.js} +2 -2
- package/dist/{chunk-54FTLSWS.js → chunk-KD7JTG42.js} +205 -184
- package/dist/{chunk-2FCLCUVR.js → chunk-LSEHJ2WI.js} +3 -3
- package/dist/{chunk-3KBRMBTP.js → chunk-LWXLNE6M.js} +2 -2
- package/dist/{chunk-5PT4UMRR.js → chunk-NYQKSKDB.js} +9 -1
- package/dist/{chunk-AS7KAH66.js → chunk-O63CDVNI.js} +4 -4
- package/dist/chunk-OBB3JYMK.js +7 -0
- package/dist/{chunk-M6X6AIEG.js → chunk-OXANSWVZ.js} +2 -2
- package/dist/{chunk-LTYL6ZGH.js → chunk-POTCPZJF.js} +2 -2
- package/dist/{chunk-O6DU226D.js → chunk-RMOKNQAS.js} +2 -2
- package/dist/{chunk-KLQEL2DZ.js → chunk-SLW3KKPP.js} +26 -8
- package/dist/{chunk-JDWJ2PJJ.js → chunk-TR4DQZIG.js} +121 -47
- package/dist/{chunk-WN76RDRU.js → chunk-UJRWYZHM.js} +8 -2
- package/dist/{chunk-HWHWXLM5.js → chunk-VUANU5A5.js} +17 -17
- package/dist/{chunk-JDBIR2J7.js → chunk-W3WZ54KP.js} +16 -16
- package/dist/{chunk-27NABDXB.js → chunk-Y7FGHKBW.js} +2 -2
- package/dist/{chunk-EQ5CGNOT.js → chunk-YBOU4ZFD.js} +3 -3
- package/dist/{chunk-USNG72WA.js → chunk-YDDBPKVP.js} +21 -16
- package/dist/{chunk-PI4X3Y6H.js → chunk-ZELEYSTY.js} +51 -46
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-GXRHODRQ.js → client-JKPDMJ7S.js} +5 -5
- package/dist/{compactor-TI352G7B.js → compactor-MKD3CAFM.js} +12 -12
- package/dist/{dynamic-context-C6HGUQTR.js → dynamic-context-KPZECHZH.js} +9 -9
- package/dist/{events-KDFMBVP5.js → events-6P4TDTSD.js} +8 -8
- package/dist/{folding-RTGU63BW.js → folding-3LA2WX2B.js} +6 -6
- package/dist/http-client-IKOARXI7.js +11 -0
- package/dist/{inspect-proxy-WPEDMCG7.js → inspect-proxy-IDLUAQH5.js} +4 -4
- package/dist/launch-YWXQQWZN.js +52 -0
- package/dist/{manager-EMLSLMMT.js → manager-NFKTUR64.js} +5 -5
- package/dist/{orchestrator-SCH2T4JB.js → orchestrator-SM3IHZFP.js} +30 -31
- package/dist/package.json +1 -1
- package/dist/{path-security-L4AJJN2V.js → path-security-JUF56IB6.js} +10 -10
- package/dist/{platform-ECDDYMAR.js → platform-FM57ZJHA.js} +4 -4
- package/dist/{processor-GM4D26E6.js → processor-EUJRA5GW.js} +39 -40
- package/dist/{project-creator-PMQ65NKN.js → project-creator-J4ITWDZI.js} +3 -3
- package/dist/{projects-NDPNOV6D.js → projects-FHRTSV6N.js} +3 -3
- package/dist/{protocol-D5kJLGWy.d.ts → protocol-BLin669D.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-5V6RDVU2.js → provider-TAFJCWVP.js} +6 -6
- package/dist/{provider-manager-7QD5HAOL.js → provider-manager-EDJN6ARI.js} +6 -6
- package/dist/{registry-5QL3BOWN.js → registry-37GL3DAP.js} +5 -5
- package/dist/{serve-M7I3HWVQ.js → serve-DEY45HQS.js} +31 -32
- package/dist/server/index.d.ts +31 -14
- package/dist/server/index.js +30 -31
- package/dist/server-EIRLWSBZ.js +55 -0
- package/dist/{service-A3YLLXW3.js → service-HX5NFX2D.js} +8 -8
- package/dist/{session-overrides-CWBKPHMF.js → session-overrides-EOKSZO2X.js} +7 -7
- package/dist/{sessions-I7ELDIIP.js → sessions-XFNU4DZ6.js} +8 -6
- package/dist/{settings-FGXQHKUH.js → settings-SYYDPV43.js} +3 -3
- package/dist/shared/index.d.ts +6 -5
- package/dist/shared/index.js +1 -1
- package/dist/{tasks-X5U7DWZR.js → tasks-A25JQ4TV.js} +8 -8
- package/dist/{tools-GCBDO7TU.js → tools-YGJXEEBI.js} +22 -23
- package/dist/{types-B5CI_Ql3.d.ts → types-B5_9KtfJ.d.ts} +1 -1
- package/dist/{types-CZlj7ufS.d.ts → types-DeQIEC1U.d.ts} +2 -0
- package/dist/{update-TUGN3JJE.js → update-CE3XSZXE.js} +2 -2
- package/dist/web/assets/{index-BlYcAqzD.js → index-oiZlWLY7.js} +84 -84
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +3 -3
- package/dist/{workspace-IQLLHMYR.js → workspace-ZNZFEONU.js} +4 -4
- package/package.json +1 -1
- package/dist/chunk-JLAR2CMV.js +0 -72
- package/dist/chunk-PXEWE5YP.js +0 -7
- package/dist/http-client-IPUW2MSW.js +0 -11
- package/dist/launch-SRSMTDEM.js +0 -53
- package/dist/model-overrides-7F2EOA4U.js +0 -21
- package/dist/server-F72WN4KP.js +0 -56
|
@@ -16,20 +16,27 @@ import {
|
|
|
16
16
|
terminalManager,
|
|
17
17
|
tokenFromPassword,
|
|
18
18
|
verifyPassword
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-ZELEYSTY.js";
|
|
20
20
|
import {
|
|
21
21
|
TEMPLATE_VARIABLES
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-W3WZ54KP.js";
|
|
23
|
+
import {
|
|
24
|
+
openFolder
|
|
25
|
+
} from "./chunk-WLJJRX22.js";
|
|
23
26
|
import {
|
|
24
27
|
createToolRegistry,
|
|
25
28
|
devServerManager,
|
|
29
|
+
getAgentModelOverride,
|
|
30
|
+
getAgentModelOverrides,
|
|
26
31
|
getBuiltInToolNames,
|
|
32
|
+
resolveLLMClientForAgent,
|
|
33
|
+
setAgentModelOverride,
|
|
27
34
|
setMcpConfigMode,
|
|
28
35
|
setMcpConfigPath,
|
|
29
36
|
setMcpManagerForTools,
|
|
30
37
|
setMcpTools,
|
|
31
38
|
setNotifyMcpServersChanged
|
|
32
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-TR4DQZIG.js";
|
|
33
40
|
import {
|
|
34
41
|
deleteOwnedSkill,
|
|
35
42
|
deleteProjectSkill,
|
|
@@ -48,15 +55,7 @@ import {
|
|
|
48
55
|
setSkillEnabled,
|
|
49
56
|
skillExists,
|
|
50
57
|
updateOwnedSkill
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import {
|
|
53
|
-
openFolder
|
|
54
|
-
} from "./chunk-WLJJRX22.js";
|
|
55
|
-
import {
|
|
56
|
-
ALWAYS_ALLOWED,
|
|
57
|
-
ALWAYS_ALLOWED_FOR_SUBAGENTS,
|
|
58
|
-
TOP_LEVEL_ONLY_TOOLS
|
|
59
|
-
} from "./chunk-27NABDXB.js";
|
|
58
|
+
} from "./chunk-LSEHJ2WI.js";
|
|
60
59
|
import {
|
|
61
60
|
createMcpTools
|
|
62
61
|
} from "./chunk-JE7LW7Y6.js";
|
|
@@ -75,7 +74,7 @@ import {
|
|
|
75
74
|
validateRef,
|
|
76
75
|
validateWorkspaceName,
|
|
77
76
|
workspaceExists
|
|
78
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-RMOKNQAS.js";
|
|
79
78
|
import {
|
|
80
79
|
commandExists,
|
|
81
80
|
deleteCommand,
|
|
@@ -102,11 +101,23 @@ import {
|
|
|
102
101
|
saveWorkflow,
|
|
103
102
|
saveWorkflowToProject,
|
|
104
103
|
workflowExists
|
|
105
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-O63CDVNI.js";
|
|
106
105
|
import {
|
|
107
106
|
getSessionDisabledServers,
|
|
108
107
|
setSessionDisabledServers
|
|
109
|
-
} from "./chunk-
|
|
108
|
+
} from "./chunk-YBOU4ZFD.js";
|
|
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";
|
|
110
121
|
import {
|
|
111
122
|
emitAssistantMessageStart,
|
|
112
123
|
emitContextState,
|
|
@@ -123,7 +134,7 @@ import {
|
|
|
123
134
|
getEventStore,
|
|
124
135
|
getSessionState,
|
|
125
136
|
initEventStore
|
|
126
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-J3IJJ55E.js";
|
|
127
138
|
import {
|
|
128
139
|
clearWorkflowExecution,
|
|
129
140
|
createSession,
|
|
@@ -144,30 +155,18 @@ import {
|
|
|
144
155
|
updateSessionMessageCount,
|
|
145
156
|
updateSessionMetadata,
|
|
146
157
|
updateSessionProvider,
|
|
158
|
+
updateSessionProviderActive,
|
|
147
159
|
updateSessionRunning,
|
|
148
160
|
updateSessionWorkdir,
|
|
149
161
|
updateWorkflowExecutionStatus
|
|
150
|
-
} from "./chunk-
|
|
151
|
-
import {
|
|
152
|
-
createContextStateMessage,
|
|
153
|
-
toClientSession
|
|
154
|
-
} from "./chunk-XAAEP5XM.js";
|
|
162
|
+
} from "./chunk-SLW3KKPP.js";
|
|
155
163
|
import {
|
|
156
164
|
getPathSeparator,
|
|
157
165
|
isAbsolutePath
|
|
158
|
-
} from "./chunk-
|
|
159
|
-
import {
|
|
160
|
-
EventEmitter
|
|
161
|
-
} from "./chunk-JURM3RPZ.js";
|
|
162
|
-
import {
|
|
163
|
-
getAgentModelOverride,
|
|
164
|
-
getAgentModelOverrides,
|
|
165
|
-
resolveLLMClientForAgent,
|
|
166
|
-
setAgentModelOverride
|
|
167
|
-
} from "./chunk-JLAR2CMV.js";
|
|
166
|
+
} from "./chunk-EZ67GBEO.js";
|
|
168
167
|
import {
|
|
169
168
|
VERSION
|
|
170
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-OBB3JYMK.js";
|
|
171
170
|
import {
|
|
172
171
|
agentExists,
|
|
173
172
|
deleteAgent,
|
|
@@ -184,7 +183,7 @@ import {
|
|
|
184
183
|
saveAgent,
|
|
185
184
|
saveAgentToProject,
|
|
186
185
|
setRuntimeConfig
|
|
187
|
-
} from "./chunk-
|
|
186
|
+
} from "./chunk-2N7KFNMY.js";
|
|
188
187
|
import {
|
|
189
188
|
findFileByInternalId,
|
|
190
189
|
pathExists
|
|
@@ -193,13 +192,13 @@ import {
|
|
|
193
192
|
getProject,
|
|
194
193
|
getProjectByWorkdir,
|
|
195
194
|
updateProject
|
|
196
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-DIALH34K.js";
|
|
197
196
|
import {
|
|
198
197
|
createProviderManager,
|
|
199
198
|
detectModel,
|
|
200
199
|
getLlmStatus,
|
|
201
200
|
parseDefaultModelSelection
|
|
202
|
-
} from "./chunk-
|
|
201
|
+
} from "./chunk-UJRWYZHM.js";
|
|
203
202
|
import {
|
|
204
203
|
getModelProfile
|
|
205
204
|
} from "./chunk-GJL3QSMP.js";
|
|
@@ -212,15 +211,15 @@ import {
|
|
|
212
211
|
import {
|
|
213
212
|
SessionNotFoundError,
|
|
214
213
|
WorkspaceInUseError
|
|
215
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-POTCPZJF.js";
|
|
216
215
|
import {
|
|
217
216
|
deleteSetting,
|
|
218
217
|
getSetting,
|
|
219
218
|
setSetting
|
|
220
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-FGVMRFDW.js";
|
|
221
220
|
import {
|
|
222
221
|
initDatabase
|
|
223
|
-
} from "./chunk-
|
|
222
|
+
} from "./chunk-NYQKSKDB.js";
|
|
224
223
|
import {
|
|
225
224
|
logger,
|
|
226
225
|
setLogLevel
|
|
@@ -2782,15 +2781,43 @@ var SessionManager = class {
|
|
|
2782
2781
|
}
|
|
2783
2782
|
return resolved.client;
|
|
2784
2783
|
}
|
|
2785
|
-
|
|
2784
|
+
/**
|
|
2785
|
+
* Resolve the effective provider/model for a session.
|
|
2786
|
+
*
|
|
2787
|
+
* Precedence: agent model override > session preference > global default.
|
|
2788
|
+
* The session preference is the user's sticky manual pick (written only by an
|
|
2789
|
+
* explicit pick) — agent overrides and the effective model are never written
|
|
2790
|
+
* into it. The global default comes from config (pure), never from the provider
|
|
2791
|
+
* manager's active state, so a stale override never lingers.
|
|
2792
|
+
*
|
|
2793
|
+
* When `agentId` is omitted, the current session mode's agent override applies.
|
|
2794
|
+
*/
|
|
2795
|
+
resolveEffectiveProviderModel(sessionId, agentId) {
|
|
2796
|
+
const dbSession = getSession(sessionId);
|
|
2797
|
+
if (dbSession?.providerManual && dbSession?.providerManualActive && dbSession.providerId && dbSession.providerModel) {
|
|
2798
|
+
return { providerId: dbSession.providerId, model: dbSession.providerModel };
|
|
2799
|
+
}
|
|
2800
|
+
const mode = agentId ?? dbSession?.mode ?? void 0;
|
|
2801
|
+
const override = mode ? getAgentModelOverride(mode) : void 0;
|
|
2802
|
+
if (override) {
|
|
2803
|
+
return { providerId: override.providerId, model: override.model };
|
|
2804
|
+
}
|
|
2805
|
+
if (dbSession?.providerId && dbSession?.providerModel) {
|
|
2806
|
+
return { providerId: dbSession.providerId, model: dbSession.providerModel };
|
|
2807
|
+
}
|
|
2808
|
+
const { providerId, model } = parseDefaultModelSelection(this.providerManager.getDefaultModelSelection());
|
|
2809
|
+
if (providerId && model) {
|
|
2810
|
+
return { providerId, model };
|
|
2811
|
+
}
|
|
2812
|
+
return { providerId: null, model: null };
|
|
2813
|
+
}
|
|
2814
|
+
getCurrentModelSettings(sessionId, agentId) {
|
|
2786
2815
|
let providerId;
|
|
2787
2816
|
let model;
|
|
2788
2817
|
if (sessionId) {
|
|
2789
|
-
const
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
model = session.providerModel;
|
|
2793
|
-
}
|
|
2818
|
+
const effective = this.resolveEffectiveProviderModel(sessionId, agentId);
|
|
2819
|
+
providerId = effective.providerId ?? void 0;
|
|
2820
|
+
model = effective.model ?? void 0;
|
|
2794
2821
|
}
|
|
2795
2822
|
if (!providerId || !model) {
|
|
2796
2823
|
model = this.providerManager.getCurrentModel();
|
|
@@ -2799,9 +2826,10 @@ var SessionManager = class {
|
|
|
2799
2826
|
if (!model || !providerId) return void 0;
|
|
2800
2827
|
return this.providerManager.getModelSettings(providerId, model);
|
|
2801
2828
|
}
|
|
2802
|
-
getCurrentModelContext(sessionId) {
|
|
2829
|
+
getCurrentModelContext(sessionId, agentId) {
|
|
2803
2830
|
if (sessionId) {
|
|
2804
|
-
const
|
|
2831
|
+
const { providerId, model } = this.resolveEffectiveProviderModel(sessionId, agentId);
|
|
2832
|
+
const sessionContext = this.resolveModelContext(providerId, model);
|
|
2805
2833
|
if (sessionContext !== void 0) return sessionContext;
|
|
2806
2834
|
}
|
|
2807
2835
|
return this.providerManager.getCurrentModelContext();
|
|
@@ -2812,17 +2840,6 @@ var SessionManager = class {
|
|
|
2812
2840
|
* Returns undefined when the session has no model or no matching config —
|
|
2813
2841
|
* callers fall back to the global default context.
|
|
2814
2842
|
*/
|
|
2815
|
-
getSessionModelContext(sessionId) {
|
|
2816
|
-
const session = this.getSession(sessionId);
|
|
2817
|
-
if (!session?.providerId || !session.providerModel) return void 0;
|
|
2818
|
-
return this.resolveModelContext(session.providerId, session.providerModel);
|
|
2819
|
-
}
|
|
2820
|
-
/**
|
|
2821
|
-
* Resolve a provider/model pair's context window (exact, then fuzzy match).
|
|
2822
|
-
* Takes provider/model directly so callers with a raw DB session (e.g.
|
|
2823
|
-
* buildSessionFromDb) can use it without going through getSession, which
|
|
2824
|
-
* would recurse back into this class's session building.
|
|
2825
|
-
*/
|
|
2826
2843
|
resolveModelContext(providerId, providerModel) {
|
|
2827
2844
|
if (!providerId || !providerModel) return void 0;
|
|
2828
2845
|
const provider = this.providerManager.getProviders().find((p) => p.id === providerId);
|
|
@@ -2838,12 +2855,10 @@ var SessionManager = class {
|
|
|
2838
2855
|
}
|
|
2839
2856
|
return modelConfig?.contextWindow;
|
|
2840
2857
|
}
|
|
2841
|
-
getModelCompactionThreshold(sessionId) {
|
|
2842
|
-
const
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
if (!providerId || !modelId) return void 0;
|
|
2846
|
-
return this.providerManager.getProviders().find((provider) => provider.id === providerId)?.models.find((model) => model.id === modelId)?.compactionThreshold;
|
|
2858
|
+
getModelCompactionThreshold(sessionId, agentId) {
|
|
2859
|
+
const { providerId, model } = this.resolveEffectiveProviderModel(sessionId, agentId);
|
|
2860
|
+
if (!providerId || !model) return void 0;
|
|
2861
|
+
return this.providerManager.getProviders().find((provider) => provider.id === providerId)?.models.find((modelConfig) => modelConfig.id === model)?.compactionThreshold;
|
|
2847
2862
|
}
|
|
2848
2863
|
/**
|
|
2849
2864
|
* Get the effective working directory for a session.
|
|
@@ -3073,6 +3088,7 @@ var SessionManager = class {
|
|
|
3073
3088
|
}
|
|
3074
3089
|
logger.debug("Changing session mode", { sessionId, from: fromMode, to: toMode });
|
|
3075
3090
|
emitModeChanged(sessionId, toMode, false);
|
|
3091
|
+
this.setSessionProviderActive(sessionId, !getAgentModelOverride(toMode));
|
|
3076
3092
|
const updatedSession = this.requireSession(sessionId);
|
|
3077
3093
|
this.emit({ type: "mode_changed", sessionId, from: fromMode, to: toMode });
|
|
3078
3094
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
@@ -3142,13 +3158,24 @@ var SessionManager = class {
|
|
|
3142
3158
|
/**
|
|
3143
3159
|
* Set session provider/model. Updates DB directly.
|
|
3144
3160
|
*/
|
|
3145
|
-
setSessionProvider(sessionId, providerId, providerModel) {
|
|
3161
|
+
setSessionProvider(sessionId, providerId, providerModel, providerManual) {
|
|
3146
3162
|
logger.debug("Setting session provider", { sessionId, providerId, providerModel });
|
|
3147
|
-
updateSessionProvider(sessionId, providerId, providerModel);
|
|
3163
|
+
updateSessionProvider(sessionId, providerId, providerModel, providerManual);
|
|
3148
3164
|
const updatedSession = this.requireSession(sessionId);
|
|
3149
3165
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
3150
3166
|
return updatedSession;
|
|
3151
3167
|
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Toggle whether the manual pick is currently active (does NOT emit — used as
|
|
3170
|
+
* part of larger operations such as mode switches, which emit their own event).
|
|
3171
|
+
* Selecting an agent with a model override deactivates the manual pick so the
|
|
3172
|
+
* agent's override (its label) wins; a fresh pick or a non-override agent
|
|
3173
|
+
* reactivates it.
|
|
3174
|
+
*/
|
|
3175
|
+
setSessionProviderActive(sessionId, active) {
|
|
3176
|
+
logger.debug("Setting session provider manual-active", { sessionId, active });
|
|
3177
|
+
updateSessionProviderActive(sessionId, active);
|
|
3178
|
+
}
|
|
3152
3179
|
// ============================================================================
|
|
3153
3180
|
// Workflow Execution
|
|
3154
3181
|
// ============================================================================
|
|
@@ -3762,9 +3789,9 @@ var SessionManager = class {
|
|
|
3762
3789
|
* Get the current context state for a session.
|
|
3763
3790
|
*/
|
|
3764
3791
|
getContextState(sessionId) {
|
|
3765
|
-
const session = this.getSession(sessionId);
|
|
3766
3792
|
const providerManager = this.providerManager;
|
|
3767
|
-
const
|
|
3793
|
+
const { providerId, model } = this.resolveEffectiveProviderModel(sessionId);
|
|
3794
|
+
const maxTokens = providerId && model ? this.resolveModelContext(providerId, model) ?? providerManager.getCurrentModelContext() : providerManager.getCurrentModelContext();
|
|
3768
3795
|
const state = getSessionState(sessionId, maxTokens);
|
|
3769
3796
|
const dynamicContextChanged = this.getDynamicContextChanged(sessionId);
|
|
3770
3797
|
const debugDump = this.debugDumpStore.get(sessionId);
|
|
@@ -5964,7 +5991,7 @@ async function createServerHandle(config3) {
|
|
|
5964
5991
|
toolRegistry = createToolRegistry();
|
|
5965
5992
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5966
5993
|
}
|
|
5967
|
-
const { signalMcpReady } = await import("./server-
|
|
5994
|
+
const { signalMcpReady } = await import("./server-EIRLWSBZ.js");
|
|
5968
5995
|
signalMcpReady();
|
|
5969
5996
|
});
|
|
5970
5997
|
const app = express();
|
|
@@ -6047,7 +6074,7 @@ async function createServerHandle(config3) {
|
|
|
6047
6074
|
res.json({ tools });
|
|
6048
6075
|
});
|
|
6049
6076
|
app.get("/api/projects", async (_req, res) => {
|
|
6050
|
-
const { listProjects: listProjects2 } = await import("./projects-
|
|
6077
|
+
const { listProjects: listProjects2 } = await import("./projects-FHRTSV6N.js");
|
|
6051
6078
|
const projects = listProjects2();
|
|
6052
6079
|
res.json({ projects });
|
|
6053
6080
|
});
|
|
@@ -6056,7 +6083,7 @@ async function createServerHandle(config3) {
|
|
|
6056
6083
|
if (!name || !workdir) {
|
|
6057
6084
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
6058
6085
|
}
|
|
6059
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
6086
|
+
const { createDirectoryWithGit } = await import("./project-creator-J4ITWDZI.js");
|
|
6060
6087
|
try {
|
|
6061
6088
|
const project = await createDirectoryWithGit(name, workdir);
|
|
6062
6089
|
res.status(201).json({ project });
|
|
@@ -6101,7 +6128,7 @@ async function createServerHandle(config3) {
|
|
|
6101
6128
|
}
|
|
6102
6129
|
});
|
|
6103
6130
|
app.get("/api/projects/:id", async (req, res) => {
|
|
6104
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6131
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6105
6132
|
const project = getProject2(req.params.id);
|
|
6106
6133
|
if (!project) {
|
|
6107
6134
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6109,7 +6136,7 @@ async function createServerHandle(config3) {
|
|
|
6109
6136
|
res.json({ project });
|
|
6110
6137
|
});
|
|
6111
6138
|
app.get("/api/projects/:id/open-folder", async (req, res) => {
|
|
6112
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6139
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6113
6140
|
const project = getProject2(req.params.id);
|
|
6114
6141
|
if (!project) {
|
|
6115
6142
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6123,7 +6150,7 @@ async function createServerHandle(config3) {
|
|
|
6123
6150
|
}
|
|
6124
6151
|
});
|
|
6125
6152
|
app.put("/api/projects/:id", async (req, res) => {
|
|
6126
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
6153
|
+
const { updateProject: updateProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6127
6154
|
const { name, customInstructions, dangerLevel, defaultAgent } = req.body;
|
|
6128
6155
|
const updates = {};
|
|
6129
6156
|
if (name !== void 0) updates.name = name;
|
|
@@ -6137,7 +6164,7 @@ async function createServerHandle(config3) {
|
|
|
6137
6164
|
res.json({ project: updated });
|
|
6138
6165
|
});
|
|
6139
6166
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
6140
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
6167
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-FHRTSV6N.js");
|
|
6141
6168
|
const project = getProject2(req.params.id);
|
|
6142
6169
|
if (!project) {
|
|
6143
6170
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6146,7 +6173,7 @@ async function createServerHandle(config3) {
|
|
|
6146
6173
|
res.json({ success: true });
|
|
6147
6174
|
});
|
|
6148
6175
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
6149
|
-
const { toggleStar } = await import("./projects-
|
|
6176
|
+
const { toggleStar } = await import("./projects-FHRTSV6N.js");
|
|
6150
6177
|
const { isStarred } = req.body;
|
|
6151
6178
|
if (typeof isStarred !== "boolean") {
|
|
6152
6179
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -6160,9 +6187,9 @@ async function createServerHandle(config3) {
|
|
|
6160
6187
|
const sessionFavoriteRouter = express.Router();
|
|
6161
6188
|
registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
|
|
6162
6189
|
app.use("/api", sessionFavoriteRouter);
|
|
6163
|
-
const { createTasksService } = await import("./service-
|
|
6164
|
-
const { registerTaskRoutes } = await import("./tasks-
|
|
6165
|
-
const { setTasksService } = await import("./tools-
|
|
6190
|
+
const { createTasksService } = await import("./service-HX5NFX2D.js");
|
|
6191
|
+
const { registerTaskRoutes } = await import("./tasks-A25JQ4TV.js");
|
|
6192
|
+
const { setTasksService } = await import("./tools-YGJXEEBI.js");
|
|
6166
6193
|
const tasksService = createTasksService({
|
|
6167
6194
|
sessionManager,
|
|
6168
6195
|
config: config3,
|
|
@@ -6175,26 +6202,26 @@ async function createServerHandle(config3) {
|
|
|
6175
6202
|
registerTaskRoutes(tasksRouter, tasksService);
|
|
6176
6203
|
app.use("/api", tasksRouter);
|
|
6177
6204
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
6178
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6205
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6179
6206
|
const project = getProject2(req.params.id);
|
|
6180
6207
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6181
|
-
const { listBranches } = await import("./workspace-
|
|
6208
|
+
const { listBranches } = await import("./workspace-ZNZFEONU.js");
|
|
6182
6209
|
const branches = await listBranches(project.workdir);
|
|
6183
6210
|
res.json({ branches });
|
|
6184
6211
|
});
|
|
6185
6212
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
6186
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6213
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6187
6214
|
const project = getProject2(req.params.id);
|
|
6188
6215
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6189
6216
|
const { branch } = req.body;
|
|
6190
6217
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6191
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
6218
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-ZNZFEONU.js");
|
|
6192
6219
|
if (!await isGitRepository(project.workdir)) {
|
|
6193
6220
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6194
6221
|
}
|
|
6195
6222
|
try {
|
|
6196
6223
|
await checkoutBranch(project.workdir, branch);
|
|
6197
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6224
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-XFNU4DZ6.js");
|
|
6198
6225
|
const allSessions = sessionManager.listSessions();
|
|
6199
6226
|
for (const s of allSessions) {
|
|
6200
6227
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6208,12 +6235,12 @@ async function createServerHandle(config3) {
|
|
|
6208
6235
|
}
|
|
6209
6236
|
});
|
|
6210
6237
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
6211
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6238
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6212
6239
|
const project = getProject2(req.params.id);
|
|
6213
6240
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6214
6241
|
const { name, sourceBranch } = req.body;
|
|
6215
6242
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6216
|
-
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-
|
|
6243
|
+
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-ZNZFEONU.js");
|
|
6217
6244
|
if (!await isGitRepository(project.workdir)) {
|
|
6218
6245
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6219
6246
|
}
|
|
@@ -6230,7 +6257,7 @@ async function createServerHandle(config3) {
|
|
|
6230
6257
|
);
|
|
6231
6258
|
}
|
|
6232
6259
|
await createBranch(project.workdir, name, sb);
|
|
6233
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6260
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-XFNU4DZ6.js");
|
|
6234
6261
|
const allSessions = sessionManager.listSessions();
|
|
6235
6262
|
for (const s of allSessions) {
|
|
6236
6263
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6247,7 +6274,7 @@ async function createServerHandle(config3) {
|
|
|
6247
6274
|
const session = sessionManager.getSession(req.params.id);
|
|
6248
6275
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
6249
6276
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6250
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
6277
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-ZNZFEONU.js");
|
|
6251
6278
|
const [branches, defaultBranch] = await Promise.all([
|
|
6252
6279
|
listBranches(effectiveWorkdir),
|
|
6253
6280
|
getDefaultBranch(session.workdir)
|
|
@@ -6261,8 +6288,8 @@ async function createServerHandle(config3) {
|
|
|
6261
6288
|
const { branch } = req.body;
|
|
6262
6289
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6263
6290
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6264
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
6265
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6291
|
+
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-ZNZFEONU.js");
|
|
6292
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-XFNU4DZ6.js");
|
|
6266
6293
|
try {
|
|
6267
6294
|
await validateRef2(effectiveWorkdir, branch);
|
|
6268
6295
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -6304,16 +6331,16 @@ All file and git operations should use this branch.
|
|
|
6304
6331
|
const { name, sourceBranch } = req.body;
|
|
6305
6332
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6306
6333
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6307
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
6308
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6334
|
+
const { validateRef: validateRef2 } = await import("./workspace-ZNZFEONU.js");
|
|
6335
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-XFNU4DZ6.js");
|
|
6309
6336
|
try {
|
|
6310
6337
|
await validateRef2(effectiveWorkdir, name);
|
|
6311
6338
|
if (sourceBranch) {
|
|
6312
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6339
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-ZNZFEONU.js");
|
|
6313
6340
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
6314
6341
|
await createBranch(effectiveWorkdir, name, sb);
|
|
6315
6342
|
} else {
|
|
6316
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6343
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-ZNZFEONU.js");
|
|
6317
6344
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
6318
6345
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
6319
6346
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -6351,17 +6378,17 @@ All file and git operations should use this branch.
|
|
|
6351
6378
|
}
|
|
6352
6379
|
});
|
|
6353
6380
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
6354
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6381
|
+
const { getProject: getProject2 } = await import("./projects-FHRTSV6N.js");
|
|
6355
6382
|
const project = getProject2(req.params.id);
|
|
6356
6383
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6357
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6384
|
+
const { listWorkspaces } = await import("./workspace-ZNZFEONU.js");
|
|
6358
6385
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
6359
6386
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
6360
6387
|
res.json({ workspaces: workspacesList });
|
|
6361
6388
|
});
|
|
6362
6389
|
app.get("/api/sessions", async (req, res) => {
|
|
6363
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6364
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6390
|
+
const { getRecentUserPromptsForSession } = await import("./events-6P4TDTSD.js");
|
|
6391
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-JUF56IB6.js");
|
|
6365
6392
|
const projectId = req.query["projectId"];
|
|
6366
6393
|
const rawLimit = req.query["limit"];
|
|
6367
6394
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6416,7 +6443,7 @@ All file and git operations should use this branch.
|
|
|
6416
6443
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
6417
6444
|
}
|
|
6418
6445
|
if (disabledServers.length > 0) {
|
|
6419
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6446
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-EOKSZO2X.js");
|
|
6420
6447
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
6421
6448
|
}
|
|
6422
6449
|
} catch {
|
|
@@ -6453,7 +6480,7 @@ All file and git operations should use this branch.
|
|
|
6453
6480
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6454
6481
|
const project = sessionManager.getProject(session.projectId);
|
|
6455
6482
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6456
|
-
const { isGitRepository } = await import("./workspace-
|
|
6483
|
+
const { isGitRepository } = await import("./workspace-ZNZFEONU.js");
|
|
6457
6484
|
if (!await isGitRepository(project.workdir)) {
|
|
6458
6485
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6459
6486
|
}
|
|
@@ -6471,7 +6498,7 @@ All file and git operations should use this branch.
|
|
|
6471
6498
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6472
6499
|
const project = sessionManager.getProject(session.projectId);
|
|
6473
6500
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6474
|
-
const { isGitRepository } = await import("./workspace-
|
|
6501
|
+
const { isGitRepository } = await import("./workspace-ZNZFEONU.js");
|
|
6475
6502
|
if (!await isGitRepository(project.workdir)) {
|
|
6476
6503
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6477
6504
|
}
|
|
@@ -6489,23 +6516,14 @@ All file and git operations should use this branch.
|
|
|
6489
6516
|
}
|
|
6490
6517
|
});
|
|
6491
6518
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6492
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6493
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6494
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6495
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6496
|
-
const
|
|
6497
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6498
|
-
let session = sessionManager.getSession(req.params.id);
|
|
6519
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-6P4TDTSD.js");
|
|
6520
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-3LA2WX2B.js");
|
|
6521
|
+
const { getPendingQuestionsForSession } = await import("./tools-YGJXEEBI.js");
|
|
6522
|
+
const { getMaxVisibleItems } = await import("./settings-SYYDPV43.js");
|
|
6523
|
+
const session = sessionManager.getSession(req.params.id);
|
|
6499
6524
|
if (!session) {
|
|
6500
6525
|
return res.status(404).json({ error: "Session not found" });
|
|
6501
6526
|
}
|
|
6502
|
-
if (!session.providerId && session.mode) {
|
|
6503
|
-
const override = getAgentModelOverride2(session.mode);
|
|
6504
|
-
if (override) {
|
|
6505
|
-
updateSessionProvider2(session.id, override.providerId, override.model);
|
|
6506
|
-
session = sessionManager.getSession(session.id);
|
|
6507
|
-
}
|
|
6508
|
-
}
|
|
6509
6527
|
const eventStore = getEventStore2();
|
|
6510
6528
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(req.params.id);
|
|
6511
6529
|
const events = combineEventsWithSnapshot(req.params.id, snapshot, eventsSinceSnapshot);
|
|
@@ -6529,9 +6547,9 @@ All file and git operations should use this branch.
|
|
|
6529
6547
|
});
|
|
6530
6548
|
app.get("/api/sessions/:id/status", async (req, res) => {
|
|
6531
6549
|
const { projectSessionStatus } = await import("./session-status-6Q5B5PEN.js");
|
|
6532
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6533
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6534
|
-
const { foldPendingConfirmations } = await import("./folding-
|
|
6550
|
+
const { getPendingQuestionsForSession } = await import("./tools-YGJXEEBI.js");
|
|
6551
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-6P4TDTSD.js");
|
|
6552
|
+
const { foldPendingConfirmations } = await import("./folding-3LA2WX2B.js");
|
|
6535
6553
|
const sessionId = req.params["id"];
|
|
6536
6554
|
if (!sessionId) {
|
|
6537
6555
|
return res.status(400).json({ error: "Session id is required" });
|
|
@@ -6561,8 +6579,8 @@ All file and git operations should use this branch.
|
|
|
6561
6579
|
if (!session) {
|
|
6562
6580
|
return res.status(404).json({ error: "Session not found" });
|
|
6563
6581
|
}
|
|
6564
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6565
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6582
|
+
const { stopSessionExecution } = await import("./chat-handler-A5ORR5BB.js");
|
|
6583
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YGJXEEBI.js");
|
|
6566
6584
|
sessionManager.clearMessageQueue(sessionId);
|
|
6567
6585
|
stopSessionExecution(sessionId, sessionManager);
|
|
6568
6586
|
abortSession(sessionId);
|
|
@@ -6591,9 +6609,9 @@ All file and git operations should use this branch.
|
|
|
6591
6609
|
res.json({ success: true });
|
|
6592
6610
|
});
|
|
6593
6611
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6594
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6595
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6596
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6612
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-6P4TDTSD.js");
|
|
6613
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-3LA2WX2B.js");
|
|
6614
|
+
const { getMaxVisibleItems } = await import("./settings-SYYDPV43.js");
|
|
6597
6615
|
const sessionId = req.params.id;
|
|
6598
6616
|
const session = sessionManager.getSession(sessionId);
|
|
6599
6617
|
if (!session) {
|
|
@@ -6605,7 +6623,8 @@ All file and git operations should use this branch.
|
|
|
6605
6623
|
}
|
|
6606
6624
|
const provider = providerManager.getProviders().find((p) => p.id === providerId);
|
|
6607
6625
|
const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
|
|
6608
|
-
sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
|
|
6626
|
+
sessionManager.setSessionProvider(sessionId, providerId, resolvedModel, true);
|
|
6627
|
+
sessionManager.setSessionProviderActive(sessionId, true);
|
|
6609
6628
|
const contextState = sessionManager.getContextState(sessionId);
|
|
6610
6629
|
const eventStore = getEventStore2();
|
|
6611
6630
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
@@ -6615,6 +6634,25 @@ All file and git operations should use this branch.
|
|
|
6615
6634
|
const updatedSession = sessionManager.getSession(sessionId);
|
|
6616
6635
|
res.json({ session: toClientSession(updatedSession), messages, hiddenCount, contextState });
|
|
6617
6636
|
});
|
|
6637
|
+
app.delete("/api/sessions/:id/provider", async (req, res) => {
|
|
6638
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-6P4TDTSD.js");
|
|
6639
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-3LA2WX2B.js");
|
|
6640
|
+
const { getMaxVisibleItems } = await import("./settings-SYYDPV43.js");
|
|
6641
|
+
const sessionId = req.params.id;
|
|
6642
|
+
const session = sessionManager.getSession(sessionId);
|
|
6643
|
+
if (!session) {
|
|
6644
|
+
return res.status(404).json({ error: "Session not found" });
|
|
6645
|
+
}
|
|
6646
|
+
sessionManager.setSessionProvider(sessionId, null, null, false);
|
|
6647
|
+
sessionManager.setSessionProviderActive(sessionId, true);
|
|
6648
|
+
const eventStore = getEventStore2();
|
|
6649
|
+
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6650
|
+
const events = combineEv(sessionId, snapshot, eventsSinceSnapshot);
|
|
6651
|
+
const maxVisibleItems = getMaxVisibleItems();
|
|
6652
|
+
const { messages, hiddenCount } = buildMessagesFromStoredEvents(events, maxVisibleItems || void 0);
|
|
6653
|
+
const updatedSession = sessionManager.getSession(sessionId);
|
|
6654
|
+
res.json({ session: toClientSession(updatedSession), messages, hiddenCount });
|
|
6655
|
+
});
|
|
6618
6656
|
app.post("/api/default-model", async (req, res) => {
|
|
6619
6657
|
const { providerId, model } = req.body;
|
|
6620
6658
|
if (!providerId || !model) {
|
|
@@ -6706,11 +6744,9 @@ All file and git operations should use this branch.
|
|
|
6706
6744
|
res.json({ success: true });
|
|
6707
6745
|
});
|
|
6708
6746
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6709
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6710
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6711
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6712
|
-
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
|
|
6713
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6747
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-6P4TDTSD.js");
|
|
6748
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-3LA2WX2B.js");
|
|
6749
|
+
const { getMaxVisibleItems } = await import("./settings-SYYDPV43.js");
|
|
6714
6750
|
const sessionId = req.params.id;
|
|
6715
6751
|
const session = sessionManager.getSession(sessionId);
|
|
6716
6752
|
if (!session) {
|
|
@@ -6726,22 +6762,6 @@ All file and git operations should use this branch.
|
|
|
6726
6762
|
return res.status(400).json({ error: `Invalid mode. Must be one of: ${topLevelIds.join(", ")}` });
|
|
6727
6763
|
}
|
|
6728
6764
|
sessionManager.setMode(sessionId, mode);
|
|
6729
|
-
const override = getAgentModelOverride2(mode);
|
|
6730
|
-
if (override) {
|
|
6731
|
-
updateSessionProvider2(sessionId, override.providerId, override.model);
|
|
6732
|
-
} else {
|
|
6733
|
-
updateSessionProvider2(sessionId, null, null);
|
|
6734
|
-
const { providerId: defaultProviderId, model: defaultModel } = parseDefaultModelSelection(
|
|
6735
|
-
config3.defaultModelSelection
|
|
6736
|
-
);
|
|
6737
|
-
if (defaultProviderId && defaultModel) {
|
|
6738
|
-
const currentActiveProviderId = providerManager.getActiveProviderId();
|
|
6739
|
-
const currentModel = providerManager.getCurrentModel();
|
|
6740
|
-
if (currentActiveProviderId !== defaultProviderId || currentModel !== defaultModel) {
|
|
6741
|
-
await providerManager.activateProvider(defaultProviderId, { model: defaultModel });
|
|
6742
|
-
}
|
|
6743
|
-
}
|
|
6744
|
-
}
|
|
6745
6765
|
const eventStore = getEventStore2();
|
|
6746
6766
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6747
6767
|
const events = combineEv(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6812,7 +6832,7 @@ All file and git operations should use this branch.
|
|
|
6812
6832
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6813
6833
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6814
6834
|
}
|
|
6815
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6835
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-YGJXEEBI.js");
|
|
6816
6836
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6817
6837
|
if (!pendingSessionId) {
|
|
6818
6838
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6824,11 +6844,11 @@ All file and git operations should use this branch.
|
|
|
6824
6844
|
if (!result.found) {
|
|
6825
6845
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6826
6846
|
}
|
|
6827
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6828
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6847
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-6P4TDTSD.js");
|
|
6848
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-3LA2WX2B.js");
|
|
6829
6849
|
const { createSessionStateMessage } = await import("./protocol-TLODRZSB.js");
|
|
6830
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6831
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6850
|
+
const { getPendingQuestionsForSession } = await import("./tools-YGJXEEBI.js");
|
|
6851
|
+
const { getMaxVisibleItems } = await import("./settings-SYYDPV43.js");
|
|
6832
6852
|
const eventStore = getEventStore2();
|
|
6833
6853
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6834
6854
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6865,7 +6885,7 @@ All file and git operations should use this branch.
|
|
|
6865
6885
|
if (!skip && typeof answer !== "string") {
|
|
6866
6886
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6867
6887
|
}
|
|
6868
|
-
const { provideAnswer } = await import("./tools-
|
|
6888
|
+
const { provideAnswer } = await import("./tools-YGJXEEBI.js");
|
|
6869
6889
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6870
6890
|
if (!found) {
|
|
6871
6891
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6898,7 +6918,7 @@ All file and git operations should use this branch.
|
|
|
6898
6918
|
if (!session) {
|
|
6899
6919
|
return res.status(404).json({ error: "Session not found" });
|
|
6900
6920
|
}
|
|
6901
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6921
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-SYYDPV43.js");
|
|
6902
6922
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6903
6923
|
return res.json({ success: false, reason: "disabled" });
|
|
6904
6924
|
}
|
|
@@ -6908,15 +6928,16 @@ All file and git operations should use this branch.
|
|
|
6908
6928
|
if (sessionManager.isWarmedUp(sessionId)) {
|
|
6909
6929
|
return res.json({ success: false, reason: "already_warmed" });
|
|
6910
6930
|
}
|
|
6911
|
-
|
|
6931
|
+
const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
|
|
6932
|
+
if (effective.providerId && effective.model) {
|
|
6912
6933
|
const currentActiveProviderId = providerManager.getActiveProviderId();
|
|
6913
6934
|
const currentModel = providerManager.getCurrentModel();
|
|
6914
|
-
if (currentActiveProviderId !==
|
|
6915
|
-
const result = await providerManager.activateProvider(
|
|
6935
|
+
if (currentActiveProviderId !== effective.providerId || currentModel !== effective.model) {
|
|
6936
|
+
const result = await providerManager.activateProvider(effective.providerId, { model: effective.model });
|
|
6916
6937
|
if (!result.success) {
|
|
6917
6938
|
logger.error("Failed to activate session provider for warmup", {
|
|
6918
6939
|
sessionId,
|
|
6919
|
-
providerId:
|
|
6940
|
+
providerId: effective.providerId,
|
|
6920
6941
|
error: result.error
|
|
6921
6942
|
});
|
|
6922
6943
|
}
|
|
@@ -6930,7 +6951,7 @@ All file and git operations should use this branch.
|
|
|
6930
6951
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6931
6952
|
model: llmClient.getModel()
|
|
6932
6953
|
};
|
|
6933
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6954
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-SM3IHZFP.js");
|
|
6934
6955
|
runAgentTurn(
|
|
6935
6956
|
{
|
|
6936
6957
|
sessionManager,
|
|
@@ -6968,15 +6989,15 @@ All file and git operations should use this branch.
|
|
|
6968
6989
|
if (!session) {
|
|
6969
6990
|
return res.status(404).json({ error: "Session not found" });
|
|
6970
6991
|
}
|
|
6971
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6972
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6992
|
+
const { stopSessionExecution } = await import("./chat-handler-A5ORR5BB.js");
|
|
6993
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-YGJXEEBI.js");
|
|
6973
6994
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6974
6995
|
sessionManager.clearMessageQueue(sessionId);
|
|
6975
6996
|
stopSessionExecution(sessionId, sessionManager);
|
|
6976
6997
|
abortSession(sessionId);
|
|
6977
6998
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6978
6999
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6979
|
-
const eventStore = (await import("./events-
|
|
7000
|
+
const eventStore = (await import("./events-6P4TDTSD.js")).getEventStore();
|
|
6980
7001
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6981
7002
|
res.json({ success: true, queuedMessages });
|
|
6982
7003
|
});
|
|
@@ -6990,7 +7011,7 @@ All file and git operations should use this branch.
|
|
|
6990
7011
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6991
7012
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6992
7013
|
}
|
|
6993
|
-
const { truncateSessionMessages } = await import("./events-
|
|
7014
|
+
const { truncateSessionMessages } = await import("./events-6P4TDTSD.js");
|
|
6994
7015
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6995
7016
|
res.json({ success: true });
|
|
6996
7017
|
});
|
|
@@ -7010,8 +7031,8 @@ All file and git operations should use this branch.
|
|
|
7010
7031
|
if (attachments !== void 0 && !Array.isArray(attachments)) {
|
|
7011
7032
|
return res.status(400).json({ error: "attachments must be an array if provided" });
|
|
7012
7033
|
}
|
|
7013
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
7014
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
7034
|
+
const { getEventStore: getEventStore2 } = await import("./events-6P4TDTSD.js");
|
|
7035
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-3LA2WX2B.js");
|
|
7015
7036
|
const eventStore = getEventStore2();
|
|
7016
7037
|
const events = eventStore.getEvents(sessionId);
|
|
7017
7038
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -7023,7 +7044,7 @@ All file and git operations should use this branch.
|
|
|
7023
7044
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
7024
7045
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
7025
7046
|
}
|
|
7026
|
-
const { truncateSessionMessages } = await import("./events-
|
|
7047
|
+
const { truncateSessionMessages } = await import("./events-6P4TDTSD.js");
|
|
7027
7048
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
7028
7049
|
sessionManager.queueMessage(
|
|
7029
7050
|
sessionId,
|
|
@@ -7085,7 +7106,7 @@ All file and git operations should use this branch.
|
|
|
7085
7106
|
res.json({ accepted: true });
|
|
7086
7107
|
});
|
|
7087
7108
|
app.get("/api/settings", async (req, res) => {
|
|
7088
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7109
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-SYYDPV43.js");
|
|
7089
7110
|
const keysParam = req.query["keys"];
|
|
7090
7111
|
if (!keysParam) {
|
|
7091
7112
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -7098,19 +7119,19 @@ All file and git operations should use this branch.
|
|
|
7098
7119
|
res.json(result);
|
|
7099
7120
|
});
|
|
7100
7121
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7101
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7122
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-SYYDPV43.js");
|
|
7102
7123
|
const key = req.params.key;
|
|
7103
7124
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7104
7125
|
res.json({ key, value });
|
|
7105
7126
|
});
|
|
7106
7127
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7107
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7128
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-SYYDPV43.js");
|
|
7108
7129
|
const key = req.params.key;
|
|
7109
7130
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7110
7131
|
res.json({ key, value });
|
|
7111
7132
|
});
|
|
7112
7133
|
app.put("/api/settings/:key", async (req, res) => {
|
|
7113
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
7134
|
+
const { setSetting: setSetting2 } = await import("./settings-SYYDPV43.js");
|
|
7114
7135
|
const key = req.params.key;
|
|
7115
7136
|
const { value } = req.body;
|
|
7116
7137
|
if (value === void 0) {
|
|
@@ -7137,7 +7158,7 @@ All file and git operations should use this branch.
|
|
|
7137
7158
|
}
|
|
7138
7159
|
});
|
|
7139
7160
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
7140
|
-
const { listAvailableShells } = await import("./platform-
|
|
7161
|
+
const { listAvailableShells } = await import("./platform-FM57ZJHA.js");
|
|
7141
7162
|
res.json({ shells: listAvailableShells() });
|
|
7142
7163
|
});
|
|
7143
7164
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -7228,7 +7249,7 @@ All file and git operations should use this branch.
|
|
|
7228
7249
|
}));
|
|
7229
7250
|
}
|
|
7230
7251
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7231
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7252
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-SYYDPV43.js");
|
|
7232
7253
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7233
7254
|
if (!proxyUrl) {
|
|
7234
7255
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7320,7 +7341,7 @@ All file and git operations should use this branch.
|
|
|
7320
7341
|
}
|
|
7321
7342
|
});
|
|
7322
7343
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7323
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7344
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-SYYDPV43.js");
|
|
7324
7345
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7325
7346
|
if (!proxyUrl) {
|
|
7326
7347
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7347,7 +7368,7 @@ All file and git operations should use this branch.
|
|
|
7347
7368
|
const backend = req.query["backend"];
|
|
7348
7369
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7349
7370
|
try {
|
|
7350
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
7371
|
+
const { fetchModelsWithContext } = await import("./provider-manager-EDJN6ARI.js");
|
|
7351
7372
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-3YLLEJ2B.js");
|
|
7352
7373
|
const models = await fetchModelsWithContext(
|
|
7353
7374
|
url,
|
|
@@ -7418,7 +7439,7 @@ All file and git operations should use this branch.
|
|
|
7418
7439
|
const { getModelProfile: getModelProfile2 } = await import("./profiles-3YLLEJ2B.js");
|
|
7419
7440
|
const { getBackendCapabilities } = await import("./backend-67OLCS5O.js");
|
|
7420
7441
|
const { buildNonStreamingCreateParams } = await import("./client-pure-QSY7TJGK.js");
|
|
7421
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7442
|
+
const { OpenAIHttpClient } = await import("./http-client-IKOARXI7.js");
|
|
7422
7443
|
const { ensureVersionPrefix } = await import("./url-utils-C5BM7NF7.js");
|
|
7423
7444
|
const profile = getModelProfile2(model);
|
|
7424
7445
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
@@ -7771,7 +7792,7 @@ All file and git operations should use this branch.
|
|
|
7771
7792
|
});
|
|
7772
7793
|
async function rebuildMcpTools() {
|
|
7773
7794
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FJAFLDZA.js");
|
|
7774
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7795
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-YGJXEEBI.js");
|
|
7775
7796
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7776
7797
|
setMcpTools2(mcpTools);
|
|
7777
7798
|
toolRegistry = createToolRegistry();
|
|
@@ -8152,7 +8173,7 @@ All file and git operations should use this branch.
|
|
|
8152
8173
|
res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
|
|
8153
8174
|
}
|
|
8154
8175
|
});
|
|
8155
|
-
const { listProjects } = await import("./projects-
|
|
8176
|
+
const { listProjects } = await import("./projects-FHRTSV6N.js");
|
|
8156
8177
|
const allProjects = listProjects();
|
|
8157
8178
|
const projectDir = allProjects.find(
|
|
8158
8179
|
(p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
|
|
@@ -8179,13 +8200,13 @@ All file and git operations should use this branch.
|
|
|
8179
8200
|
})
|
|
8180
8201
|
);
|
|
8181
8202
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
8182
|
-
const { getSessionProcesses } = await import("./manager-
|
|
8203
|
+
const { getSessionProcesses } = await import("./manager-NFKTUR64.js");
|
|
8183
8204
|
const sessionId = req.params.id;
|
|
8184
8205
|
const processes = getSessionProcesses(sessionId);
|
|
8185
8206
|
res.json({ processes });
|
|
8186
8207
|
});
|
|
8187
8208
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
8188
|
-
const { stopProcess } = await import("./manager-
|
|
8209
|
+
const { stopProcess } = await import("./manager-NFKTUR64.js");
|
|
8189
8210
|
const sessionId = req.params.id;
|
|
8190
8211
|
const processId = req.params.processId;
|
|
8191
8212
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -8325,13 +8346,13 @@ All file and git operations should use this branch.
|
|
|
8325
8346
|
);
|
|
8326
8347
|
const wss = wssExports.wss;
|
|
8327
8348
|
deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
|
|
8328
|
-
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-
|
|
8349
|
+
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-YWXQQWZN.js");
|
|
8329
8350
|
deferTasksLaunchWorkflow = (sessionId, launch) => {
|
|
8330
|
-
const
|
|
8351
|
+
const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
|
|
8331
8352
|
let llmClient = getLLMClient();
|
|
8332
|
-
if (
|
|
8333
|
-
const resolvedModel = providerManager.resolveModel(
|
|
8334
|
-
llmClient = getLLMClientForProvider(
|
|
8353
|
+
if (effective.providerId && effective.model) {
|
|
8354
|
+
const resolvedModel = providerManager.resolveModel(effective.providerId, effective.model);
|
|
8355
|
+
llmClient = getLLMClientForProvider(effective.providerId, resolvedModel ?? effective.model) ?? getLLMClient();
|
|
8335
8356
|
}
|
|
8336
8357
|
const provider = providerManager.getActiveProvider();
|
|
8337
8358
|
const controller = new AbortController();
|
|
@@ -8363,7 +8384,7 @@ All file and git operations should use this branch.
|
|
|
8363
8384
|
const state = sessionManager.getContextState(sessionId);
|
|
8364
8385
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
8365
8386
|
});
|
|
8366
|
-
const { QueueProcessor } = await import("./processor-
|
|
8387
|
+
const { QueueProcessor } = await import("./processor-EUJRA5GW.js");
|
|
8367
8388
|
const queueProcessor = new QueueProcessor({
|
|
8368
8389
|
sessionManager,
|
|
8369
8390
|
providerManager,
|
|
@@ -8407,7 +8428,7 @@ All file and git operations should use this branch.
|
|
|
8407
8428
|
void (async () => {
|
|
8408
8429
|
await devServerManager.stopAll();
|
|
8409
8430
|
await mcpManager.disconnectAll();
|
|
8410
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
8431
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-IDLUAQH5.js");
|
|
8411
8432
|
stopAllInspectProxies();
|
|
8412
8433
|
const { cleanupAllProcesses } = await import("./store-JYPZ2RXB.js");
|
|
8413
8434
|
cleanupAllProcesses();
|
|
@@ -8449,4 +8470,4 @@ export {
|
|
|
8449
8470
|
createServerHandle,
|
|
8450
8471
|
createServer
|
|
8451
8472
|
};
|
|
8452
|
-
//# sourceMappingURL=chunk-
|
|
8473
|
+
//# sourceMappingURL=chunk-KD7JTG42.js.map
|