openfox 2.0.53 → 2.0.54
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/{chat-handler-FGRCJX76.js → chat-handler-SEMT4SD5.js} +5 -5
- package/dist/{chunk-3KVWOPRN.js → chunk-55LI67AH.js} +11 -45
- package/dist/{chunk-VRGRAQDG.js → chunk-CYJEQF7U.js} +79 -9
- package/dist/{chunk-QOHRXWK4.js → chunk-GFAKHMIJ.js} +2 -2
- package/dist/{chunk-KUE7ASKH.js → chunk-GGDYDMIC.js} +20 -20
- package/dist/{chunk-HVLNOTRE.js → chunk-KPKQNJAG.js} +4 -4
- package/dist/{chunk-PBGOZMVY.js → chunk-OCILP3SJ.js} +11 -39
- package/dist/{chunk-N3Z4SMEH.js → chunk-VCT4DBJC.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{manager-R3EMNOPR.js → manager-FV4BDEVU.js} +3 -3
- package/dist/{orchestrator-5LSO63RB.js → orchestrator-NPPNYDJJ.js} +5 -5
- package/dist/package.json +1 -1
- package/dist/{processor-F5FMOPOQ.js → processor-WJQILWUH.js} +5 -5
- package/dist/{serve-DMHI2CWZ.js → serve-ZZ2IGSZK.js} +7 -7
- package/dist/server/index.js +6 -6
- package/dist/{server-ZQ5NGHPD.js → server-GCB67HAC.js} +6 -6
- package/dist/{store-SF7CDOQT.js → store-TTU4UQQ7.js} +2 -2
- package/dist/{tools-2QMJFAXE.js → tools-NGAV5NZF.js} +4 -4
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
} from "./chunk-UOKVBO67.js";
|
|
6
6
|
import {
|
|
7
7
|
runChatTurn
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-VCT4DBJC.js";
|
|
9
|
+
import "./chunk-55LI67AH.js";
|
|
10
10
|
import "./chunk-LBGHZLLH.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-OCILP3SJ.js";
|
|
12
|
+
import "./chunk-CYJEQF7U.js";
|
|
13
13
|
import "./chunk-NWO6GRYE.js";
|
|
14
14
|
import {
|
|
15
15
|
createChatMessageMessage,
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
startChatSession,
|
|
155
155
|
stopSessionExecution
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=chat-handler-
|
|
157
|
+
//# sourceMappingURL=chat-handler-SEMT4SD5.js.map
|
|
@@ -9,11 +9,12 @@ import {
|
|
|
9
9
|
getSessionProcesses,
|
|
10
10
|
startProcessCommand,
|
|
11
11
|
stopProcess
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OCILP3SJ.js";
|
|
13
13
|
import {
|
|
14
14
|
getMaxPerSession,
|
|
15
|
-
getSessionProcessCount
|
|
16
|
-
|
|
15
|
+
getSessionProcessCount,
|
|
16
|
+
terminateProcessTree
|
|
17
|
+
} from "./chunk-CYJEQF7U.js";
|
|
17
18
|
import {
|
|
18
19
|
createMcpTools
|
|
19
20
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -1356,41 +1357,6 @@ function spawnShellProcess(command, cwd, _signal, detached = false) {
|
|
|
1356
1357
|
});
|
|
1357
1358
|
}
|
|
1358
1359
|
|
|
1359
|
-
// src/server/utils/process-tree.ts
|
|
1360
|
-
import { spawn as spawn2 } from "child_process";
|
|
1361
|
-
import { setTimeout as sleep } from "timers/promises";
|
|
1362
|
-
var SIGKILL_TIMEOUT_MS = 200;
|
|
1363
|
-
async function terminateProcessTree(proc, options) {
|
|
1364
|
-
const pid = proc.pid;
|
|
1365
|
-
if (!pid || options?.exited?.()) {
|
|
1366
|
-
return;
|
|
1367
|
-
}
|
|
1368
|
-
if (process.platform === "win32") {
|
|
1369
|
-
await new Promise((resolve6) => {
|
|
1370
|
-
const killer = spawn2("taskkill", ["/pid", String(pid), "/f", "/t"], {
|
|
1371
|
-
stdio: "ignore",
|
|
1372
|
-
windowsHide: true
|
|
1373
|
-
});
|
|
1374
|
-
killer.once("exit", () => resolve6());
|
|
1375
|
-
killer.once("error", () => resolve6());
|
|
1376
|
-
});
|
|
1377
|
-
return;
|
|
1378
|
-
}
|
|
1379
|
-
try {
|
|
1380
|
-
process.kill(-pid, "SIGTERM");
|
|
1381
|
-
await sleep(SIGKILL_TIMEOUT_MS);
|
|
1382
|
-
if (!options?.exited?.()) {
|
|
1383
|
-
process.kill(-pid, "SIGKILL");
|
|
1384
|
-
}
|
|
1385
|
-
} catch {
|
|
1386
|
-
proc.kill("SIGTERM");
|
|
1387
|
-
await sleep(SIGKILL_TIMEOUT_MS);
|
|
1388
|
-
if (!options?.exited?.()) {
|
|
1389
|
-
proc.kill("SIGKILL");
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
1360
|
// src/server/tools/shell-tail.ts
|
|
1395
1361
|
var TAIL_END_RE = /^(.*?)\s*\|\s*tail\s+(?:-n\s+)?-?(\d+)\s*$/;
|
|
1396
1362
|
function stripTailPipe(command) {
|
|
@@ -3481,7 +3447,7 @@ var callSubAgentTool = {
|
|
|
3481
3447
|
};
|
|
3482
3448
|
}
|
|
3483
3449
|
try {
|
|
3484
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3450
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-NGAV5NZF.js");
|
|
3485
3451
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3486
3452
|
const turnMetrics = new TurnMetrics();
|
|
3487
3453
|
const result = await executeSubAgent({
|
|
@@ -3731,7 +3697,7 @@ var webFetchTool = createTool(
|
|
|
3731
3697
|
);
|
|
3732
3698
|
|
|
3733
3699
|
// src/server/dev-server/manager.ts
|
|
3734
|
-
import { spawn as
|
|
3700
|
+
import { spawn as spawn2 } from "child_process";
|
|
3735
3701
|
import { readFile as readFile7, writeFile as writeFile6, mkdir as mkdir5 } from "fs/promises";
|
|
3736
3702
|
import { resolve as resolve5, join as join7 } from "path";
|
|
3737
3703
|
var MAX_LOG_LINES = 2e3;
|
|
@@ -3845,7 +3811,7 @@ var DevServerManager = class {
|
|
|
3845
3811
|
}
|
|
3846
3812
|
const resolved = this.resolveWorkdir(workdir);
|
|
3847
3813
|
const shell = getPlatformShell();
|
|
3848
|
-
const proc =
|
|
3814
|
+
const proc = spawn2(shell.command, [...shell.args, config.command], {
|
|
3849
3815
|
cwd: resolved,
|
|
3850
3816
|
env: { ...process.env, FORCE_COLOR: "1" },
|
|
3851
3817
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -4297,7 +4263,7 @@ function resolveAgentDef2(sessionManager, sessionId) {
|
|
|
4297
4263
|
}
|
|
4298
4264
|
async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
4299
4265
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
4300
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
4266
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-NGAV5NZF.js");
|
|
4301
4267
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
4302
4268
|
const toolFingerprint = getToolFingerprint(tools);
|
|
4303
4269
|
const allAgents = await loadAllAgentsDefault();
|
|
@@ -4310,7 +4276,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
|
|
|
4310
4276
|
async function computeSessionHash(sessionManager, sessionId) {
|
|
4311
4277
|
const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
|
|
4312
4278
|
const agentDef = await resolveAgentDef2(sessionManager, sessionId);
|
|
4313
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
4279
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-NGAV5NZF.js");
|
|
4314
4280
|
const tools = getToolRegistryForAgent2(agentDef).definitions;
|
|
4315
4281
|
const toolFingerprint = getToolFingerprint(tools);
|
|
4316
4282
|
return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
|
|
@@ -4417,7 +4383,7 @@ var mcpConfigTool = createTool(
|
|
|
4417
4383
|
await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
|
|
4418
4384
|
}
|
|
4419
4385
|
async function rebuildTools() {
|
|
4420
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4386
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-NGAV5NZF.js");
|
|
4421
4387
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4422
4388
|
setMcpTools2(mcpTools);
|
|
4423
4389
|
}
|
|
@@ -5087,4 +5053,4 @@ export {
|
|
|
5087
5053
|
getToolRegistryForAgent,
|
|
5088
5054
|
createToolRegistry
|
|
5089
5055
|
};
|
|
5090
|
-
//# sourceMappingURL=chunk-
|
|
5056
|
+
//# sourceMappingURL=chunk-55LI67AH.js.map
|
|
@@ -1,3 +1,78 @@
|
|
|
1
|
+
// src/server/utils/process-tree.ts
|
|
2
|
+
import { spawn, execFile } from "child_process";
|
|
3
|
+
import { setTimeout as sleep } from "timers/promises";
|
|
4
|
+
var SIGKILL_TIMEOUT_MS = 200;
|
|
5
|
+
async function getDescendantPids(rootPid) {
|
|
6
|
+
try {
|
|
7
|
+
const { stdout } = await new Promise((resolve, reject) => {
|
|
8
|
+
execFile("ps", ["-eo", "pid=,ppid="], { timeout: 5e3 }, (err, stdout2) => {
|
|
9
|
+
if (err) reject(err);
|
|
10
|
+
else resolve({ stdout: stdout2 });
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
const children = /* @__PURE__ */ new Map();
|
|
14
|
+
for (const line of stdout.trim().split("\n")) {
|
|
15
|
+
const parts = line.trim().split(/\s+/);
|
|
16
|
+
const pid = parseInt(parts[0], 10);
|
|
17
|
+
const ppid = parseInt(parts[1], 10);
|
|
18
|
+
if (!isNaN(pid) && !isNaN(ppid) && pid > 0 && ppid >= 0) {
|
|
19
|
+
if (!children.has(ppid)) children.set(ppid, []);
|
|
20
|
+
children.get(ppid).push(pid);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
const descendants = [];
|
|
24
|
+
const queue = [rootPid];
|
|
25
|
+
while (queue.length > 0) {
|
|
26
|
+
const current = queue.shift();
|
|
27
|
+
const kids = children.get(current);
|
|
28
|
+
if (kids) {
|
|
29
|
+
for (const kid of kids) {
|
|
30
|
+
descendants.push(kid);
|
|
31
|
+
queue.push(kid);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return descendants;
|
|
36
|
+
} catch {
|
|
37
|
+
return [];
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function killProcess(pid, signal) {
|
|
41
|
+
try {
|
|
42
|
+
process.kill(pid, signal);
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
async function killProcessTree(pid) {
|
|
47
|
+
if (process.platform === "win32") {
|
|
48
|
+
await new Promise((resolve) => {
|
|
49
|
+
const killer = spawn("taskkill", ["/pid", String(pid), "/f", "/t"], {
|
|
50
|
+
stdio: "ignore",
|
|
51
|
+
windowsHide: true
|
|
52
|
+
});
|
|
53
|
+
killer.once("exit", () => resolve());
|
|
54
|
+
killer.once("error", () => resolve());
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const allPids = await getDescendantPids(pid);
|
|
59
|
+
allPids.push(pid);
|
|
60
|
+
for (const p of allPids) {
|
|
61
|
+
killProcess(p, "SIGTERM");
|
|
62
|
+
}
|
|
63
|
+
await sleep(SIGKILL_TIMEOUT_MS);
|
|
64
|
+
for (const p of allPids) {
|
|
65
|
+
killProcess(p, "SIGKILL");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
async function terminateProcessTree(proc, options) {
|
|
69
|
+
const pid = proc.pid;
|
|
70
|
+
if (!pid || options?.exited?.()) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
await killProcessTree(pid);
|
|
74
|
+
}
|
|
75
|
+
|
|
1
76
|
// src/server/tools/background-process/store.ts
|
|
2
77
|
var MAX_PER_SESSION = 5;
|
|
3
78
|
var processesBySession = /* @__PURE__ */ new Map();
|
|
@@ -115,14 +190,7 @@ function cleanupAllProcesses() {
|
|
|
115
190
|
for (const sessionProcesses of processesBySession.values()) {
|
|
116
191
|
for (const proc of sessionProcesses.values()) {
|
|
117
192
|
if (proc.status === "running" && proc.pid) {
|
|
118
|
-
|
|
119
|
-
process.kill(-proc.pid, "SIGTERM");
|
|
120
|
-
} catch {
|
|
121
|
-
try {
|
|
122
|
-
process.kill(proc.pid, "SIGTERM");
|
|
123
|
-
} catch {
|
|
124
|
-
}
|
|
125
|
-
}
|
|
193
|
+
killProcessTree(proc.pid);
|
|
126
194
|
}
|
|
127
195
|
}
|
|
128
196
|
}
|
|
@@ -131,6 +199,8 @@ function cleanupAllProcesses() {
|
|
|
131
199
|
}
|
|
132
200
|
|
|
133
201
|
export {
|
|
202
|
+
killProcessTree,
|
|
203
|
+
terminateProcessTree,
|
|
134
204
|
getMaxPerSession,
|
|
135
205
|
getProcess,
|
|
136
206
|
getSessionProcesses,
|
|
@@ -146,4 +216,4 @@ export {
|
|
|
146
216
|
getProcessById,
|
|
147
217
|
cleanupAllProcesses
|
|
148
218
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
219
|
+
//# sourceMappingURL=chunk-CYJEQF7U.js.map
|
|
@@ -208,7 +208,7 @@ async function runCli(options) {
|
|
|
208
208
|
if (!configExists) {
|
|
209
209
|
await runNetworkSetup(mode);
|
|
210
210
|
}
|
|
211
|
-
const { runServe } = await import("./serve-
|
|
211
|
+
const { runServe } = await import("./serve-ZZ2IGSZK.js");
|
|
212
212
|
const serveOptions = { mode };
|
|
213
213
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
214
214
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -220,4 +220,4 @@ async function runCli(options) {
|
|
|
220
220
|
export {
|
|
221
221
|
runCli
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-GFAKHMIJ.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KPKQNJAG.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -61,11 +61,11 @@ import {
|
|
|
61
61
|
setMcpTools,
|
|
62
62
|
setNotifyMcpServersChanged,
|
|
63
63
|
skillExists
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-55LI67AH.js";
|
|
65
65
|
import {
|
|
66
66
|
getPathSeparator,
|
|
67
67
|
isAbsolutePath
|
|
68
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-OCILP3SJ.js";
|
|
69
69
|
import {
|
|
70
70
|
createMcpTools
|
|
71
71
|
} from "./chunk-NWO6GRYE.js";
|
|
@@ -3849,7 +3849,7 @@ import { Router as Router7 } from "express";
|
|
|
3849
3849
|
import { spawn as spawn2 } from "child_process";
|
|
3850
3850
|
|
|
3851
3851
|
// src/constants.ts
|
|
3852
|
-
var VERSION = "2.0.
|
|
3852
|
+
var VERSION = "2.0.54";
|
|
3853
3853
|
|
|
3854
3854
|
// src/server/routes/auto-update.ts
|
|
3855
3855
|
var updateInProgress = false;
|
|
@@ -4050,7 +4050,7 @@ async function createServerHandle(config4) {
|
|
|
4050
4050
|
setMcpTools(mcpTools);
|
|
4051
4051
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
4052
4052
|
}
|
|
4053
|
-
const { signalMcpReady } = await import("./server-
|
|
4053
|
+
const { signalMcpReady } = await import("./server-GCB67HAC.js");
|
|
4054
4054
|
signalMcpReady();
|
|
4055
4055
|
});
|
|
4056
4056
|
const app = express();
|
|
@@ -4243,7 +4243,7 @@ async function createServerHandle(config4) {
|
|
|
4243
4243
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
4244
4244
|
const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
|
|
4245
4245
|
const { buildMessagesFromStoredEvents } = await import("./folding-2BGFLV5J.js");
|
|
4246
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4246
|
+
const { getPendingQuestionsForSession } = await import("./tools-NGAV5NZF.js");
|
|
4247
4247
|
const session = sessionManager.getSession(req.params.id);
|
|
4248
4248
|
if (!session) {
|
|
4249
4249
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -4262,8 +4262,8 @@ async function createServerHandle(config4) {
|
|
|
4262
4262
|
if (!session) {
|
|
4263
4263
|
return res.status(404).json({ error: "Session not found" });
|
|
4264
4264
|
}
|
|
4265
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
4266
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
4265
|
+
const { stopSessionExecution } = await import("./chat-handler-SEMT4SD5.js");
|
|
4266
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NGAV5NZF.js");
|
|
4267
4267
|
sessionManager.clearMessageQueue(sessionId);
|
|
4268
4268
|
stopSessionExecution(sessionId, sessionManager);
|
|
4269
4269
|
abortSession(sessionId);
|
|
@@ -4417,7 +4417,7 @@ async function createServerHandle(config4) {
|
|
|
4417
4417
|
if (!callId || approved === void 0) {
|
|
4418
4418
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
4419
4419
|
}
|
|
4420
|
-
const { providePathConfirmation } = await import("./tools-
|
|
4420
|
+
const { providePathConfirmation } = await import("./tools-NGAV5NZF.js");
|
|
4421
4421
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
4422
4422
|
if (!result.found) {
|
|
4423
4423
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
@@ -4425,7 +4425,7 @@ async function createServerHandle(config4) {
|
|
|
4425
4425
|
const { getEventStore: getEventStore2 } = await import("./events-52XADT6Y.js");
|
|
4426
4426
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-2BGFLV5J.js");
|
|
4427
4427
|
const { createSessionStateMessage } = await import("./protocol-CTNE3ANP.js");
|
|
4428
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
4428
|
+
const { getPendingQuestionsForSession } = await import("./tools-NGAV5NZF.js");
|
|
4429
4429
|
const eventStore = getEventStore2();
|
|
4430
4430
|
const events = eventStore.getEvents(sessionId);
|
|
4431
4431
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -4446,7 +4446,7 @@ async function createServerHandle(config4) {
|
|
|
4446
4446
|
if (!skip && typeof answer !== "string") {
|
|
4447
4447
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
4448
4448
|
}
|
|
4449
|
-
const { provideAnswer } = await import("./tools-
|
|
4449
|
+
const { provideAnswer } = await import("./tools-NGAV5NZF.js");
|
|
4450
4450
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
4451
4451
|
if (!found) {
|
|
4452
4452
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -4482,7 +4482,7 @@ async function createServerHandle(config4) {
|
|
|
4482
4482
|
if (sessionManager.isWarmedUp(sessionId)) {
|
|
4483
4483
|
return res.json({ success: false, reason: "already_warmed" });
|
|
4484
4484
|
}
|
|
4485
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
4485
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-NPPNYDJJ.js");
|
|
4486
4486
|
runAgentTurn(
|
|
4487
4487
|
{
|
|
4488
4488
|
sessionManager,
|
|
@@ -4525,8 +4525,8 @@ async function createServerHandle(config4) {
|
|
|
4525
4525
|
if (!session) {
|
|
4526
4526
|
return res.status(404).json({ error: "Session not found" });
|
|
4527
4527
|
}
|
|
4528
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
4529
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
4528
|
+
const { stopSessionExecution } = await import("./chat-handler-SEMT4SD5.js");
|
|
4529
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-NGAV5NZF.js");
|
|
4530
4530
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
4531
4531
|
sessionManager.clearMessageQueue(sessionId);
|
|
4532
4532
|
stopSessionExecution(sessionId, sessionManager);
|
|
@@ -5036,7 +5036,7 @@ async function createServerHandle(config4) {
|
|
|
5036
5036
|
});
|
|
5037
5037
|
async function rebuildMcpTools() {
|
|
5038
5038
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
5039
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
5039
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-NGAV5NZF.js");
|
|
5040
5040
|
const mcpTools = createMcpTools2(mcpManager);
|
|
5041
5041
|
setMcpTools2(mcpTools);
|
|
5042
5042
|
}
|
|
@@ -5195,13 +5195,13 @@ async function createServerHandle(config4) {
|
|
|
5195
5195
|
})
|
|
5196
5196
|
);
|
|
5197
5197
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
5198
|
-
const { getSessionProcesses } = await import("./manager-
|
|
5198
|
+
const { getSessionProcesses } = await import("./manager-FV4BDEVU.js");
|
|
5199
5199
|
const sessionId = req.params.id;
|
|
5200
5200
|
const processes = getSessionProcesses(sessionId);
|
|
5201
5201
|
res.json({ processes });
|
|
5202
5202
|
});
|
|
5203
5203
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
5204
|
-
const { stopProcess } = await import("./manager-
|
|
5204
|
+
const { stopProcess } = await import("./manager-FV4BDEVU.js");
|
|
5205
5205
|
const sessionId = req.params.id;
|
|
5206
5206
|
const processId = req.params.processId;
|
|
5207
5207
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5344,7 +5344,7 @@ async function createServerHandle(config4) {
|
|
|
5344
5344
|
const state = sessionManager.getContextState(sessionId);
|
|
5345
5345
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
5346
5346
|
});
|
|
5347
|
-
const { QueueProcessor } = await import("./processor-
|
|
5347
|
+
const { QueueProcessor } = await import("./processor-WJQILWUH.js");
|
|
5348
5348
|
const queueProcessor = new QueueProcessor({
|
|
5349
5349
|
sessionManager,
|
|
5350
5350
|
providerManager,
|
|
@@ -5387,7 +5387,7 @@ async function createServerHandle(config4) {
|
|
|
5387
5387
|
await mcpManager.disconnectAll();
|
|
5388
5388
|
const { stopAllInspectProxies } = await import("./inspect-proxy-BV25JERQ.js");
|
|
5389
5389
|
stopAllInspectProxies();
|
|
5390
|
-
const { cleanupAllProcesses } = await import("./store-
|
|
5390
|
+
const { cleanupAllProcesses } = await import("./store-TTU4UQQ7.js");
|
|
5391
5391
|
cleanupAllProcesses();
|
|
5392
5392
|
viteServer?.close();
|
|
5393
5393
|
for (const client of wss.clients) {
|
|
@@ -5419,4 +5419,4 @@ export {
|
|
|
5419
5419
|
createServerHandle,
|
|
5420
5420
|
createServer
|
|
5421
5421
|
};
|
|
5422
|
-
//# sourceMappingURL=chunk-
|
|
5422
|
+
//# sourceMappingURL=chunk-GGDYDMIC.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
injectWorkflowKickoffIfNeeded,
|
|
3
3
|
runAgentTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VCT4DBJC.js";
|
|
6
6
|
import {
|
|
7
7
|
applyDynamicContext,
|
|
8
8
|
checkAborted,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
loadAllAgentsDefault,
|
|
17
17
|
saveItemToDir,
|
|
18
18
|
spawnShellProcess
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-55LI67AH.js";
|
|
20
20
|
import {
|
|
21
21
|
getPlatformShell,
|
|
22
22
|
onProcessEvent
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-OCILP3SJ.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatErrorMessage,
|
|
26
26
|
createChatMessageMessage,
|
|
@@ -2091,4 +2091,4 @@ export {
|
|
|
2091
2091
|
signalMcpReady,
|
|
2092
2092
|
createWebSocketServer
|
|
2093
2093
|
};
|
|
2094
|
-
//# sourceMappingURL=chunk-
|
|
2094
|
+
//# sourceMappingURL=chunk-KPKQNJAG.js.map
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
getLogsPaginated,
|
|
5
5
|
getProcess,
|
|
6
6
|
getSessionProcesses,
|
|
7
|
+
killProcessTree,
|
|
7
8
|
removeProcess,
|
|
8
9
|
startProcess,
|
|
9
10
|
updateStatus
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CYJEQF7U.js";
|
|
11
12
|
|
|
12
13
|
// src/server/tools/background-process/manager.ts
|
|
13
14
|
import { spawn } from "child_process";
|
|
@@ -35,7 +36,6 @@ function isAbsolutePath(path) {
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
// src/server/tools/background-process/manager.ts
|
|
38
|
-
var STOP_SIGNAL_TIMEOUT = 5e3;
|
|
39
39
|
var listeners = /* @__PURE__ */ new Set();
|
|
40
40
|
function onProcessEvent(callback) {
|
|
41
41
|
listeners.add(callback);
|
|
@@ -122,42 +122,14 @@ async function stopProcess(processId, sessionId) {
|
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
updateStatus(processId, sessionId, "stopping");
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
setTimeout(() => {
|
|
134
|
-
try {
|
|
135
|
-
process.kill(-pid, "SIGKILL");
|
|
136
|
-
} catch {
|
|
137
|
-
try {
|
|
138
|
-
process.kill(pid, "SIGKILL");
|
|
139
|
-
} catch {
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
resolve();
|
|
143
|
-
}, STOP_SIGNAL_TIMEOUT);
|
|
144
|
-
});
|
|
145
|
-
updateStatus(processId, sessionId, "exited", null);
|
|
146
|
-
emitProcessEvent(processId, {
|
|
147
|
-
type: "backgroundProcess.removed",
|
|
148
|
-
payload: { processId },
|
|
149
|
-
sessionId
|
|
150
|
-
});
|
|
151
|
-
removeProcess(processId, sessionId);
|
|
152
|
-
} catch {
|
|
153
|
-
updateStatus(processId, sessionId, "exited", 1);
|
|
154
|
-
emitProcessEvent(processId, {
|
|
155
|
-
type: "backgroundProcess.removed",
|
|
156
|
-
payload: { processId },
|
|
157
|
-
sessionId
|
|
158
|
-
});
|
|
159
|
-
removeProcess(processId, sessionId);
|
|
160
|
-
}
|
|
125
|
+
await killProcessTree(proc.pid);
|
|
126
|
+
updateStatus(processId, sessionId, "exited", null);
|
|
127
|
+
emitProcessEvent(processId, {
|
|
128
|
+
type: "backgroundProcess.removed",
|
|
129
|
+
payload: { processId },
|
|
130
|
+
sessionId
|
|
131
|
+
});
|
|
132
|
+
removeProcess(processId, sessionId);
|
|
161
133
|
}
|
|
162
134
|
function getProcessStatus(processId, sessionId) {
|
|
163
135
|
return getProcess(processId, sessionId);
|
|
@@ -181,4 +153,4 @@ export {
|
|
|
181
153
|
getSessionProcesses2 as getSessionProcesses,
|
|
182
154
|
getProcessLogs
|
|
183
155
|
};
|
|
184
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-OCILP3SJ.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
loadAllAgentsDefault,
|
|
13
13
|
processEventsForConversation,
|
|
14
14
|
runTopLevelAgentLoop
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-55LI67AH.js";
|
|
16
16
|
import {
|
|
17
17
|
TurnMetrics,
|
|
18
18
|
WORKFLOW_KICKOFF_PROMPT,
|
|
@@ -324,4 +324,4 @@ export {
|
|
|
324
324
|
runAgentTurn,
|
|
325
325
|
injectWorkflowKickoffIfNeeded
|
|
326
326
|
};
|
|
327
|
-
//# sourceMappingURL=chunk-
|
|
327
|
+
//# sourceMappingURL=chunk-VCT4DBJC.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
onProcessEvent,
|
|
7
7
|
startProcessCommand,
|
|
8
8
|
stopProcess
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-OCILP3SJ.js";
|
|
10
|
+
import "./chunk-CYJEQF7U.js";
|
|
11
11
|
import "./chunk-5WRI5ZAA.js";
|
|
12
12
|
export {
|
|
13
13
|
createProcess,
|
|
@@ -18,4 +18,4 @@ export {
|
|
|
18
18
|
startProcessCommand,
|
|
19
19
|
stopProcess
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=manager-
|
|
21
|
+
//# sourceMappingURL=manager-FV4BDEVU.js.map
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
injectWorkflowKickoffIfNeeded,
|
|
3
3
|
runAgentTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-VCT4DBJC.js";
|
|
6
|
+
import "./chunk-55LI67AH.js";
|
|
7
7
|
import "./chunk-LBGHZLLH.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OCILP3SJ.js";
|
|
9
|
+
import "./chunk-CYJEQF7U.js";
|
|
10
10
|
import "./chunk-NWO6GRYE.js";
|
|
11
11
|
import "./chunk-F4PMNP7S.js";
|
|
12
12
|
import "./chunk-EU3WWTFH.js";
|
|
@@ -43,4 +43,4 @@ export {
|
|
|
43
43
|
runAgentTurn,
|
|
44
44
|
runChatTurn
|
|
45
45
|
};
|
|
46
|
-
//# sourceMappingURL=orchestrator-
|
|
46
|
+
//# sourceMappingURL=orchestrator-NPPNYDJJ.js.map
|
package/dist/package.json
CHANGED
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
finalizeTurnCompletion,
|
|
4
4
|
generateSessionNameForSession
|
|
5
5
|
} from "./chunk-UOKVBO67.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-55LI67AH.js";
|
|
7
7
|
import "./chunk-LBGHZLLH.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OCILP3SJ.js";
|
|
9
|
+
import "./chunk-CYJEQF7U.js";
|
|
10
10
|
import "./chunk-NWO6GRYE.js";
|
|
11
11
|
import {
|
|
12
12
|
createChatMessageMessage,
|
|
@@ -174,7 +174,7 @@ var QueueProcessor = class {
|
|
|
174
174
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
175
175
|
model: llmClient.getModel()
|
|
176
176
|
};
|
|
177
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
177
|
+
const { runChatTurn } = await import("./orchestrator-NPPNYDJJ.js");
|
|
178
178
|
const runChatTurnParams = buildRunChatTurnParams({
|
|
179
179
|
sessionManager,
|
|
180
180
|
sessionId,
|
|
@@ -222,4 +222,4 @@ var QueueProcessor = class {
|
|
|
222
222
|
export {
|
|
223
223
|
QueueProcessor
|
|
224
224
|
};
|
|
225
|
-
//# sourceMappingURL=processor-
|
|
225
|
+
//# sourceMappingURL=processor-WJQILWUH.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION,
|
|
3
3
|
createServer
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-GGDYDMIC.js";
|
|
5
|
+
import "./chunk-KPKQNJAG.js";
|
|
6
|
+
import "./chunk-VCT4DBJC.js";
|
|
7
|
+
import "./chunk-55LI67AH.js";
|
|
8
8
|
import "./chunk-LBGHZLLH.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-OCILP3SJ.js";
|
|
10
|
+
import "./chunk-CYJEQF7U.js";
|
|
11
11
|
import "./chunk-NWO6GRYE.js";
|
|
12
12
|
import "./chunk-F4PMNP7S.js";
|
|
13
13
|
import "./chunk-EU3WWTFH.js";
|
|
@@ -205,4 +205,4 @@ async function runServe(options) {
|
|
|
205
205
|
export {
|
|
206
206
|
runServe
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=serve-
|
|
208
|
+
//# sourceMappingURL=serve-ZZ2IGSZK.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-GGDYDMIC.js";
|
|
5
|
+
import "../chunk-KPKQNJAG.js";
|
|
6
|
+
import "../chunk-VCT4DBJC.js";
|
|
7
|
+
import "../chunk-55LI67AH.js";
|
|
8
8
|
import "../chunk-LBGHZLLH.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-OCILP3SJ.js";
|
|
10
|
+
import "../chunk-CYJEQF7U.js";
|
|
11
11
|
import "../chunk-NWO6GRYE.js";
|
|
12
12
|
import "../chunk-F4PMNP7S.js";
|
|
13
13
|
import "../chunk-EU3WWTFH.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebSocketServer,
|
|
3
3
|
signalMcpReady
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KPKQNJAG.js";
|
|
5
|
+
import "./chunk-VCT4DBJC.js";
|
|
6
|
+
import "./chunk-55LI67AH.js";
|
|
7
7
|
import "./chunk-LBGHZLLH.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-OCILP3SJ.js";
|
|
9
|
+
import "./chunk-CYJEQF7U.js";
|
|
10
10
|
import "./chunk-NWO6GRYE.js";
|
|
11
11
|
import "./chunk-F4PMNP7S.js";
|
|
12
12
|
import "./chunk-EU3WWTFH.js";
|
|
@@ -35,4 +35,4 @@ export {
|
|
|
35
35
|
createWebSocketServer,
|
|
36
36
|
signalMcpReady
|
|
37
37
|
};
|
|
38
|
-
//# sourceMappingURL=server-
|
|
38
|
+
//# sourceMappingURL=server-GCB67HAC.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
removeProcess,
|
|
14
14
|
startProcess,
|
|
15
15
|
updateStatus
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-CYJEQF7U.js";
|
|
17
17
|
import "./chunk-5WRI5ZAA.js";
|
|
18
18
|
export {
|
|
19
19
|
appendLog,
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
startProcess,
|
|
32
32
|
updateStatus
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=store-
|
|
34
|
+
//# sourceMappingURL=store-TTU4UQQ7.js.map
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
setMcpTools,
|
|
13
13
|
stepDoneTool,
|
|
14
14
|
validateToolAction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-55LI67AH.js";
|
|
16
16
|
import "./chunk-LBGHZLLH.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OCILP3SJ.js";
|
|
18
|
+
import "./chunk-CYJEQF7U.js";
|
|
19
19
|
import "./chunk-NWO6GRYE.js";
|
|
20
20
|
import "./chunk-F4PMNP7S.js";
|
|
21
21
|
import {
|
|
@@ -58,4 +58,4 @@ export {
|
|
|
58
58
|
stepDoneTool,
|
|
59
59
|
validateToolAction
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=tools-
|
|
61
|
+
//# sourceMappingURL=tools-NGAV5NZF.js.map
|