openfox 2.0.41 → 2.0.43
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/dist/{ask-4GZ334CO.js → ask-TOBEA6KD.js} +2 -1
- package/dist/{auth-56SIRACI.js → auth-YY5PJYSC.js} +2 -1
- package/dist/{auto-config-FZFXOEEG.js → auto-config-F5Y6KAQ6.js} +2 -1
- package/dist/{backend-AGXWAU7A.js → backend-4HGUPY6W.js} +2 -1
- package/dist/{branch.api-PWFW26KC.js → branch.api-5DMEAIBI.js} +2 -1
- package/dist/{chat-handler-H4O7TLGM.js → chat-handler-233L35BD.js} +13 -4
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/{chunk-X3L37IIK.js → chunk-FQ6UFNTT.js} +24 -18
- package/dist/{chunk-NX6O62MR.js → chunk-FZ5LNBZS.js} +63 -63
- package/dist/{chunk-JGNAYJJZ.js → chunk-NVQFIZJI.js} +2 -2
- package/dist/{chunk-XFMN7OFO.js → chunk-TT6LDJU5.js} +8 -8
- package/dist/{chunk-6KFKVGPK.js → chunk-ULZORR3T.js} +3 -3
- package/dist/{chunk-X6PMP7XH.js → chunk-V234MYXB.js} +12 -3
- package/dist/chunk-XY3LESVZ.js +1000 -0
- package/dist/cli/dev.js +3 -1
- package/dist/cli/index.js +3 -1
- package/dist/{client-XTPAYYRH.js → client-ZUL4AR4J.js} +2 -1
- package/dist/{client-pure-N2MOIDQ6.js → client-pure-DO3S675T.js} +2 -1
- package/dist/{compactor-RZA5VSRT.js → compactor-TJEAAZL3.js} +2 -1
- package/dist/{config-XOXIIBUY.js → config-S5CF4QU4.js} +2 -1
- package/dist/{events-KZZPCW2Q.js → events-THW3MYXE.js} +2 -1
- package/dist/{folding-ENYH4LMG.js → folding-H5C6HS7O.js} +2 -1
- package/dist/{http-client-SIPAW7IM.js → http-client-3OLSDU63.js} +2 -1
- package/dist/{inspect-proxy-UT2LFGJ5.js → inspect-proxy-BV25JERQ.js} +2 -1
- package/dist/{manager-W7N3XQ4Q.js → manager-R3EMNOPR.js} +2 -1
- package/dist/{orchestrator-IZ6VSEZT.js → orchestrator-XIGRXAEC.js} +4 -3
- package/dist/package.json +1 -1
- package/dist/{paths-X46PPOI2.js → paths-F27V3S4I.js} +2 -1
- package/dist/{permissions-Z2IIV2V7.js → permissions-QLHZUEGW.js} +3 -1
- package/dist/{processor-WQYQUIPB.js → processor-T6FX54JU.js} +12 -4
- package/dist/{profiles-Q36ELWQF.js → profiles-5J7F4BML.js} +2 -1
- package/dist/{project-creator-W6Z7KCMZ.js → project-creator-7RBHP6K6.js} +2 -1
- package/dist/{projects-2XSGA7JG.js → projects-BY227WT2.js} +2 -1
- package/dist/{protocol-BKNLAEPJ.js → protocol-CTNE3ANP.js} +2 -1
- package/dist/{provider-JLLIB72V.js → provider-JDI3LVYF.js} +67 -57
- package/dist/{provider-manager-GTWFGTCV.js → provider-manager-5UZXYOZZ.js} +2 -1
- package/dist/{pwa-76XP2DY2.js → pwa-M6QZ52ZO.js} +37 -31
- package/dist/{serve-XP3S4QDS.js → serve-LAAYCXXI.js} +6 -5
- package/dist/server/index.js +5 -4
- package/dist/{server-DKCNTFA5.js → server-GVQNOHX3.js} +5 -4
- package/dist/{service-FJ4TW5L7.js → service-YYJ5Y7CN.js} +3 -1
- package/dist/{settings-MTGCEUS7.js → settings-L2V4ZUA2.js} +2 -1
- package/dist/shared/index.js +1 -0
- package/dist/{store-OQ45KONN.js → store-SF7CDOQT.js} +2 -1
- package/dist/{tool-adapter-B7QP6NLA.js → tool-adapter-MOGEI6TP.js} +2 -1
- package/dist/{tools-X3QW7SN7.js → tools-PS5CSPGS.js} +3 -2
- package/dist/{url-utils-QWAHP54Q.js → url-utils-SAJP7AEX.js} +2 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-V234MYXB.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
setMcpTools,
|
|
62
62
|
setNotifyMcpServersChanged,
|
|
63
63
|
skillExists
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-TT6LDJU5.js";
|
|
65
65
|
import {
|
|
66
66
|
getPathSeparator,
|
|
67
67
|
isAbsolutePath
|
|
@@ -3837,7 +3837,7 @@ import { Router as Router7 } from "express";
|
|
|
3837
3837
|
import { spawn as spawn2 } from "child_process";
|
|
3838
3838
|
|
|
3839
3839
|
// src/constants.ts
|
|
3840
|
-
var VERSION = "2.0.
|
|
3840
|
+
var VERSION = "2.0.43";
|
|
3841
3841
|
|
|
3842
3842
|
// src/server/routes/auto-update.ts
|
|
3843
3843
|
var updateInProgress = false;
|
|
@@ -4004,7 +4004,7 @@ async function createServerHandle(config4) {
|
|
|
4004
4004
|
const mcpManager = new McpManager({
|
|
4005
4005
|
onToolsDiscovered: async (name, tools) => {
|
|
4006
4006
|
try {
|
|
4007
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
4007
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-S5CF4QU4.js");
|
|
4008
4008
|
const mode = config4.mode ?? "production";
|
|
4009
4009
|
const globalConfig = await loadGlobalConfig(mode);
|
|
4010
4010
|
const mcpServers2 = {
|
|
@@ -4034,7 +4034,7 @@ async function createServerHandle(config4) {
|
|
|
4034
4034
|
setMcpTools(mcpTools);
|
|
4035
4035
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
4036
4036
|
}
|
|
4037
|
-
const { signalMcpReady } = await import("./server-
|
|
4037
|
+
const { signalMcpReady } = await import("./server-GVQNOHX3.js");
|
|
4038
4038
|
signalMcpReady();
|
|
4039
4039
|
});
|
|
4040
4040
|
const app = express();
|
|
@@ -4096,7 +4096,7 @@ async function createServerHandle(config4) {
|
|
|
4096
4096
|
res.json({ tools });
|
|
4097
4097
|
});
|
|
4098
4098
|
app.get("/api/projects", async (_req, res) => {
|
|
4099
|
-
const { listProjects } = await import("./projects-
|
|
4099
|
+
const { listProjects } = await import("./projects-BY227WT2.js");
|
|
4100
4100
|
const projects = listProjects();
|
|
4101
4101
|
res.json({ projects });
|
|
4102
4102
|
});
|
|
@@ -4105,7 +4105,7 @@ async function createServerHandle(config4) {
|
|
|
4105
4105
|
if (!name || !workdir) {
|
|
4106
4106
|
return res.status(400).json({ error: "name and workdir are required" });
|
|
4107
4107
|
}
|
|
4108
|
-
const { createDirectoryWithGit } = await import("./project-creator-
|
|
4108
|
+
const { createDirectoryWithGit } = await import("./project-creator-7RBHP6K6.js");
|
|
4109
4109
|
try {
|
|
4110
4110
|
const project = await createDirectoryWithGit(name, workdir);
|
|
4111
4111
|
res.status(201).json({ project });
|
|
@@ -4123,7 +4123,7 @@ async function createServerHandle(config4) {
|
|
|
4123
4123
|
if (!targetPath) {
|
|
4124
4124
|
return res.status(400).json({ error: "path is required" });
|
|
4125
4125
|
}
|
|
4126
|
-
const { checkPermissions } = await import("./permissions-
|
|
4126
|
+
const { checkPermissions } = await import("./permissions-QLHZUEGW.js");
|
|
4127
4127
|
const result = await checkPermissions(targetPath);
|
|
4128
4128
|
if (result.success) {
|
|
4129
4129
|
res.json(result);
|
|
@@ -4140,7 +4140,7 @@ async function createServerHandle(config4) {
|
|
|
4140
4140
|
if (!["group", "ownership", "join_group", "join_group_and_group"].includes(action)) {
|
|
4141
4141
|
return res.status(400).json({ error: 'action must be "group", "ownership", "join_group", or "join_group_and_group"' });
|
|
4142
4142
|
}
|
|
4143
|
-
const { fixPermissions } = await import("./permissions-
|
|
4143
|
+
const { fixPermissions } = await import("./permissions-QLHZUEGW.js");
|
|
4144
4144
|
const result = await fixPermissions(targetPath, action);
|
|
4145
4145
|
if (result.success) {
|
|
4146
4146
|
res.json(result);
|
|
@@ -4150,7 +4150,7 @@ async function createServerHandle(config4) {
|
|
|
4150
4150
|
}
|
|
4151
4151
|
});
|
|
4152
4152
|
app.get("/api/projects/:id", async (req, res) => {
|
|
4153
|
-
const { getProject: getProject2 } = await import("./projects-
|
|
4153
|
+
const { getProject: getProject2 } = await import("./projects-BY227WT2.js");
|
|
4154
4154
|
const project = getProject2(req.params.id);
|
|
4155
4155
|
if (!project) {
|
|
4156
4156
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -4158,7 +4158,7 @@ async function createServerHandle(config4) {
|
|
|
4158
4158
|
res.json({ project });
|
|
4159
4159
|
});
|
|
4160
4160
|
app.put("/api/projects/:id", async (req, res) => {
|
|
4161
|
-
const { updateProject } = await import("./projects-
|
|
4161
|
+
const { updateProject } = await import("./projects-BY227WT2.js");
|
|
4162
4162
|
const { name, customInstructions, dangerLevel } = req.body;
|
|
4163
4163
|
const updates = {};
|
|
4164
4164
|
if (name !== void 0) updates.name = name;
|
|
@@ -4171,7 +4171,7 @@ async function createServerHandle(config4) {
|
|
|
4171
4171
|
res.json({ project: updated });
|
|
4172
4172
|
});
|
|
4173
4173
|
app.delete("/api/projects/:id", async (req, res) => {
|
|
4174
|
-
const { getProject: getProject2, deleteProject } = await import("./projects-
|
|
4174
|
+
const { getProject: getProject2, deleteProject } = await import("./projects-BY227WT2.js");
|
|
4175
4175
|
const project = getProject2(req.params.id);
|
|
4176
4176
|
if (!project) {
|
|
4177
4177
|
return res.status(404).json({ error: "Project not found" });
|
|
@@ -4180,7 +4180,7 @@ async function createServerHandle(config4) {
|
|
|
4180
4180
|
res.json({ success: true });
|
|
4181
4181
|
});
|
|
4182
4182
|
app.put("/api/projects/:id/star", async (req, res) => {
|
|
4183
|
-
const { toggleStar } = await import("./projects-
|
|
4183
|
+
const { toggleStar } = await import("./projects-BY227WT2.js");
|
|
4184
4184
|
const { isStarred } = req.body;
|
|
4185
4185
|
if (typeof isStarred !== "boolean") {
|
|
4186
4186
|
return res.status(400).json({ error: "isStarred is required and must be a boolean" });
|
|
@@ -4192,7 +4192,7 @@ async function createServerHandle(config4) {
|
|
|
4192
4192
|
res.json({ project });
|
|
4193
4193
|
});
|
|
4194
4194
|
app.get("/api/sessions", async (req, res) => {
|
|
4195
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
4195
|
+
const { getRecentUserPromptsForSession } = await import("./events-THW3MYXE.js");
|
|
4196
4196
|
const projectId = req.query["projectId"];
|
|
4197
4197
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
4198
4198
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -4225,9 +4225,9 @@ async function createServerHandle(config4) {
|
|
|
4225
4225
|
res.status(201).json({ session });
|
|
4226
4226
|
});
|
|
4227
4227
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
4228
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
4229
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
4230
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4228
|
+
const { getEventStore: getEventStore2 } = await import("./events-THW3MYXE.js");
|
|
4229
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
|
|
4230
|
+
const { getPendingQuestionsForSession } = await import("./tools-PS5CSPGS.js");
|
|
4231
4231
|
const session = sessionManager.getSession(req.params.id);
|
|
4232
4232
|
if (!session) {
|
|
4233
4233
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -4258,8 +4258,8 @@ async function createServerHandle(config4) {
|
|
|
4258
4258
|
res.json({ success: true });
|
|
4259
4259
|
});
|
|
4260
4260
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
4261
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
4262
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
4261
|
+
const { getEventStore: getEventStore2 } = await import("./events-THW3MYXE.js");
|
|
4262
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
|
|
4263
4263
|
const sessionId = req.params.id;
|
|
4264
4264
|
const session = sessionManager.getSession(sessionId);
|
|
4265
4265
|
if (!session) {
|
|
@@ -4272,7 +4272,7 @@ async function createServerHandle(config4) {
|
|
|
4272
4272
|
const provider = providerManager.getProviders().find((p) => p.id === providerId);
|
|
4273
4273
|
const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
|
|
4274
4274
|
sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
|
|
4275
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
4275
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-S5CF4QU4.js");
|
|
4276
4276
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4277
4277
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, resolvedModel);
|
|
4278
4278
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -4321,8 +4321,8 @@ async function createServerHandle(config4) {
|
|
|
4321
4321
|
res.json({ success: true });
|
|
4322
4322
|
});
|
|
4323
4323
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
4324
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
4325
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-
|
|
4324
|
+
const { getEventStore: getEventStore2 } = await import("./events-THW3MYXE.js");
|
|
4325
|
+
const { buildMessagesFromStoredEvents } = await import("./folding-H5C6HS7O.js");
|
|
4326
4326
|
const sessionId = req.params.id;
|
|
4327
4327
|
const session = sessionManager.getSession(sessionId);
|
|
4328
4328
|
if (!session) {
|
|
@@ -4378,15 +4378,15 @@ async function createServerHandle(config4) {
|
|
|
4378
4378
|
if (!callId || approved === void 0) {
|
|
4379
4379
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
4380
4380
|
}
|
|
4381
|
-
const { providePathConfirmation } = await import("./tools-
|
|
4381
|
+
const { providePathConfirmation } = await import("./tools-PS5CSPGS.js");
|
|
4382
4382
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
4383
4383
|
if (!result.found) {
|
|
4384
4384
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
4385
4385
|
}
|
|
4386
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
4387
|
-
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-
|
|
4388
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
4389
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4386
|
+
const { getEventStore: getEventStore2 } = await import("./events-THW3MYXE.js");
|
|
4387
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-H5C6HS7O.js");
|
|
4388
|
+
const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
|
|
4389
|
+
const { getPendingQuestionsForSession } = await import("./tools-PS5CSPGS.js");
|
|
4390
4390
|
const eventStore = getEventStore2();
|
|
4391
4391
|
const events = eventStore.getEvents(sessionId);
|
|
4392
4392
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -4407,7 +4407,7 @@ async function createServerHandle(config4) {
|
|
|
4407
4407
|
if (!skip && typeof answer !== "string") {
|
|
4408
4408
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
4409
4409
|
}
|
|
4410
|
-
const { provideAnswer } = await import("./tools-
|
|
4410
|
+
const { provideAnswer } = await import("./tools-PS5CSPGS.js");
|
|
4411
4411
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
4412
4412
|
if (!found) {
|
|
4413
4413
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -4443,15 +4443,15 @@ async function createServerHandle(config4) {
|
|
|
4443
4443
|
if (!session) {
|
|
4444
4444
|
return res.status(404).json({ error: "Session not found" });
|
|
4445
4445
|
}
|
|
4446
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
4447
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
4446
|
+
const { stopSessionExecution } = await import("./chat-handler-233L35BD.js");
|
|
4447
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-PS5CSPGS.js");
|
|
4448
4448
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
4449
4449
|
sessionManager.clearMessageQueue(sessionId);
|
|
4450
4450
|
stopSessionExecution(sessionId, sessionManager);
|
|
4451
4451
|
abortSession(sessionId);
|
|
4452
4452
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
4453
4453
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
4454
|
-
const eventStore = (await import("./events-
|
|
4454
|
+
const eventStore = (await import("./events-THW3MYXE.js")).getEventStore();
|
|
4455
4455
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
4456
4456
|
res.json({ success: true, queuedMessages });
|
|
4457
4457
|
});
|
|
@@ -4465,7 +4465,7 @@ async function createServerHandle(config4) {
|
|
|
4465
4465
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
4466
4466
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
4467
4467
|
}
|
|
4468
|
-
const { truncateSessionMessages } = await import("./events-
|
|
4468
|
+
const { truncateSessionMessages } = await import("./events-THW3MYXE.js");
|
|
4469
4469
|
truncateSessionMessages(sessionId, messageIndex);
|
|
4470
4470
|
res.json({ success: true });
|
|
4471
4471
|
});
|
|
@@ -4483,7 +4483,7 @@ async function createServerHandle(config4) {
|
|
|
4483
4483
|
if (!msg) {
|
|
4484
4484
|
return res.status(400).json({ error: "Message not found at this index" });
|
|
4485
4485
|
}
|
|
4486
|
-
const { truncateSessionMessages } = await import("./events-
|
|
4486
|
+
const { truncateSessionMessages } = await import("./events-THW3MYXE.js");
|
|
4487
4487
|
truncateSessionMessages(sessionId, messageIndex - 1);
|
|
4488
4488
|
sessionManager.queueMessage(sessionId, "asap", msg.content, msg.attachments, msg.messageKind);
|
|
4489
4489
|
res.json({ success: true });
|
|
@@ -4515,7 +4515,7 @@ async function createServerHandle(config4) {
|
|
|
4515
4515
|
res.json({ accepted: true });
|
|
4516
4516
|
});
|
|
4517
4517
|
app.get("/api/settings", async (req, res) => {
|
|
4518
|
-
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-
|
|
4518
|
+
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
|
|
4519
4519
|
const keysParam = req.query["keys"];
|
|
4520
4520
|
if (!keysParam) {
|
|
4521
4521
|
return res.status(400).json({ error: "keys query parameter is required" });
|
|
@@ -4528,19 +4528,19 @@ async function createServerHandle(config4) {
|
|
|
4528
4528
|
res.json(result);
|
|
4529
4529
|
});
|
|
4530
4530
|
app.get("/api/settings/:key", async (req, res) => {
|
|
4531
|
-
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-
|
|
4531
|
+
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
|
|
4532
4532
|
const key = req.params.key;
|
|
4533
4533
|
const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
4534
4534
|
res.json({ key, value });
|
|
4535
4535
|
});
|
|
4536
4536
|
app.get("/api/settings/:key", async (req, res) => {
|
|
4537
|
-
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-
|
|
4537
|
+
const { getSetting, SETTINGS_DEFAULTS } = await import("./settings-L2V4ZUA2.js");
|
|
4538
4538
|
const key = req.params.key;
|
|
4539
4539
|
const value = getSetting(key) ?? SETTINGS_DEFAULTS[key] ?? null;
|
|
4540
4540
|
res.json({ key, value });
|
|
4541
4541
|
});
|
|
4542
4542
|
app.put("/api/settings/:key", async (req, res) => {
|
|
4543
|
-
const { setSetting } = await import("./settings-
|
|
4543
|
+
const { setSetting } = await import("./settings-L2V4ZUA2.js");
|
|
4544
4544
|
const key = req.params.key;
|
|
4545
4545
|
const { value } = req.body;
|
|
4546
4546
|
if (value === void 0) {
|
|
@@ -4555,7 +4555,7 @@ async function createServerHandle(config4) {
|
|
|
4555
4555
|
let visionFallback;
|
|
4556
4556
|
let globalWorkdir;
|
|
4557
4557
|
try {
|
|
4558
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
4558
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-S5CF4QU4.js");
|
|
4559
4559
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4560
4560
|
const fallback = getVisionFallback(globalConfig);
|
|
4561
4561
|
if (fallback) {
|
|
@@ -4652,7 +4652,7 @@ async function createServerHandle(config4) {
|
|
|
4652
4652
|
const apiKey = req.query["apiKey"];
|
|
4653
4653
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
4654
4654
|
try {
|
|
4655
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
4655
|
+
const { fetchModelsWithContext } = await import("./provider-manager-5UZXYOZZ.js");
|
|
4656
4656
|
const models = await fetchModelsWithContext(url, apiKey);
|
|
4657
4657
|
if (models.length === 0) {
|
|
4658
4658
|
return res.status(404).json({ error: `No models found at ${buildModelsUrl(url)}`, url });
|
|
@@ -4680,7 +4680,7 @@ async function createServerHandle(config4) {
|
|
|
4680
4680
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
4681
4681
|
if (!models?.length) return res.status(400).json({ error: "models is required" });
|
|
4682
4682
|
try {
|
|
4683
|
-
const { autoConfig } = await import("./auto-config-
|
|
4683
|
+
const { autoConfig } = await import("./auto-config-F5Y6KAQ6.js");
|
|
4684
4684
|
const result = await autoConfig({
|
|
4685
4685
|
url,
|
|
4686
4686
|
...apiKey ? { apiKey } : {},
|
|
@@ -4698,11 +4698,11 @@ async function createServerHandle(config4) {
|
|
|
4698
4698
|
if (!model) return res.status(400).json({ error: "model is required" });
|
|
4699
4699
|
if (!mode) return res.status(400).json({ error: "mode is required" });
|
|
4700
4700
|
try {
|
|
4701
|
-
const { getModelProfile: getModelProfile2 } = await import("./profiles-
|
|
4702
|
-
const { getBackendCapabilities } = await import("./backend-
|
|
4703
|
-
const { buildNonStreamingCreateParams } = await import("./client-pure-
|
|
4704
|
-
const { OpenAIHttpClient } = await import("./http-client-
|
|
4705
|
-
const { ensureVersionPrefix } = await import("./url-utils-
|
|
4701
|
+
const { getModelProfile: getModelProfile2 } = await import("./profiles-5J7F4BML.js");
|
|
4702
|
+
const { getBackendCapabilities } = await import("./backend-4HGUPY6W.js");
|
|
4703
|
+
const { buildNonStreamingCreateParams } = await import("./client-pure-DO3S675T.js");
|
|
4704
|
+
const { OpenAIHttpClient } = await import("./http-client-3OLSDU63.js");
|
|
4705
|
+
const { ensureVersionPrefix } = await import("./url-utils-SAJP7AEX.js");
|
|
4706
4706
|
const profile = getModelProfile2(model);
|
|
4707
4707
|
const capabilities = getBackendCapabilities(backend || "unknown");
|
|
4708
4708
|
const modelSettings = {};
|
|
@@ -4768,7 +4768,7 @@ async function createServerHandle(config4) {
|
|
|
4768
4768
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
4769
4769
|
}
|
|
4770
4770
|
try {
|
|
4771
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
4771
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-S5CF4QU4.js");
|
|
4772
4772
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4773
4773
|
const providerBackend = backend;
|
|
4774
4774
|
const providerModels = modelConfigs?.length ? buildModelConfigs(modelConfigs) : model ? [{ id: model, contextWindow: 2e5, source: "user" }] : [];
|
|
@@ -4806,7 +4806,7 @@ async function createServerHandle(config4) {
|
|
|
4806
4806
|
app.post("/api/init/config", async (req, res) => {
|
|
4807
4807
|
const { workdir, visionFallback } = req.body;
|
|
4808
4808
|
try {
|
|
4809
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
4809
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-S5CF4QU4.js");
|
|
4810
4810
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4811
4811
|
const updatedConfig = {
|
|
4812
4812
|
...globalConfig,
|
|
@@ -4834,7 +4834,7 @@ async function createServerHandle(config4) {
|
|
|
4834
4834
|
});
|
|
4835
4835
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
4836
4836
|
const { id } = req.params;
|
|
4837
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
4837
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-S5CF4QU4.js");
|
|
4838
4838
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4839
4839
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
4840
4840
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -4846,7 +4846,7 @@ async function createServerHandle(config4) {
|
|
|
4846
4846
|
const { id } = req.params;
|
|
4847
4847
|
const { isLocal } = req.body;
|
|
4848
4848
|
try {
|
|
4849
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
4849
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-S5CF4QU4.js");
|
|
4850
4850
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4851
4851
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
4852
4852
|
if (!provider) {
|
|
@@ -4875,7 +4875,7 @@ async function createServerHandle(config4) {
|
|
|
4875
4875
|
models: modelConfigs
|
|
4876
4876
|
} = req.body;
|
|
4877
4877
|
try {
|
|
4878
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
4878
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-S5CF4QU4.js");
|
|
4879
4879
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4880
4880
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
4881
4881
|
if (!provider) {
|
|
@@ -4913,7 +4913,7 @@ async function createServerHandle(config4) {
|
|
|
4913
4913
|
return res.status(400).json({ error: result.error });
|
|
4914
4914
|
}
|
|
4915
4915
|
const llmClient = getLLMClient();
|
|
4916
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
4916
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-S5CF4QU4.js");
|
|
4917
4917
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
4918
4918
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
4919
4919
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -4939,8 +4939,8 @@ async function createServerHandle(config4) {
|
|
|
4939
4939
|
});
|
|
4940
4940
|
});
|
|
4941
4941
|
async function rebuildMcpTools() {
|
|
4942
|
-
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-
|
|
4943
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4942
|
+
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
4943
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-PS5CSPGS.js");
|
|
4944
4944
|
const mcpTools = createMcpTools2(mcpManager);
|
|
4945
4945
|
setMcpTools2(mcpTools);
|
|
4946
4946
|
}
|
|
@@ -5002,7 +5002,7 @@ async function createServerHandle(config4) {
|
|
|
5002
5002
|
};
|
|
5003
5003
|
await mcpManager.addServer(name, serverCfg);
|
|
5004
5004
|
const server = mcpManager.getServer(name);
|
|
5005
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5005
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-S5CF4QU4.js");
|
|
5006
5006
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
5007
5007
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {}, [name]: serverCfg };
|
|
5008
5008
|
await saveGlobalConfig(config4.mode ?? "production", {
|
|
@@ -5028,7 +5028,7 @@ async function createServerHandle(config4) {
|
|
|
5028
5028
|
return res.status(404).json({ error: `MCP server '${name}' not found` });
|
|
5029
5029
|
}
|
|
5030
5030
|
mcpManager.removeServer(name);
|
|
5031
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5031
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-S5CF4QU4.js");
|
|
5032
5032
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
5033
5033
|
const updatedMcpServers = { ...globalConfig.mcpServers ?? {} };
|
|
5034
5034
|
delete updatedMcpServers[name];
|
|
@@ -5053,7 +5053,7 @@ async function createServerHandle(config4) {
|
|
|
5053
5053
|
await mcpManager.setToolEnabled(name, toolName, enabled);
|
|
5054
5054
|
const server = mcpManager.getServer(name);
|
|
5055
5055
|
if (server) {
|
|
5056
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5056
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-S5CF4QU4.js");
|
|
5057
5057
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
5058
5058
|
const mcpServers2 = { ...globalConfig.mcpServers ?? {} };
|
|
5059
5059
|
const serverCfg = mcpServers2[name];
|
|
@@ -5099,13 +5099,13 @@ async function createServerHandle(config4) {
|
|
|
5099
5099
|
})
|
|
5100
5100
|
);
|
|
5101
5101
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
5102
|
-
const { getSessionProcesses } = await import("./manager-
|
|
5102
|
+
const { getSessionProcesses } = await import("./manager-R3EMNOPR.js");
|
|
5103
5103
|
const sessionId = req.params.id;
|
|
5104
5104
|
const processes = getSessionProcesses(sessionId);
|
|
5105
5105
|
res.json({ processes });
|
|
5106
5106
|
});
|
|
5107
5107
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
5108
|
-
const { stopProcess } = await import("./manager-
|
|
5108
|
+
const { stopProcess } = await import("./manager-R3EMNOPR.js");
|
|
5109
5109
|
const sessionId = req.params.id;
|
|
5110
5110
|
const processId = req.params.processId;
|
|
5111
5111
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5119,7 +5119,7 @@ async function createServerHandle(config4) {
|
|
|
5119
5119
|
res.status(500).json({ error: err instanceof Error ? err.message : "Failed to stop process" });
|
|
5120
5120
|
}
|
|
5121
5121
|
});
|
|
5122
|
-
const { getCurrentBranch } = await import("./branch.api-
|
|
5122
|
+
const { getCurrentBranch } = await import("./branch.api-5DMEAIBI.js");
|
|
5123
5123
|
app.get("/api/branch", async (req, res) => {
|
|
5124
5124
|
await getCurrentBranch(req, res);
|
|
5125
5125
|
});
|
|
@@ -5248,7 +5248,7 @@ async function createServerHandle(config4) {
|
|
|
5248
5248
|
const state = sessionManager.getContextState(sessionId);
|
|
5249
5249
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
5250
5250
|
});
|
|
5251
|
-
const { QueueProcessor } = await import("./processor-
|
|
5251
|
+
const { QueueProcessor } = await import("./processor-T6FX54JU.js");
|
|
5252
5252
|
const queueProcessor = new QueueProcessor({
|
|
5253
5253
|
sessionManager,
|
|
5254
5254
|
providerManager,
|
|
@@ -5289,9 +5289,9 @@ async function createServerHandle(config4) {
|
|
|
5289
5289
|
void (async () => {
|
|
5290
5290
|
await devServerManager.stopAll();
|
|
5291
5291
|
await mcpManager.disconnectAll();
|
|
5292
|
-
const { stopAllInspectProxies } = await import("./inspect-proxy-
|
|
5292
|
+
const { stopAllInspectProxies } = await import("./inspect-proxy-BV25JERQ.js");
|
|
5293
5293
|
stopAllInspectProxies();
|
|
5294
|
-
const { cleanupAllProcesses } = await import("./store-
|
|
5294
|
+
const { cleanupAllProcesses } = await import("./store-SF7CDOQT.js");
|
|
5295
5295
|
cleanupAllProcesses();
|
|
5296
5296
|
viteServer?.close();
|
|
5297
5297
|
for (const client of wss.clients) {
|
|
@@ -5323,4 +5323,4 @@ export {
|
|
|
5323
5323
|
createServerHandle,
|
|
5324
5324
|
createServer
|
|
5325
5325
|
};
|
|
5326
|
-
//# sourceMappingURL=chunk-
|
|
5326
|
+
//# sourceMappingURL=chunk-FZ5LNBZS.js.map
|
|
@@ -126,7 +126,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
126
126
|
client = deps.getLLMClient();
|
|
127
127
|
client.setModel(providerConfig.model);
|
|
128
128
|
} else if (providerConfig) {
|
|
129
|
-
const { createLLMClient } = await import("./client-
|
|
129
|
+
const { createLLMClient } = await import("./client-ZUL4AR4J.js");
|
|
130
130
|
client = createLLMClient({
|
|
131
131
|
llm: {
|
|
132
132
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
buildRunChatTurnParams,
|
|
176
176
|
generateSessionNameForSession
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-NVQFIZJI.js.map
|
|
@@ -2261,7 +2261,7 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
|
|
|
2261
2261
|
type: "chat.ask_user",
|
|
2262
2262
|
data: { callId: error.callId, question: error.question, type: error.type, options: error.options }
|
|
2263
2263
|
});
|
|
2264
|
-
const { awaitAnswer } = await import("./ask-
|
|
2264
|
+
const { awaitAnswer } = await import("./ask-TOBEA6KD.js");
|
|
2265
2265
|
const answerPromise = awaitAnswer(error.callId);
|
|
2266
2266
|
if (!answerPromise) {
|
|
2267
2267
|
throw new Error(`No pending question found for callId: ${error.callId}`);
|
|
@@ -2581,7 +2581,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2581
2581
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
|
|
2582
2582
|
if (!compacting) {
|
|
2583
2583
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
2584
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2584
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-TJEAAZL3.js");
|
|
2585
2585
|
if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
|
|
2586
2586
|
appendCompactionPrompt(sessionId, append);
|
|
2587
2587
|
compacting = true;
|
|
@@ -2938,7 +2938,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
|
|
|
2938
2938
|
import { createHash as createHash2 } from "crypto";
|
|
2939
2939
|
async function loadVisionModelFromGlobalConfig() {
|
|
2940
2940
|
try {
|
|
2941
|
-
const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-
|
|
2941
|
+
const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-S5CF4QU4.js");
|
|
2942
2942
|
const runtimeConfig = getRuntimeConfig();
|
|
2943
2943
|
const mode = runtimeConfig.mode ?? "production";
|
|
2944
2944
|
const globalConfig = await loadGlobalConfig2(mode);
|
|
@@ -3452,7 +3452,7 @@ var callSubAgentTool = {
|
|
|
3452
3452
|
};
|
|
3453
3453
|
}
|
|
3454
3454
|
try {
|
|
3455
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3455
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-PS5CSPGS.js");
|
|
3456
3456
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3457
3457
|
const turnMetrics = new TurnMetrics();
|
|
3458
3458
|
const result = await executeSubAgent({
|
|
@@ -4268,7 +4268,7 @@ function resolveAgentDef2(sessionManager, sessionId) {
|
|
|
4268
4268
|
}
|
|
4269
4269
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
4270
4270
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
4271
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
4271
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-PS5CSPGS.js");
|
|
4272
4272
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
4273
4273
|
const toolFingerprint = getToolFingerprint(tools);
|
|
4274
4274
|
const allAgents = await loadAllAgentsDefault();
|
|
@@ -4281,7 +4281,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
|
4281
4281
|
async function computeSessionHash(sessionManager, sessionId) {
|
|
4282
4282
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
4283
4283
|
const agentDef = await resolveAgentDef2(sessionManager, sessionId);
|
|
4284
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
4284
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-PS5CSPGS.js");
|
|
4285
4285
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
4286
4286
|
const toolFingerprint = getToolFingerprint(tools);
|
|
4287
4287
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
|
|
@@ -4388,7 +4388,7 @@ var mcpConfigTool = createTool(
|
|
|
4388
4388
|
await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
|
|
4389
4389
|
}
|
|
4390
4390
|
async function rebuildTools() {
|
|
4391
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4391
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-PS5CSPGS.js");
|
|
4392
4392
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4393
4393
|
setMcpTools2(mcpTools);
|
|
4394
4394
|
}
|
|
@@ -5058,4 +5058,4 @@ export {
|
|
|
5058
5058
|
getToolRegistryForAgent,
|
|
5059
5059
|
createToolRegistry
|
|
5060
5060
|
};
|
|
5061
|
-
//# sourceMappingURL=chunk-
|
|
5061
|
+
//# sourceMappingURL=chunk-TT6LDJU5.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
loadAllAgentsDefault,
|
|
13
13
|
processEventsForConversation,
|
|
14
14
|
runTopLevelAgentLoop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TT6LDJU5.js";
|
|
16
16
|
import {
|
|
17
17
|
TurnMetrics,
|
|
18
18
|
WORKFLOW_KICKOFF_PROMPT,
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
|
|
40
40
|
// src/server/chat/orchestrator.ts
|
|
41
41
|
async function buildRetryPatterns() {
|
|
42
|
-
const { getSetting, SETTINGS_KEYS } = await import("./settings-
|
|
42
|
+
const { getSetting, SETTINGS_KEYS } = await import("./settings-L2V4ZUA2.js");
|
|
43
43
|
const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
|
|
44
44
|
if (!raw) {
|
|
45
45
|
const oldXmlProtection = getSetting("llm.disableXmlProtection");
|
|
@@ -310,4 +310,4 @@ export {
|
|
|
310
310
|
runAgentTurn,
|
|
311
311
|
injectWorkflowKickoffIfNeeded
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-ULZORR3T.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
injectWorkflowKickoffIfNeeded,
|
|
3
3
|
runAgentTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ULZORR3T.js";
|
|
6
6
|
import {
|
|
7
7
|
applyDynamicContext,
|
|
8
8
|
checkAborted,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
loadAllAgentsDefault,
|
|
17
17
|
saveItemToDir,
|
|
18
18
|
spawnShellProcess
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-TT6LDJU5.js";
|
|
20
20
|
import {
|
|
21
21
|
getPlatformShell,
|
|
22
22
|
onProcessEvent
|
|
@@ -1372,6 +1372,7 @@ function processQueueAndRestartTurn(sessionManager, sessionId, drainFn, queueMod
|
|
|
1372
1372
|
return true;
|
|
1373
1373
|
}
|
|
1374
1374
|
var activeAgents = /* @__PURE__ */ new Map();
|
|
1375
|
+
var abortedSessions = /* @__PURE__ */ new Set();
|
|
1375
1376
|
var MAX_SEND_QUEUE_SIZE = 1e3;
|
|
1376
1377
|
function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvider, sessionManager, providerManager) {
|
|
1377
1378
|
const wss = new WebSocketServer({ server: httpServer });
|
|
@@ -1483,6 +1484,13 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
|
|
|
1483
1484
|
return;
|
|
1484
1485
|
}
|
|
1485
1486
|
activeAgents.delete(sessionId);
|
|
1487
|
+
if (abortedSessions.has(sessionId)) {
|
|
1488
|
+
abortedSessions.delete(sessionId);
|
|
1489
|
+
sessionManager.clearMessageQueue(sessionId);
|
|
1490
|
+
const contextState2 = sessionManager.getContextState(sessionId);
|
|
1491
|
+
sendFn(sessionId, createContextStateMessage(contextState2));
|
|
1492
|
+
return;
|
|
1493
|
+
}
|
|
1486
1494
|
const processed = processQueueAndRestartTurn(
|
|
1487
1495
|
sessionManager,
|
|
1488
1496
|
sessionId,
|
|
@@ -1684,6 +1692,7 @@ function createWebSocketServer(httpServer, config, getLLMClient, getActiveProvid
|
|
|
1684
1692
|
return {
|
|
1685
1693
|
wss,
|
|
1686
1694
|
abortSession: (sessionId) => {
|
|
1695
|
+
abortedSessions.add(sessionId);
|
|
1687
1696
|
const controller = activeAgents.get(sessionId);
|
|
1688
1697
|
if (controller) {
|
|
1689
1698
|
activeAgents.delete(sessionId);
|
|
@@ -2056,4 +2065,4 @@ export {
|
|
|
2056
2065
|
signalMcpReady,
|
|
2057
2066
|
createWebSocketServer
|
|
2058
2067
|
};
|
|
2059
|
-
//# sourceMappingURL=chunk-
|
|
2068
|
+
//# sourceMappingURL=chunk-V234MYXB.js.map
|