openfox 2.0.115 → 2.0.116
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/dist/CHANGELOG.md +22 -0
- package/dist/{ask-ZYPCJKZD.js → ask-UBIRH3SO.js} +2 -2
- package/dist/{auth-YY5PJYSC.js → auth-GTGIGX5X.js} +2 -2
- package/dist/{auto-config-T5GR2N6X.js → auto-config-AAUO4PKW.js} +2 -2
- package/dist/{backend-LVYHLGQJ.js → backend-67OLCS5O.js} +2 -2
- package/dist/{branch.api-XVTYACSH.js → branch.api-UMKSQMSA.js} +2 -2
- package/dist/changelog-FZUE6OSG.js +63 -0
- package/dist/{chat-handler-5SP265CR.js → chat-handler-Z6BEY66U.js} +17 -17
- package/dist/{chunk-OCBBAEMT.js → chunk-4E52GUXJ.js} +179 -137
- package/dist/{chunk-I7FY2LTR.js → chunk-4GHLULHB.js} +18 -2
- package/dist/{chunk-JFK4GKQD.js → chunk-4HV3PDEK.js} +58 -90
- package/dist/{chunk-TGLVWAFC.js → chunk-6XHDNSA3.js} +5 -5
- package/dist/{chunk-4H427UBV.js → chunk-AGXJ5O63.js} +2 -2
- package/dist/{chunk-OKVHMKE2.js → chunk-BH3BBUGB.js} +19 -17
- package/dist/{chunk-OCSTEGK7.js → chunk-EQ5CGNOT.js} +2 -2
- package/dist/{chunk-YX3OQBNX.js → chunk-EQ7DK2TG.js} +9 -5
- package/dist/{chunk-BVVCRIVM.js → chunk-GZTMCTUS.js} +3 -3
- package/dist/chunk-HNHSUQCN.js +7 -0
- package/dist/{chunk-3QQAIUZI.js → chunk-HYPXL7K5.js} +175 -30
- package/dist/{chunk-6RGACY4E.js → chunk-HZSKKJHQ.js} +4 -3
- package/dist/{chunk-VWEATA7R.js → chunk-KLQEL2DZ.js} +7 -1
- package/dist/{chunk-JGWHRYWG.js → chunk-MKWS7TQH.js} +2 -2
- package/dist/{chunk-37QLXLML.js → chunk-QJWTBVJO.js} +14 -14
- package/dist/{chunk-6KPJLELC.js → chunk-QQVPUZQB.js} +156 -20
- package/dist/{chunk-TFF5T3K3.js → chunk-SQLJRO3J.js} +3 -3
- package/dist/{chunk-ERNWAKUB.js → chunk-TGVDUK4N.js} +2 -2
- package/dist/{chunk-3NPLERPQ.js → chunk-U4HMAYAD.js} +9 -8
- package/dist/{chunk-V4IE7HJY.js → chunk-W7VIYHPQ.js} +2 -2
- package/dist/{chunk-BWVO5WFK.js → chunk-X3XKYGUN.js} +3 -3
- package/dist/{chunk-5WRI5ZAA.js → chunk-YLJ4XMA6.js} +6 -2
- package/dist/{chunk-X25Q6RAV.js → chunk-ZKLE2Q3I.js} +1 -1
- package/dist/cli/dev.js +3 -3
- package/dist/cli/index.js +3 -3
- package/dist/{client-KE7EDI2D.js → client-KCNTDTIR.js} +4 -4
- package/dist/{client-pure-66Z6FWS6.js → client-pure-B5DHEKQJ.js} +2 -2
- package/dist/command-defaults/mark-done.command.md +6 -6
- package/dist/{compactor-SKVC2VNL.js → compactor-LAXZLPPA.js} +7 -7
- package/dist/{config-EAB3V4QK.js → config-TUCHLIWD.js} +2 -2
- package/dist/{dynamic-context-QNB4ELLP.js → dynamic-context-YHWFFP53.js} +3 -3
- package/dist/{events-5PLO4QJU.js → events-IVPAMMR5.js} +4 -4
- package/dist/{folding-CJWYFUKD.js → folding-RTGU63BW.js} +2 -2
- package/dist/{http-client-KLODRQC2.js → http-client-IPUW2MSW.js} +2 -2
- package/dist/{inspect-proxy-K6QKEYDT.js → inspect-proxy-WPEDMCG7.js} +2 -2
- package/dist/{install-CPOPMCSE.js → install-VA2F6X6Z.js} +2 -2
- package/dist/{launch-EOXVWLOP.js → launch-PAVQAWGP.js} +17 -17
- package/dist/{manager-LZ3JQ443.js → manager-EMLSLMMT.js} +2 -2
- package/dist/{model-overrides-5UVW3KTE.js → model-overrides-7F2EOA4U.js} +2 -2
- package/dist/{oauth-provider-52YILVUJ.js → oauth-provider-DGBC2YM6.js} +2 -2
- package/dist/{oauth-store-XCFXV2VM.js → oauth-store-KECHUT54.js} +2 -2
- package/dist/{openFolder-HX7X356L.js → openFolder-XCMSU3OI.js} +2 -2
- package/dist/{orchestrator-ED3KFPXO.js → orchestrator-CS3KXLZE.js} +16 -16
- package/dist/package.json +5 -2
- package/dist/{path-security-B6EZC63L.js → path-security-JTCHWYG3.js} +7 -7
- package/dist/{paths-F27V3S4I.js → paths-BHR7CZ7I.js} +2 -2
- package/dist/{permissions-K6YEA2ZZ.js → permissions-UKR524ZB.js} +2 -2
- package/dist/{platform-6RPPBHKH.js → platform-ECDDYMAR.js} +2 -2
- package/dist/{processor-226ZOTRI.js → processor-RZD4JRDX.js} +16 -16
- package/dist/profiles-GYHXBWPV.js +10 -0
- package/dist/{project-creator-VBFE35NI.js → project-creator-PMQ65NKN.js} +2 -2
- package/dist/{projects-AXHZOBR2.js → projects-NDPNOV6D.js} +2 -2
- package/dist/{protocol-JdxRpPxM.d.ts → protocol-CfUkCYxF.d.ts} +11 -2
- package/dist/{protocol-RKSWKNXI.js → protocol-HYA5BYVN.js} +8 -4
- package/dist/{provider-DL4ZWQY7.js → provider-Q7J4UFTS.js} +7 -7
- package/dist/{provider-manager-6CLRMGDE.js → provider-manager-TMBO4DFG.js} +5 -5
- package/dist/{pwa-XPHP3PY2.js → pwa-2GRFSXD7.js} +3 -3
- package/dist/{registry-5XI5NDBF.js → registry-5QL3BOWN.js} +2 -2
- package/dist/{serve-DARV4NJG.js → serve-KR22J37W.js} +22 -22
- package/dist/server/index.d.ts +15 -2
- package/dist/server/index.js +21 -21
- package/dist/{server-LQJ7MBDS.js → server-ESKTIZL5.js} +20 -20
- package/dist/{service-4JKTGPRG.js → service-M7XJHAK4.js} +6 -6
- package/dist/{service-CXWJQFOZ.js → service-WKABQHKL.js} +2 -2
- package/dist/{session-overrides-AZKV6BRD.js → session-overrides-CWBKPHMF.js} +4 -4
- package/dist/{sessions-752IZIIK.js → sessions-I7ELDIIP.js} +5 -3
- package/dist/{settings-2AHDKCD7.js → settings-FGXQHKUH.js} +2 -2
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +2 -2
- package/dist/{store-SARB6V2N.js → store-JYPZ2RXB.js} +2 -2
- package/dist/{tasks-XJXHU623.js → tasks-X5H5HM4J.js} +6 -6
- package/dist/{tool-adapter-FEAHWU5C.js → tool-adapter-FJAFLDZA.js} +2 -2
- package/dist/{tools-QYYNFMGU.js → tools-KBS6X3EN.js} +14 -14
- package/dist/{update-2REP2WB6.js → update-TDS6LP5N.js} +4 -4
- package/dist/{update-server-LOOXIXDW.js → update-server-SVPV6ZJZ.js} +2 -2
- package/dist/{url-utils-SAJP7AEX.js → url-utils-C5BM7NF7.js} +2 -2
- package/dist/web/assets/index-ChtRS33s.js +324 -0
- package/dist/web/assets/{index-BmILAZrT.css → index-c43YT-4A.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/workflow-defaults/default.workflow.json +2 -2
- package/dist/{workspace-RMZVTFJD.js → workspace-IQLLHMYR.js} +2 -2
- package/package.json +5 -2
- package/dist/chunk-5V3BF67X.js +0 -7
- package/dist/profiles-5J7F4BML.js +0 -10
- package/dist/web/assets/index-M7ToECa4.js +0 -324
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
terminalManager,
|
|
17
17
|
tokenFromPassword,
|
|
18
18
|
verifyPassword
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BH3BBUGB.js";
|
|
20
20
|
import {
|
|
21
21
|
TEMPLATE_VARIABLES
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-HYPXL7K5.js";
|
|
23
23
|
import {
|
|
24
24
|
createToolRegistry,
|
|
25
25
|
devServerManager,
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
setMcpManagerForTools,
|
|
30
30
|
setMcpTools,
|
|
31
31
|
setNotifyMcpServersChanged
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-4HV3PDEK.js";
|
|
33
33
|
import {
|
|
34
34
|
deleteOwnedSkill,
|
|
35
35
|
deleteProjectSkill,
|
|
@@ -102,11 +102,11 @@ import {
|
|
|
102
102
|
saveWorkflow,
|
|
103
103
|
saveWorkflowToProject,
|
|
104
104
|
workflowExists
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-HZSKKJHQ.js";
|
|
106
106
|
import {
|
|
107
107
|
getSessionDisabledServers,
|
|
108
108
|
setSessionDisabledServers
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-EQ5CGNOT.js";
|
|
110
110
|
import {
|
|
111
111
|
emitAssistantMessageStart,
|
|
112
112
|
emitContextState,
|
|
@@ -123,13 +123,14 @@ import {
|
|
|
123
123
|
getEventStore,
|
|
124
124
|
getSessionState,
|
|
125
125
|
initEventStore
|
|
126
|
-
} from "./chunk-
|
|
126
|
+
} from "./chunk-TGVDUK4N.js";
|
|
127
127
|
import {
|
|
128
128
|
clearWorkflowExecution,
|
|
129
129
|
createSession,
|
|
130
130
|
createWorkflowExecution,
|
|
131
131
|
deleteSession,
|
|
132
132
|
getActiveWorkflowExecution,
|
|
133
|
+
getLatestWorkflowExecution,
|
|
133
134
|
getSession,
|
|
134
135
|
getSessionCachedPrompt,
|
|
135
136
|
listHomeSessions,
|
|
@@ -146,11 +147,11 @@ import {
|
|
|
146
147
|
updateSessionRunning,
|
|
147
148
|
updateSessionWorkdir,
|
|
148
149
|
updateWorkflowExecutionStatus
|
|
149
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-KLQEL2DZ.js";
|
|
150
151
|
import {
|
|
151
152
|
createContextStateMessage,
|
|
152
153
|
toClientSession
|
|
153
|
-
} from "./chunk-
|
|
154
|
+
} from "./chunk-4GHLULHB.js";
|
|
154
155
|
import {
|
|
155
156
|
getPathSeparator,
|
|
156
157
|
isAbsolutePath
|
|
@@ -166,7 +167,7 @@ import {
|
|
|
166
167
|
} from "./chunk-JLAR2CMV.js";
|
|
167
168
|
import {
|
|
168
169
|
VERSION
|
|
169
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-HNHSUQCN.js";
|
|
170
171
|
import {
|
|
171
172
|
agentExists,
|
|
172
173
|
deleteAgent,
|
|
@@ -198,10 +199,10 @@ import {
|
|
|
198
199
|
detectModel,
|
|
199
200
|
getLlmStatus,
|
|
200
201
|
parseDefaultModelSelection
|
|
201
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-GZTMCTUS.js";
|
|
202
203
|
import {
|
|
203
204
|
getModelProfile
|
|
204
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-W7VIYHPQ.js";
|
|
205
206
|
import {
|
|
206
207
|
getBackendDisplayName
|
|
207
208
|
} from "./chunk-AZHWLLPP.js";
|
|
@@ -226,7 +227,7 @@ import {
|
|
|
226
227
|
} from "./chunk-K44MW7JJ.js";
|
|
227
228
|
import {
|
|
228
229
|
createServerMessage
|
|
229
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-ZKLE2Q3I.js";
|
|
230
231
|
import {
|
|
231
232
|
getGlobalConfigDir
|
|
232
233
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -3168,11 +3169,13 @@ var SessionManager = class {
|
|
|
3168
3169
|
this.emit({ type: "session_updated", session: updatedSession });
|
|
3169
3170
|
}
|
|
3170
3171
|
/**
|
|
3171
|
-
* Resume a paused
|
|
3172
|
+
* Resume a paused (waiting) or blocked workflow execution. Flips it back to
|
|
3173
|
+
* 'running' and returns the saved params and step output.
|
|
3172
3174
|
*/
|
|
3173
3175
|
resumeWorkflow(sessionId, executionId, workflowId, workflowName, workflowColor) {
|
|
3174
|
-
const row =
|
|
3176
|
+
const row = getLatestWorkflowExecution(sessionId);
|
|
3175
3177
|
if (!row || row.id !== executionId) return null;
|
|
3178
|
+
if (row.status !== "waiting" && row.status !== "blocked") return null;
|
|
3176
3179
|
updateWorkflowExecutionStatus(executionId, "running", void 0, void 0, void 0, []);
|
|
3177
3180
|
emitWorkflowExecutionChanged(
|
|
3178
3181
|
sessionId,
|
|
@@ -3278,6 +3281,43 @@ var SessionManager = class {
|
|
|
3278
3281
|
updatedAt: row.updated_at
|
|
3279
3282
|
};
|
|
3280
3283
|
}
|
|
3284
|
+
/**
|
|
3285
|
+
* Latest workflow execution for a session regardless of status, mapped to the
|
|
3286
|
+
* shared type. Used to locate a blocked execution when the user retries its
|
|
3287
|
+
* step — blocked rows are excluded from getActiveWorkflowExecution.
|
|
3288
|
+
*/
|
|
3289
|
+
getLatestWorkflowExecution(sessionId) {
|
|
3290
|
+
const row = getLatestWorkflowExecution(sessionId);
|
|
3291
|
+
if (!row) return null;
|
|
3292
|
+
return {
|
|
3293
|
+
id: row.id,
|
|
3294
|
+
sessionId: row.session_id,
|
|
3295
|
+
workflowId: row.workflow_id,
|
|
3296
|
+
workflowName: row.workflow_name,
|
|
3297
|
+
...row.workflow_color ? { workflowColor: row.workflow_color } : {},
|
|
3298
|
+
status: row.status,
|
|
3299
|
+
...row.current_step_id ? { currentStepId: row.current_step_id } : {},
|
|
3300
|
+
...row.current_step_name ? { currentStepName: row.current_step_name } : {},
|
|
3301
|
+
stepOutput: JSON.parse(row.step_output ?? "{}"),
|
|
3302
|
+
params: JSON.parse(row.params ?? "{}"),
|
|
3303
|
+
...row.sub_group ? { subGroup: row.sub_group } : {},
|
|
3304
|
+
...row.pending_choices ? { pendingChoices: JSON.parse(row.pending_choices) } : {},
|
|
3305
|
+
createdAt: row.created_at,
|
|
3306
|
+
updatedAt: row.updated_at
|
|
3307
|
+
};
|
|
3308
|
+
}
|
|
3309
|
+
/**
|
|
3310
|
+
* The execution a client should render: the active run, or a blocked one
|
|
3311
|
+
* awaiting a user-triggered retry. Completed/cancelled runs are not
|
|
3312
|
+
* surfaced — the UI only acts on running/waiting/blocked.
|
|
3313
|
+
*/
|
|
3314
|
+
getDisplayWorkflowExecution(sessionId) {
|
|
3315
|
+
const active = this.getActiveWorkflowExecution(sessionId);
|
|
3316
|
+
if (active) return active;
|
|
3317
|
+
const latest = this.getLatestWorkflowExecution(sessionId);
|
|
3318
|
+
if (latest && latest.status === "blocked") return latest;
|
|
3319
|
+
return null;
|
|
3320
|
+
}
|
|
3281
3321
|
// ============================================================================
|
|
3282
3322
|
// Session Metadata (DB operations)
|
|
3283
3323
|
// ============================================================================
|
|
@@ -5336,7 +5376,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
5336
5376
|
try {
|
|
5337
5377
|
const { challenge, completion } = await adapter.beginLogin({ providerId: provider.id });
|
|
5338
5378
|
void completion.then(async ({ credentialRef }) => {
|
|
5339
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
5379
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
5340
5380
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
5341
5381
|
const updatedConfig = updateProvider(globalConfig, provider.id, { credentialRef, authAdapter: adapter.id });
|
|
5342
5382
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -5373,7 +5413,7 @@ function createProviderAuthRoutes(config3, providerManager, registry) {
|
|
|
5373
5413
|
const ref = provider.credentialRef ?? provider.id;
|
|
5374
5414
|
await adapter.logout(ref);
|
|
5375
5415
|
}
|
|
5376
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5416
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
5377
5417
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
5378
5418
|
const updatedConfig = {
|
|
5379
5419
|
...globalConfig,
|
|
@@ -5873,7 +5913,7 @@ async function createServerHandle(config3) {
|
|
|
5873
5913
|
const mcpManager = new McpManager({
|
|
5874
5914
|
onToolsDiscovered: async (name, tools) => {
|
|
5875
5915
|
try {
|
|
5876
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5916
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
5877
5917
|
const mode = config3.mode ?? "production";
|
|
5878
5918
|
const globalConfig = await loadGlobalConfig(mode, config3.globalConfigPath);
|
|
5879
5919
|
const mcpServers2 = {
|
|
@@ -5907,7 +5947,7 @@ async function createServerHandle(config3) {
|
|
|
5907
5947
|
toolRegistry = createToolRegistry();
|
|
5908
5948
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5909
5949
|
}
|
|
5910
|
-
const { signalMcpReady } = await import("./server-
|
|
5950
|
+
const { signalMcpReady } = await import("./server-ESKTIZL5.js");
|
|
5911
5951
|
signalMcpReady();
|
|
5912
5952
|
});
|
|
5913
5953
|
const app = express();
|
|
@@ -5933,7 +5973,7 @@ async function createServerHandle(config3) {
|
|
|
5933
5973
|
app.get("/api/health", (_req, res) => {
|
|
5934
5974
|
res.json({ status: "ok", timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
5935
5975
|
});
|
|
5936
|
-
app.get("/api/changelog", async (
|
|
5976
|
+
app.get("/api/changelog", async (req, res) => {
|
|
5937
5977
|
try {
|
|
5938
5978
|
const fs = await import("fs");
|
|
5939
5979
|
const path = await import("path");
|
|
@@ -5944,7 +5984,9 @@ async function createServerHandle(config3) {
|
|
|
5944
5984
|
changelogPath = path.resolve(dirname8, "../../CHANGELOG.md");
|
|
5945
5985
|
}
|
|
5946
5986
|
const content = fs.readFileSync(changelogPath, "utf-8");
|
|
5947
|
-
|
|
5987
|
+
const since = typeof req.query["since"] === "string" ? req.query["since"] : void 0;
|
|
5988
|
+
const { trimChangelog } = await import("./changelog-FZUE6OSG.js");
|
|
5989
|
+
res.json({ content: since ? trimChangelog(content, since) : content });
|
|
5948
5990
|
} catch {
|
|
5949
5991
|
res.json({ content: "# Changelog\n\nUnable to load changelog." });
|
|
5950
5992
|
}
|
|
@@ -5988,7 +6030,7 @@ async function createServerHandle(config3) {
|
|
|
5988
6030
|
res.json({ tools });
|
|
5989
6031
|
});
|
|
5990
6032
|
app.get("/api/projects", async (_req, res) => {
|
|
5991
|
-
const { listProjects: listProjects2 } = await import("./projects-
|
|
6033
|
+
const { listProjects: listProjects2 } = await import("./projects-NDPNOV6D.js");
|
|
5992
6034
|
const projects = listProjects2();
|
|
5993
6035
|
res.json({ projects });
|
|
5994
6036
|
});
|
|
@@ -5997,7 +6039,7 @@ async function createServerHandle(config3) {
|
|
|
5997
6039
|
if (!name || !workdir) {
|
|
5998
6040
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
5999
6041
|
}
|
|
6000
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
6042
|
+
const { createDirectoryWithGit } = await import("./project-creator-PMQ65NKN.js");
|
|
6001
6043
|
try {
|
|
6002
6044
|
const project = await createDirectoryWithGit(name, workdir);
|
|
6003
6045
|
res.status(201).json({ project });
|
|
@@ -6015,7 +6057,7 @@ async function createServerHandle(config3) {
|
|
|
6015
6057
|
if (!targetPath) {
|
|
6016
6058
|
return res.status(400).json({ error: "path is required" });
|
|
6017
6059
|
}
|
|
6018
|
-
const { checkPermissions } = await import("./permissions-
|
|
6060
|
+
const { checkPermissions } = await import("./permissions-UKR524ZB.js");
|
|
6019
6061
|
const result = await checkPermissions(targetPath);
|
|
6020
6062
|
if (result.success) {
|
|
6021
6063
|
res.json(result);
|
|
@@ -6032,7 +6074,7 @@ async function createServerHandle(config3) {
|
|
|
6032
6074
|
if (!["group", "ownership", "join_group", "join_group_and_group"].includes(action)) {
|
|
6033
6075
|
return res.status(400).json({ error: 'action must be "group", "ownership", "join_group", or "join_group_and_group"' });
|
|
6034
6076
|
}
|
|
6035
|
-
const { fixPermissions } = await import("./permissions-
|
|
6077
|
+
const { fixPermissions } = await import("./permissions-UKR524ZB.js");
|
|
6036
6078
|
const result = await fixPermissions(targetPath, action);
|
|
6037
6079
|
if (result.success) {
|
|
6038
6080
|
res.json(result);
|
|
@@ -6042,7 +6084,7 @@ async function createServerHandle(config3) {
|
|
|
6042
6084
|
}
|
|
6043
6085
|
});
|
|
6044
6086
|
app.get("/api/projects/:id", async (req, res) => {
|
|
6045
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6087
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6046
6088
|
const project = getProject2(req.params.id);
|
|
6047
6089
|
if (!project) {
|
|
6048
6090
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6050,13 +6092,13 @@ async function createServerHandle(config3) {
|
|
|
6050
6092
|
res.json({ project });
|
|
6051
6093
|
});
|
|
6052
6094
|
app.get("/api/projects/:id/open-folder", async (req, res) => {
|
|
6053
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6095
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6054
6096
|
const project = getProject2(req.params.id);
|
|
6055
6097
|
if (!project) {
|
|
6056
6098
|
return res.status(404).json({ error: "Project not found" });
|
|
6057
6099
|
}
|
|
6058
6100
|
try {
|
|
6059
|
-
const { openFolder: openFolder2 } = await import("./openFolder-
|
|
6101
|
+
const { openFolder: openFolder2 } = await import("./openFolder-XCMSU3OI.js");
|
|
6060
6102
|
await openFolder2(project.workdir);
|
|
6061
6103
|
res.json({ success: true });
|
|
6062
6104
|
} catch (err) {
|
|
@@ -6064,7 +6106,7 @@ async function createServerHandle(config3) {
|
|
|
6064
6106
|
}
|
|
6065
6107
|
});
|
|
6066
6108
|
app.put("/api/projects/:id", async (req, res) => {
|
|
6067
|
-
const { updateProject: updateProject2 } = await import("./projects-
|
|
6109
|
+
const { updateProject: updateProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6068
6110
|
const { name, customInstructions, dangerLevel, defaultAgent } = req.body;
|
|
6069
6111
|
const updates = {};
|
|
6070
6112
|
if (name !== void 0) updates.name = name;
|
|
@@ -6078,7 +6120,7 @@ async function createServerHandle(config3) {
|
|
|
6078
6120
|
res.json({ project: updated });
|
|
6079
6121
|
});
|
|
6080
6122
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
6081
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
6123
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-NDPNOV6D.js");
|
|
6082
6124
|
const project = getProject2(req.params.id);
|
|
6083
6125
|
if (!project) {
|
|
6084
6126
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -6087,7 +6129,7 @@ async function createServerHandle(config3) {
|
|
|
6087
6129
|
res.json({ success: true });
|
|
6088
6130
|
});
|
|
6089
6131
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
6090
|
-
const { toggleStar } = await import("./projects-
|
|
6132
|
+
const { toggleStar } = await import("./projects-NDPNOV6D.js");
|
|
6091
6133
|
const { isStarred } = req.body;
|
|
6092
6134
|
if (typeof isStarred !== "boolean") {
|
|
6093
6135
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -6101,9 +6143,9 @@ async function createServerHandle(config3) {
|
|
|
6101
6143
|
const sessionFavoriteRouter = express.Router();
|
|
6102
6144
|
registerSessionFavoriteRoute(sessionFavoriteRouter, sessionManager);
|
|
6103
6145
|
app.use("/api", sessionFavoriteRouter);
|
|
6104
|
-
const { createTasksService } = await import("./service-
|
|
6105
|
-
const { registerTaskRoutes } = await import("./tasks-
|
|
6106
|
-
const { setTasksService } = await import("./tools-
|
|
6146
|
+
const { createTasksService } = await import("./service-M7XJHAK4.js");
|
|
6147
|
+
const { registerTaskRoutes } = await import("./tasks-X5H5HM4J.js");
|
|
6148
|
+
const { setTasksService } = await import("./tools-KBS6X3EN.js");
|
|
6107
6149
|
const tasksService = createTasksService({
|
|
6108
6150
|
sessionManager,
|
|
6109
6151
|
config: config3,
|
|
@@ -6116,26 +6158,26 @@ async function createServerHandle(config3) {
|
|
|
6116
6158
|
registerTaskRoutes(tasksRouter, tasksService);
|
|
6117
6159
|
app.use("/api", tasksRouter);
|
|
6118
6160
|
app.get("/api/projects/:id/branches", async (req, res) => {
|
|
6119
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6161
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6120
6162
|
const project = getProject2(req.params.id);
|
|
6121
6163
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6122
|
-
const { listBranches } = await import("./workspace-
|
|
6164
|
+
const { listBranches } = await import("./workspace-IQLLHMYR.js");
|
|
6123
6165
|
const branches = await listBranches(project.workdir);
|
|
6124
6166
|
res.json({ branches });
|
|
6125
6167
|
});
|
|
6126
6168
|
app.post("/api/projects/:id/checkout", async (req, res) => {
|
|
6127
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6169
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6128
6170
|
const project = getProject2(req.params.id);
|
|
6129
6171
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6130
6172
|
const { branch } = req.body;
|
|
6131
6173
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6132
|
-
const { checkoutBranch, isGitRepository } = await import("./workspace-
|
|
6174
|
+
const { checkoutBranch, isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6133
6175
|
if (!await isGitRepository(project.workdir)) {
|
|
6134
6176
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6135
6177
|
}
|
|
6136
6178
|
try {
|
|
6137
6179
|
await checkoutBranch(project.workdir, branch);
|
|
6138
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6180
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6139
6181
|
const allSessions = sessionManager.listSessions();
|
|
6140
6182
|
for (const s of allSessions) {
|
|
6141
6183
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6149,12 +6191,12 @@ async function createServerHandle(config3) {
|
|
|
6149
6191
|
}
|
|
6150
6192
|
});
|
|
6151
6193
|
app.post("/api/projects/:id/checkout-new", async (req, res) => {
|
|
6152
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6194
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6153
6195
|
const project = getProject2(req.params.id);
|
|
6154
6196
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6155
6197
|
const { name, sourceBranch } = req.body;
|
|
6156
6198
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6157
|
-
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-
|
|
6199
|
+
const { createBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, validateRef: validateRef2, getDefaultBranch, isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6158
6200
|
if (!await isGitRepository(project.workdir)) {
|
|
6159
6201
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6160
6202
|
}
|
|
@@ -6171,7 +6213,7 @@ async function createServerHandle(config3) {
|
|
|
6171
6213
|
);
|
|
6172
6214
|
}
|
|
6173
6215
|
await createBranch(project.workdir, name, sb);
|
|
6174
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6216
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6175
6217
|
const allSessions = sessionManager.listSessions();
|
|
6176
6218
|
for (const s of allSessions) {
|
|
6177
6219
|
if (sessionManager.getEffectiveWorkdir(s.id) === project.workdir) {
|
|
@@ -6188,7 +6230,7 @@ async function createServerHandle(config3) {
|
|
|
6188
6230
|
const session = sessionManager.getSession(req.params.id);
|
|
6189
6231
|
if (!session) return res.status(404).json({ error: "Session not found" });
|
|
6190
6232
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6191
|
-
const { listBranches, getDefaultBranch } = await import("./workspace-
|
|
6233
|
+
const { listBranches, getDefaultBranch } = await import("./workspace-IQLLHMYR.js");
|
|
6192
6234
|
const [branches, defaultBranch] = await Promise.all([
|
|
6193
6235
|
listBranches(effectiveWorkdir),
|
|
6194
6236
|
getDefaultBranch(session.workdir)
|
|
@@ -6202,8 +6244,8 @@ async function createServerHandle(config3) {
|
|
|
6202
6244
|
const { branch } = req.body;
|
|
6203
6245
|
if (!branch || typeof branch !== "string") return res.status(400).json({ error: "branch is required" });
|
|
6204
6246
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6205
|
-
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-
|
|
6206
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6247
|
+
const { checkoutBranch, validateRef: validateRef2 } = await import("./workspace-IQLLHMYR.js");
|
|
6248
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6207
6249
|
try {
|
|
6208
6250
|
await validateRef2(effectiveWorkdir, branch);
|
|
6209
6251
|
await checkoutBranch(effectiveWorkdir, branch);
|
|
@@ -6245,16 +6287,16 @@ All file and git operations should use this branch.
|
|
|
6245
6287
|
const { name, sourceBranch } = req.body;
|
|
6246
6288
|
if (!name || typeof name !== "string") return res.status(400).json({ error: "name is required" });
|
|
6247
6289
|
const effectiveWorkdir = sessionManager.getEffectiveWorkdir(req.params.id);
|
|
6248
|
-
const { validateRef: validateRef2 } = await import("./workspace-
|
|
6249
|
-
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-
|
|
6290
|
+
const { validateRef: validateRef2 } = await import("./workspace-IQLLHMYR.js");
|
|
6291
|
+
const { updateSessionBranch: updateSessionBranch2 } = await import("./sessions-I7ELDIIP.js");
|
|
6250
6292
|
try {
|
|
6251
6293
|
await validateRef2(effectiveWorkdir, name);
|
|
6252
6294
|
if (sourceBranch) {
|
|
6253
|
-
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-
|
|
6295
|
+
const { resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2, createBranch } = await import("./workspace-IQLLHMYR.js");
|
|
6254
6296
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, sourceBranch, session.workdir);
|
|
6255
6297
|
await createBranch(effectiveWorkdir, name, sb);
|
|
6256
6298
|
} else {
|
|
6257
|
-
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-
|
|
6299
|
+
const { createBranch, getDefaultBranch, resolveAndValidateSourceBranch: resolveAndValidateSourceBranch2 } = await import("./workspace-IQLLHMYR.js");
|
|
6258
6300
|
const defaultBranch = await getDefaultBranch(session.workdir);
|
|
6259
6301
|
const sb = await resolveAndValidateSourceBranch2(effectiveWorkdir, defaultBranch, session.workdir);
|
|
6260
6302
|
await createBranch(effectiveWorkdir, name, sb);
|
|
@@ -6292,17 +6334,17 @@ All file and git operations should use this branch.
|
|
|
6292
6334
|
}
|
|
6293
6335
|
});
|
|
6294
6336
|
app.get("/api/projects/:id/workspaces", async (req, res) => {
|
|
6295
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
6337
|
+
const { getProject: getProject2 } = await import("./projects-NDPNOV6D.js");
|
|
6296
6338
|
const project = getProject2(req.params.id);
|
|
6297
6339
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6298
|
-
const { listWorkspaces } = await import("./workspace-
|
|
6340
|
+
const { listWorkspaces } = await import("./workspace-IQLLHMYR.js");
|
|
6299
6341
|
const all = await listWorkspaces(project.name, project.workdir);
|
|
6300
6342
|
const workspacesList = all.filter((ws) => ws.path !== project.workdir);
|
|
6301
6343
|
res.json({ workspaces: workspacesList });
|
|
6302
6344
|
});
|
|
6303
6345
|
app.get("/api/sessions", async (req, res) => {
|
|
6304
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6305
|
-
const { getPendingConfirmationsBySession } = await import("./path-security-
|
|
6346
|
+
const { getRecentUserPromptsForSession } = await import("./events-IVPAMMR5.js");
|
|
6347
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-JTCHWYG3.js");
|
|
6306
6348
|
const projectId = req.query["projectId"];
|
|
6307
6349
|
const rawLimit = req.query["limit"];
|
|
6308
6350
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6357,7 +6399,7 @@ All file and git operations should use this branch.
|
|
|
6357
6399
|
disabledServers = mcpManager.getAllServers().filter((s) => s.config.disabled).map((s) => s.name);
|
|
6358
6400
|
}
|
|
6359
6401
|
if (disabledServers.length > 0) {
|
|
6360
|
-
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-
|
|
6402
|
+
const { setSessionDisabledServers: setSessionDisabledServers2 } = await import("./session-overrides-CWBKPHMF.js");
|
|
6361
6403
|
setSessionDisabledServers2(session.id, disabledServers);
|
|
6362
6404
|
}
|
|
6363
6405
|
} catch {
|
|
@@ -6394,7 +6436,7 @@ All file and git operations should use this branch.
|
|
|
6394
6436
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6395
6437
|
const project = sessionManager.getProject(session.projectId);
|
|
6396
6438
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6397
|
-
const { isGitRepository } = await import("./workspace-
|
|
6439
|
+
const { isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6398
6440
|
if (!await isGitRepository(project.workdir)) {
|
|
6399
6441
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6400
6442
|
}
|
|
@@ -6412,7 +6454,7 @@ All file and git operations should use this branch.
|
|
|
6412
6454
|
if (!target || typeof target !== "string") return res.status(400).json({ error: "target is required" });
|
|
6413
6455
|
const project = sessionManager.getProject(session.projectId);
|
|
6414
6456
|
if (!project) return res.status(404).json({ error: "Project not found" });
|
|
6415
|
-
const { isGitRepository } = await import("./workspace-
|
|
6457
|
+
const { isGitRepository } = await import("./workspace-IQLLHMYR.js");
|
|
6416
6458
|
if (!await isGitRepository(project.workdir)) {
|
|
6417
6459
|
return res.status(400).json({ error: "Project is not a git repository" });
|
|
6418
6460
|
}
|
|
@@ -6430,12 +6472,12 @@ All file and git operations should use this branch.
|
|
|
6430
6472
|
}
|
|
6431
6473
|
});
|
|
6432
6474
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6433
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-
|
|
6434
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6435
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6436
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6437
|
-
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-
|
|
6438
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-
|
|
6475
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot } = await import("./events-IVPAMMR5.js");
|
|
6476
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
|
|
6477
|
+
const { getPendingQuestionsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6478
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6479
|
+
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
|
|
6480
|
+
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6439
6481
|
let session = sessionManager.getSession(req.params.id);
|
|
6440
6482
|
if (!session) {
|
|
6441
6483
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -6456,7 +6498,7 @@ All file and git operations should use this branch.
|
|
|
6456
6498
|
const queueState = sessionManager.getQueueState(req.params.id);
|
|
6457
6499
|
const pendingQuestions = getPendingQuestionsForSession(req.params.id);
|
|
6458
6500
|
const pendingConfirmations = foldPendingConfirmations(events);
|
|
6459
|
-
const activeWorkflowExecution = sessionManager.
|
|
6501
|
+
const activeWorkflowExecution = sessionManager.getDisplayWorkflowExecution(req.params.id);
|
|
6460
6502
|
res.json({
|
|
6461
6503
|
session: toClientSession(session),
|
|
6462
6504
|
messages,
|
|
@@ -6474,8 +6516,8 @@ All file and git operations should use this branch.
|
|
|
6474
6516
|
if (!session) {
|
|
6475
6517
|
return res.status(404).json({ error: "Session not found" });
|
|
6476
6518
|
}
|
|
6477
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6478
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6519
|
+
const { stopSessionExecution } = await import("./chat-handler-Z6BEY66U.js");
|
|
6520
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6479
6521
|
sessionManager.clearMessageQueue(sessionId);
|
|
6480
6522
|
stopSessionExecution(sessionId, sessionManager);
|
|
6481
6523
|
abortSession(sessionId);
|
|
@@ -6504,9 +6546,9 @@ All file and git operations should use this branch.
|
|
|
6504
6546
|
res.json({ success: true });
|
|
6505
6547
|
});
|
|
6506
6548
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6507
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6508
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6509
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6549
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
|
|
6550
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6551
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6510
6552
|
const sessionId = req.params.id;
|
|
6511
6553
|
const session = sessionManager.getSession(sessionId);
|
|
6512
6554
|
if (!session) {
|
|
@@ -6541,7 +6583,7 @@ All file and git operations should use this branch.
|
|
|
6541
6583
|
if (!result.success) {
|
|
6542
6584
|
return res.status(500).json({ error: result.error ?? "Failed to set default model" });
|
|
6543
6585
|
}
|
|
6544
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6586
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
6545
6587
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
6546
6588
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
|
|
6547
6589
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -6619,11 +6661,11 @@ All file and git operations should use this branch.
|
|
|
6619
6661
|
res.json({ success: true });
|
|
6620
6662
|
});
|
|
6621
6663
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6622
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-
|
|
6623
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6624
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6625
|
-
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-
|
|
6626
|
-
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-
|
|
6664
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEv } = await import("./events-IVPAMMR5.js");
|
|
6665
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6666
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6667
|
+
const { getAgentModelOverride: getAgentModelOverride2 } = await import("./model-overrides-7F2EOA4U.js");
|
|
6668
|
+
const { updateSessionProvider: updateSessionProvider2 } = await import("./sessions-I7ELDIIP.js");
|
|
6627
6669
|
const sessionId = req.params.id;
|
|
6628
6670
|
const session = sessionManager.getSession(sessionId);
|
|
6629
6671
|
if (!session) {
|
|
@@ -6725,7 +6767,7 @@ All file and git operations should use this branch.
|
|
|
6725
6767
|
if (alwaysAllow !== void 0 && typeof alwaysAllow !== "boolean") {
|
|
6726
6768
|
return res.status(400).json({ error: "alwaysAllow must be a boolean if provided" });
|
|
6727
6769
|
}
|
|
6728
|
-
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-
|
|
6770
|
+
const { providePathConfirmation, getConfirmationSessionId } = await import("./tools-KBS6X3EN.js");
|
|
6729
6771
|
const pendingSessionId = getConfirmationSessionId(callId);
|
|
6730
6772
|
if (!pendingSessionId) {
|
|
6731
6773
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -6737,11 +6779,11 @@ All file and git operations should use this branch.
|
|
|
6737
6779
|
if (!result.found) {
|
|
6738
6780
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6739
6781
|
}
|
|
6740
|
-
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-
|
|
6741
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
6742
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
6743
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
6744
|
-
const { getMaxVisibleItems } = await import("./settings-
|
|
6782
|
+
const { getEventStore: getEventStore2, combineEventsWithSnapshot: combineEvents } = await import("./events-IVPAMMR5.js");
|
|
6783
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-RTGU63BW.js");
|
|
6784
|
+
const { createSessionStateMessage } = await import("./protocol-HYA5BYVN.js");
|
|
6785
|
+
const { getPendingQuestionsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6786
|
+
const { getMaxVisibleItems } = await import("./settings-FGXQHKUH.js");
|
|
6745
6787
|
const eventStore = getEventStore2();
|
|
6746
6788
|
const { snapshot, events: eventsSinceSnapshot } = eventStore.getEventsSinceSnapshot(sessionId);
|
|
6747
6789
|
const events = combineEvents(sessionId, snapshot, eventsSinceSnapshot);
|
|
@@ -6777,7 +6819,7 @@ All file and git operations should use this branch.
|
|
|
6777
6819
|
if (!skip && typeof answer !== "string") {
|
|
6778
6820
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
6779
6821
|
}
|
|
6780
|
-
const { provideAnswer } = await import("./tools-
|
|
6822
|
+
const { provideAnswer } = await import("./tools-KBS6X3EN.js");
|
|
6781
6823
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
6782
6824
|
if (!found) {
|
|
6783
6825
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6810,7 +6852,7 @@ All file and git operations should use this branch.
|
|
|
6810
6852
|
if (!session) {
|
|
6811
6853
|
return res.status(404).json({ error: "Session not found" });
|
|
6812
6854
|
}
|
|
6813
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
6855
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
6814
6856
|
if (getSetting2(SETTINGS_KEYS.CACHE_WARMING) !== "true") {
|
|
6815
6857
|
return res.json({ success: false, reason: "disabled" });
|
|
6816
6858
|
}
|
|
@@ -6842,7 +6884,7 @@ All file and git operations should use this branch.
|
|
|
6842
6884
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
6843
6885
|
model: llmClient.getModel()
|
|
6844
6886
|
};
|
|
6845
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
6887
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-CS3KXLZE.js");
|
|
6846
6888
|
runAgentTurn(
|
|
6847
6889
|
{
|
|
6848
6890
|
sessionManager,
|
|
@@ -6880,15 +6922,15 @@ All file and git operations should use this branch.
|
|
|
6880
6922
|
if (!session) {
|
|
6881
6923
|
return res.status(404).json({ error: "Session not found" });
|
|
6882
6924
|
}
|
|
6883
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6884
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6925
|
+
const { stopSessionExecution } = await import("./chat-handler-Z6BEY66U.js");
|
|
6926
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-KBS6X3EN.js");
|
|
6885
6927
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
6886
6928
|
sessionManager.clearMessageQueue(sessionId);
|
|
6887
6929
|
stopSessionExecution(sessionId, sessionManager);
|
|
6888
6930
|
abortSession(sessionId);
|
|
6889
6931
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6890
6932
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6891
|
-
const eventStore = (await import("./events-
|
|
6933
|
+
const eventStore = (await import("./events-IVPAMMR5.js")).getEventStore();
|
|
6892
6934
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6893
6935
|
res.json({ success: true, queuedMessages });
|
|
6894
6936
|
});
|
|
@@ -6902,7 +6944,7 @@ All file and git operations should use this branch.
|
|
|
6902
6944
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6903
6945
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6904
6946
|
}
|
|
6905
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6947
|
+
const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
|
|
6906
6948
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6907
6949
|
res.json({ success: true });
|
|
6908
6950
|
});
|
|
@@ -6922,8 +6964,8 @@ All file and git operations should use this branch.
|
|
|
6922
6964
|
if (attachments !== void 0 && !Array.isArray(attachments)) {
|
|
6923
6965
|
return res.status(400).json({ error: "attachments must be an array if provided" });
|
|
6924
6966
|
}
|
|
6925
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6926
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
6967
|
+
const { getEventStore: getEventStore2 } = await import("./events-IVPAMMR5.js");
|
|
6968
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-RTGU63BW.js");
|
|
6927
6969
|
const eventStore = getEventStore2();
|
|
6928
6970
|
const events = eventStore.getEvents(sessionId);
|
|
6929
6971
|
const { messages } = buildMessagesFromStoredEvents(events);
|
|
@@ -6935,7 +6977,7 @@ All file and git operations should use this branch.
|
|
|
6935
6977
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
6936
6978
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
6937
6979
|
}
|
|
6938
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6980
|
+
const { truncateSessionMessages } = await import("./events-IVPAMMR5.js");
|
|
6939
6981
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
6940
6982
|
sessionManager.queueMessage(
|
|
6941
6983
|
sessionId,
|
|
@@ -6997,7 +7039,7 @@ All file and git operations should use this branch.
|
|
|
6997
7039
|
res.json({ accepted: true });
|
|
6998
7040
|
});
|
|
6999
7041
|
app.get("/api/settings", async (req, res) => {
|
|
7000
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7042
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
7001
7043
|
const keysParam = req.query["keys"];
|
|
7002
7044
|
if (!keysParam) {
|
|
7003
7045
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -7010,19 +7052,19 @@ All file and git operations should use this branch.
|
|
|
7010
7052
|
res.json(result);
|
|
7011
7053
|
});
|
|
7012
7054
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7013
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7055
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
7014
7056
|
const key = req.params.key;
|
|
7015
7057
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7016
7058
|
res.json({ key, value });
|
|
7017
7059
|
});
|
|
7018
7060
|
app.get("/api/settings/:key", async (req, res) => {
|
|
7019
|
-
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-
|
|
7061
|
+
const { getSetting: getSetting2, SETTINGS_DEFAULTS } = await import("./settings-FGXQHKUH.js");
|
|
7020
7062
|
const key = req.params.key;
|
|
7021
7063
|
const value = getSetting2(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
7022
7064
|
res.json({ key, value });
|
|
7023
7065
|
});
|
|
7024
7066
|
app.put("/api/settings/:key", async (req, res) => {
|
|
7025
|
-
const { setSetting: setSetting2 } = await import("./settings-
|
|
7067
|
+
const { setSetting: setSetting2 } = await import("./settings-FGXQHKUH.js");
|
|
7026
7068
|
const key = req.params.key;
|
|
7027
7069
|
const { value } = req.body;
|
|
7028
7070
|
if (value === void 0) {
|
|
@@ -7049,7 +7091,7 @@ All file and git operations should use this branch.
|
|
|
7049
7091
|
}
|
|
7050
7092
|
});
|
|
7051
7093
|
app.get("/api/tools/shells", async (_req, res) => {
|
|
7052
|
-
const { listAvailableShells } = await import("./platform-
|
|
7094
|
+
const { listAvailableShells } = await import("./platform-ECDDYMAR.js");
|
|
7053
7095
|
res.json({ shells: listAvailableShells() });
|
|
7054
7096
|
});
|
|
7055
7097
|
app.get("/api/config", async (_req, res) => {
|
|
@@ -7058,7 +7100,7 @@ All file and git operations should use this branch.
|
|
|
7058
7100
|
let visionFallback;
|
|
7059
7101
|
let globalWorkdir;
|
|
7060
7102
|
try {
|
|
7061
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
7103
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-TUCHLIWD.js");
|
|
7062
7104
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7063
7105
|
const fallback = getVisionFallback(globalConfig);
|
|
7064
7106
|
if (fallback) {
|
|
@@ -7139,7 +7181,7 @@ All file and git operations should use this branch.
|
|
|
7139
7181
|
}));
|
|
7140
7182
|
}
|
|
7141
7183
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7142
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7184
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
7143
7185
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7144
7186
|
if (!proxyUrl) {
|
|
7145
7187
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7231,7 +7273,7 @@ All file and git operations should use this branch.
|
|
|
7231
7273
|
}
|
|
7232
7274
|
});
|
|
7233
7275
|
app.post("/api/proxy/test", async (_req, res) => {
|
|
7234
|
-
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-
|
|
7276
|
+
const { getSetting: getSetting2, SETTINGS_KEYS } = await import("./settings-FGXQHKUH.js");
|
|
7235
7277
|
const proxyUrl = getSetting2(SETTINGS_KEYS.PROXY_URL);
|
|
7236
7278
|
if (!proxyUrl) {
|
|
7237
7279
|
return res.status(400).json({ success: false, error: "No proxy URL configured" });
|
|
@@ -7258,8 +7300,8 @@ All file and git operations should use this branch.
|
|
|
7258
7300
|
const backend = req.query["backend"];
|
|
7259
7301
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7260
7302
|
try {
|
|
7261
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
7262
|
-
const { getModelProfile: getModelProfile2 } = await import("./profiles-
|
|
7303
|
+
const { fetchModelsWithContext } = await import("./provider-manager-TMBO4DFG.js");
|
|
7304
|
+
const { getModelProfile: getModelProfile2 } = await import("./profiles-GYHXBWPV.js");
|
|
7263
7305
|
const models = await fetchModelsWithContext(
|
|
7264
7306
|
url,
|
|
7265
7307
|
apiKey,
|
|
@@ -7294,7 +7336,7 @@ All file and git operations should use this branch.
|
|
|
7294
7336
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
7295
7337
|
if (!models?.length) return res.status(400).json({ error: "models is required" });
|
|
7296
7338
|
try {
|
|
7297
|
-
const { autoConfig } = await import("./auto-config-
|
|
7339
|
+
const { autoConfig } = await import("./auto-config-AAUO4PKW.js");
|
|
7298
7340
|
const result = await autoConfig({
|
|
7299
7341
|
url,
|
|
7300
7342
|
...apiKey ? { apiKey } : {},
|
|
@@ -7326,11 +7368,11 @@ All file and git operations should use this branch.
|
|
|
7326
7368
|
});
|
|
7327
7369
|
return res.json({ success: true, message: { content: response2.content }, raw: response2 });
|
|
7328
7370
|
}
|
|
7329
|
-
const { getModelProfile: getModelProfile2 } = await import("./profiles-
|
|
7330
|
-
const { getBackendCapabilities } = await import("./backend-
|
|
7331
|
-
const { buildNonStreamingCreateParams } = await import("./client-pure-
|
|
7332
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
7333
|
-
const { ensureVersionPrefix } = await import("./url-utils-
|
|
7371
|
+
const { getModelProfile: getModelProfile2 } = await import("./profiles-GYHXBWPV.js");
|
|
7372
|
+
const { getBackendCapabilities } = await import("./backend-67OLCS5O.js");
|
|
7373
|
+
const { buildNonStreamingCreateParams } = await import("./client-pure-B5DHEKQJ.js");
|
|
7374
|
+
const { OpenAIHttpClient } = await import("./http-client-IPUW2MSW.js");
|
|
7375
|
+
const { ensureVersionPrefix } = await import("./url-utils-C5BM7NF7.js");
|
|
7334
7376
|
const profile = getModelProfile2(model);
|
|
7335
7377
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
7336
7378
|
const modelSettings = {};
|
|
@@ -7399,7 +7441,7 @@ All file and git operations should use this branch.
|
|
|
7399
7441
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
7400
7442
|
}
|
|
7401
7443
|
try {
|
|
7402
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
7444
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
7403
7445
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7404
7446
|
const providerBackend = backend;
|
|
7405
7447
|
const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
|
|
@@ -7440,7 +7482,7 @@ All file and git operations should use this branch.
|
|
|
7440
7482
|
app.post("/api/init/config", async (req, res) => {
|
|
7441
7483
|
const { workdir, visionFallback } = req.body;
|
|
7442
7484
|
try {
|
|
7443
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7485
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7444
7486
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7445
7487
|
const updatedVf = visionFallback ? { ...globalConfig.visionFallback, ...visionFallback } : globalConfig.visionFallback;
|
|
7446
7488
|
const updatedConfig = {
|
|
@@ -7475,7 +7517,7 @@ All file and git operations should use this branch.
|
|
|
7475
7517
|
}
|
|
7476
7518
|
const updates = parsed.data;
|
|
7477
7519
|
try {
|
|
7478
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7520
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7479
7521
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7480
7522
|
const filteredUpdates = Object.fromEntries(Object.entries(updates).filter(([, v]) => v !== void 0));
|
|
7481
7523
|
const updatedConfig = {
|
|
@@ -7517,8 +7559,8 @@ All file and git operations should use this branch.
|
|
|
7517
7559
|
}
|
|
7518
7560
|
const testConfig = parsed.data;
|
|
7519
7561
|
try {
|
|
7520
|
-
const { resolveVisionFallback } = await import("./config-
|
|
7521
|
-
const { loadGlobalConfig } = await import("./config-
|
|
7562
|
+
const { resolveVisionFallback } = await import("./config-TUCHLIWD.js");
|
|
7563
|
+
const { loadGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7522
7564
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7523
7565
|
const filteredTestConfig = Object.fromEntries(Object.entries(testConfig).filter(([, v]) => v !== void 0));
|
|
7524
7566
|
const testVisionFallback = {
|
|
@@ -7569,7 +7611,7 @@ All file and git operations should use this branch.
|
|
|
7569
7611
|
});
|
|
7570
7612
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
7571
7613
|
const { id } = req.params;
|
|
7572
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
7614
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-TUCHLIWD.js");
|
|
7573
7615
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7574
7616
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
7575
7617
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -7581,7 +7623,7 @@ All file and git operations should use this branch.
|
|
|
7581
7623
|
const { id } = req.params;
|
|
7582
7624
|
const { isLocal } = req.body;
|
|
7583
7625
|
try {
|
|
7584
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
7626
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
7585
7627
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7586
7628
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
7587
7629
|
if (!provider) {
|
|
@@ -7613,7 +7655,7 @@ All file and git operations should use this branch.
|
|
|
7613
7655
|
transportAdapter
|
|
7614
7656
|
} = req.body;
|
|
7615
7657
|
try {
|
|
7616
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
7658
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-TUCHLIWD.js");
|
|
7617
7659
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7618
7660
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
7619
7661
|
if (!provider) {
|
|
@@ -7654,7 +7696,7 @@ All file and git operations should use this branch.
|
|
|
7654
7696
|
return res.status(400).json({ error: result.error });
|
|
7655
7697
|
}
|
|
7656
7698
|
const llmClient = getLLMClient();
|
|
7657
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
7699
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-TUCHLIWD.js");
|
|
7658
7700
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7659
7701
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
7660
7702
|
await saveGlobalConfig(config3.mode ?? "production", updatedConfig, config3.globalConfigPath);
|
|
@@ -7680,8 +7722,8 @@ All file and git operations should use this branch.
|
|
|
7680
7722
|
});
|
|
7681
7723
|
});
|
|
7682
7724
|
async function rebuildMcpTools() {
|
|
7683
|
-
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-
|
|
7684
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
7725
|
+
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-FJAFLDZA.js");
|
|
7726
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-KBS6X3EN.js");
|
|
7685
7727
|
const mcpTools = createMcpTools2(mcpManager);
|
|
7686
7728
|
setMcpTools2(mcpTools);
|
|
7687
7729
|
toolRegistry = createToolRegistry();
|
|
@@ -7756,7 +7798,7 @@ All file and git operations should use this branch.
|
|
|
7756
7798
|
};
|
|
7757
7799
|
await mcpManager.addServer(name, serverCfg);
|
|
7758
7800
|
const server = mcpManager.getServer(name);
|
|
7759
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7801
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7760
7802
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7761
7803
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
|
|
7762
7804
|
await saveGlobalConfig(
|
|
@@ -7817,8 +7859,8 @@ All file and git operations should use this branch.
|
|
|
7817
7859
|
return res.status(400).json({ error: "oauth must be a boolean" });
|
|
7818
7860
|
}
|
|
7819
7861
|
try {
|
|
7820
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7821
|
-
const { applyMcpServerUpdate } = await import("./update-server-
|
|
7862
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7863
|
+
const { applyMcpServerUpdate } = await import("./update-server-SVPV6ZJZ.js");
|
|
7822
7864
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7823
7865
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
7824
7866
|
const patch = {
|
|
@@ -7864,9 +7906,9 @@ All file and git operations should use this branch.
|
|
|
7864
7906
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
7865
7907
|
}
|
|
7866
7908
|
mcpManager.removeServer(name);
|
|
7867
|
-
const { clearMcpOAuthEntry } = await import("./oauth-store-
|
|
7909
|
+
const { clearMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
7868
7910
|
await clearMcpOAuthEntry(name);
|
|
7869
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
7911
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
7870
7912
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
7871
7913
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
|
|
7872
7914
|
delete updatedMcpServers[name];
|
|
@@ -7911,8 +7953,8 @@ All file and git operations should use this branch.
|
|
|
7911
7953
|
}
|
|
7912
7954
|
async function completeMcpOAuth(name, serverUrl, code) {
|
|
7913
7955
|
const { auth } = await import("@modelcontextprotocol/sdk/client/auth.js");
|
|
7914
|
-
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-
|
|
7915
|
-
const { clearMcpOAuthAuthorizationState } = await import("./oauth-store-
|
|
7956
|
+
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-DGBC2YM6.js");
|
|
7957
|
+
const { clearMcpOAuthAuthorizationState } = await import("./oauth-store-KECHUT54.js");
|
|
7916
7958
|
const provider = new McpOAuthProvider2(name, serverUrl);
|
|
7917
7959
|
try {
|
|
7918
7960
|
const result = await auth(provider, { serverUrl, authorizationCode: code });
|
|
@@ -7944,7 +7986,7 @@ All file and git operations should use this branch.
|
|
|
7944
7986
|
}
|
|
7945
7987
|
try {
|
|
7946
7988
|
const { auth } = await import("@modelcontextprotocol/sdk/client/auth.js");
|
|
7947
|
-
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-
|
|
7989
|
+
const { McpOAuthProvider: McpOAuthProvider2 } = await import("./oauth-provider-DGBC2YM6.js");
|
|
7948
7990
|
const provider = new McpOAuthProvider2(name, server.config.url);
|
|
7949
7991
|
const result = await auth(provider, { serverUrl: server.config.url });
|
|
7950
7992
|
if (result === "AUTHORIZED") {
|
|
@@ -7966,7 +8008,7 @@ All file and git operations should use this branch.
|
|
|
7966
8008
|
if (!code || !state) {
|
|
7967
8009
|
return res.status(400).type("html").send(oauthCallbackPage("Missing authorization code or state."));
|
|
7968
8010
|
}
|
|
7969
|
-
const { findMcpOAuthEntryByState } = await import("./oauth-store-
|
|
8011
|
+
const { findMcpOAuthEntryByState } = await import("./oauth-store-KECHUT54.js");
|
|
7970
8012
|
const pending = await findMcpOAuthEntryByState(state);
|
|
7971
8013
|
if (!pending) {
|
|
7972
8014
|
return res.status(400).type("html").send(oauthCallbackPage("No pending authorization matches this callback."));
|
|
@@ -8001,7 +8043,7 @@ All file and git operations should use this branch.
|
|
|
8001
8043
|
if (!parsed.code || !parsed.state) {
|
|
8002
8044
|
return res.status(400).json({ error: "Paste the whole callback URL, both code and state are needed" });
|
|
8003
8045
|
}
|
|
8004
|
-
const { readMcpOAuthEntry } = await import("./oauth-store-
|
|
8046
|
+
const { readMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
8005
8047
|
const entry = await readMcpOAuthEntry(name, serverUrl);
|
|
8006
8048
|
if (!entry?.state || entry.state !== parsed.state) {
|
|
8007
8049
|
return res.status(400).json({ error: "This callback does not match the pending authorization" });
|
|
@@ -8018,7 +8060,7 @@ All file and git operations should use this branch.
|
|
|
8018
8060
|
if (!mcpManager.getServer(name)) {
|
|
8019
8061
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
8020
8062
|
}
|
|
8021
|
-
const { clearMcpOAuthEntry } = await import("./oauth-store-
|
|
8063
|
+
const { clearMcpOAuthEntry } = await import("./oauth-store-KECHUT54.js");
|
|
8022
8064
|
await clearMcpOAuthEntry(name);
|
|
8023
8065
|
await applyMcpOAuthResult(name);
|
|
8024
8066
|
res.json({ success: true });
|
|
@@ -8033,7 +8075,7 @@ All file and git operations should use this branch.
|
|
|
8033
8075
|
await mcpManager.setToolEnabled(name, toolName, enabled);
|
|
8034
8076
|
const server = mcpManager.getServer(name);
|
|
8035
8077
|
if (server) {
|
|
8036
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
8078
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-TUCHLIWD.js");
|
|
8037
8079
|
const globalConfig = await loadGlobalConfig(config3.mode ?? "production", config3.globalConfigPath);
|
|
8038
8080
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
8039
8081
|
const serverCfg = mcpServers2[name];
|
|
@@ -8062,7 +8104,7 @@ All file and git operations should use this branch.
|
|
|
8062
8104
|
res.status(400).json({ error: error instanceof Error ? error.message : String(error) });
|
|
8063
8105
|
}
|
|
8064
8106
|
});
|
|
8065
|
-
const { listProjects } = await import("./projects-
|
|
8107
|
+
const { listProjects } = await import("./projects-NDPNOV6D.js");
|
|
8066
8108
|
const allProjects = listProjects();
|
|
8067
8109
|
const projectDir = allProjects.find(
|
|
8068
8110
|
(p) => p.workdir === config3.workdir || config3.workdir && p.workdir.startsWith(config3.workdir + "/")
|
|
@@ -8089,13 +8131,13 @@ All file and git operations should use this branch.
|
|
|
8089
8131
|
})
|
|
8090
8132
|
);
|
|
8091
8133
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
8092
|
-
const { getSessionProcesses } = await import("./manager-
|
|
8134
|
+
const { getSessionProcesses } = await import("./manager-EMLSLMMT.js");
|
|
8093
8135
|
const sessionId = req.params.id;
|
|
8094
8136
|
const processes = getSessionProcesses(sessionId);
|
|
8095
8137
|
res.json({ processes });
|
|
8096
8138
|
});
|
|
8097
8139
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
8098
|
-
const { stopProcess } = await import("./manager-
|
|
8140
|
+
const { stopProcess } = await import("./manager-EMLSLMMT.js");
|
|
8099
8141
|
const sessionId = req.params.id;
|
|
8100
8142
|
const processId = req.params.processId;
|
|
8101
8143
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -8109,7 +8151,7 @@ All file and git operations should use this branch.
|
|
|
8109
8151
|
res.status(500).json({ error: err instanceof Error ? err.message : "Failed to stop process" });
|
|
8110
8152
|
}
|
|
8111
8153
|
});
|
|
8112
|
-
const { getCurrentBranch } = await import("./branch.api-
|
|
8154
|
+
const { getCurrentBranch } = await import("./branch.api-UMKSQMSA.js");
|
|
8113
8155
|
app.get("/api/branch", async (req, res) => {
|
|
8114
8156
|
await getCurrentBranch(req, res);
|
|
8115
8157
|
});
|
|
@@ -8235,7 +8277,7 @@ All file and git operations should use this branch.
|
|
|
8235
8277
|
);
|
|
8236
8278
|
const wss = wssExports.wss;
|
|
8237
8279
|
deferTasksBroadcast = (projectId, payload) => wssExports.broadcastForProject(projectId, "", { type: "tasks.update", payload });
|
|
8238
|
-
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-
|
|
8280
|
+
const { launchWorkflowRun, abortRunnerRun } = await import("./launch-PAVQAWGP.js");
|
|
8239
8281
|
deferTasksLaunchWorkflow = (sessionId, launch) => {
|
|
8240
8282
|
const session = sessionManager.getSession(sessionId);
|
|
8241
8283
|
let llmClient = getLLMClient();
|
|
@@ -8273,7 +8315,7 @@ All file and git operations should use this branch.
|
|
|
8273
8315
|
const state = sessionManager.getContextState(sessionId);
|
|
8274
8316
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
8275
8317
|
});
|
|
8276
|
-
const { QueueProcessor } = await import("./processor-
|
|
8318
|
+
const { QueueProcessor } = await import("./processor-RZD4JRDX.js");
|
|
8277
8319
|
const queueProcessor = new QueueProcessor({
|
|
8278
8320
|
sessionManager,
|
|
8279
8321
|
providerManager,
|
|
@@ -8317,9 +8359,9 @@ All file and git operations should use this branch.
|
|
|
8317
8359
|
void (async () => {
|
|
8318
8360
|
await devServerManager.stopAll();
|
|
8319
8361
|
await mcpManager.disconnectAll();
|
|
8320
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
8362
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-WPEDMCG7.js");
|
|
8321
8363
|
stopAllInspectProxies();
|
|
8322
|
-
const { cleanupAllProcesses } = await import("./store-
|
|
8364
|
+
const { cleanupAllProcesses } = await import("./store-JYPZ2RXB.js");
|
|
8323
8365
|
cleanupAllProcesses();
|
|
8324
8366
|
viteServer?.close();
|
|
8325
8367
|
if (config3.globalConfigPath) {
|
|
@@ -8359,4 +8401,4 @@ export {
|
|
|
8359
8401
|
createServerHandle,
|
|
8360
8402
|
createServer
|
|
8361
8403
|
};
|
|
8362
|
-
//# sourceMappingURL=chunk-
|
|
8404
|
+
//# sourceMappingURL=chunk-4E52GUXJ.js.map
|