openfox 2.0.74 → 2.0.75
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-ETKFIHUO.js → chat-handler-QLMBYRDY.js} +14 -13
- package/dist/{chunk-YD6NDTKF.js → chunk-5GOOSZX7.js} +1 -1
- package/dist/chunk-6COWK53A.js +7 -0
- package/dist/{chunk-2VBETAU2.js → chunk-6ZMGWDOD.js} +86 -505
- package/dist/{chunk-2DCJERYX.js → chunk-CJ2AJ7HU.js} +3 -3
- package/dist/{chunk-ZRQDCQ7R.js → chunk-J3VQBVGO.js} +8 -6
- package/dist/chunk-KEVRZWL3.js +495 -0
- package/dist/{chunk-TMRFTWXP.js → chunk-LKUAKQZY.js} +37 -22
- package/dist/{chunk-PYB2UEC3.js → chunk-LTFB2WWE.js} +4 -4
- package/dist/{chunk-CHPRGEY5.js → chunk-LUG5QTFC.js} +2 -2
- package/dist/{chunk-QFR6JF32.js → chunk-MIJX54CG.js} +145 -48
- package/dist/{chunk-NOU2QIL5.js → chunk-O3NUNU4H.js} +5 -2
- package/dist/{chunk-R6L2QXQ5.js → chunk-PJQW6TYI.js} +15 -5
- package/dist/{chunk-6XKM25OT.js → chunk-YFFP4DR4.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{compactor-4UKYWC5F.js → compactor-AERNYEMP.js} +4 -4
- package/dist/{events-AEQ6GQXI.js → events-X353XCPN.js} +3 -3
- package/dist/install-CPOPMCSE.js +120 -0
- package/dist/{manager-24C2AXVF.js → manager-5GILDCVD.js} +3 -3
- package/dist/{orchestrator-O2YAAZ3U.js → orchestrator-BIFTALBG.js} +12 -11
- package/dist/package.json +1 -1
- package/dist/path-security-3FAIPJSV.js +50 -0
- package/dist/{processor-FKAS3K4L.js → processor-MQ47QSDR.js} +14 -13
- package/dist/{protocol-4QFU7WAI.js → protocol-EWEVW65B.js} +3 -3
- package/dist/{protocol-DGQWVFcP.d.ts → protocol-Sr6Jr4ZS.d.ts} +5 -2
- package/dist/{serve-T5U6SLB7.js → serve-UD27KOL2.js} +17 -16
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +15 -14
- package/dist/{server-T2YP3VT2.js → server-TJ3PP5EW.js} +14 -13
- package/dist/shared/index.d.ts +1 -1
- package/dist/shared/index.js +1 -1
- package/dist/{tools-APW7MY4E.js → tools-RZ464GUJ.js} +16 -14
- package/dist/{update-FWO365SV.js → update-MWIZH4P2.js} +12 -3
- package/dist/web/assets/{index-DZRcUhoE.css → index-BNVBxKnB.css} +1 -1
- package/dist/web/assets/{index-Xh2VHbZe.js → index-Bn4hwZeP.js} +74 -74
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3OZBPWHP.js +0 -7
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J3VQBVGO.js";
|
|
7
7
|
import {
|
|
8
8
|
deleteItemFromDir,
|
|
9
9
|
devServerManager,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
jsonSerializer,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
saveItemToDir
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6ZMGWDOD.js";
|
|
17
17
|
import {
|
|
18
18
|
gitSpawnEnv
|
|
19
19
|
} from "./chunk-WGMJCFCE.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
} from "./chunk-EU3WWTFH.js";
|
|
24
24
|
import {
|
|
25
25
|
appendCompactionPrompt
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LUG5QTFC.js";
|
|
27
27
|
import {
|
|
28
28
|
TurnMetrics,
|
|
29
29
|
createMessageStartEvent
|
|
@@ -32,7 +32,10 @@ import {
|
|
|
32
32
|
checkAborted,
|
|
33
33
|
onProcessEvent,
|
|
34
34
|
spawnShellProcess
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LTFB2WWE.js";
|
|
36
|
+
import {
|
|
37
|
+
getPlatformShell
|
|
38
|
+
} from "./chunk-S7O77CVO.js";
|
|
36
39
|
import {
|
|
37
40
|
killProcessTree,
|
|
38
41
|
terminateProcessTree
|
|
@@ -41,7 +44,7 @@ import {
|
|
|
41
44
|
getCurrentContextWindowId,
|
|
42
45
|
getEventStore,
|
|
43
46
|
getRuntimeConfig
|
|
44
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-YFFP4DR4.js";
|
|
45
48
|
import {
|
|
46
49
|
buildMessagesFromStoredEvents,
|
|
47
50
|
foldPendingConfirmations
|
|
@@ -60,10 +63,7 @@ import {
|
|
|
60
63
|
parseClientMessage,
|
|
61
64
|
serializeServerMessage,
|
|
62
65
|
storedEventToServerMessage
|
|
63
|
-
} from "./chunk-
|
|
64
|
-
import {
|
|
65
|
-
getPlatformShell
|
|
66
|
-
} from "./chunk-S7O77CVO.js";
|
|
66
|
+
} from "./chunk-O3NUNU4H.js";
|
|
67
67
|
import {
|
|
68
68
|
logger
|
|
69
69
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
} from "./chunk-VUQCQXXJ.js";
|
|
73
73
|
import {
|
|
74
74
|
createServerMessage
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-5GOOSZX7.js";
|
|
76
76
|
import {
|
|
77
77
|
getGlobalConfigDir
|
|
78
78
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -1485,13 +1485,6 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1485
1485
|
const isSubscribedToSession = (client, sessionId) => {
|
|
1486
1486
|
return client.activeSessionId === sessionId;
|
|
1487
1487
|
};
|
|
1488
|
-
const broadcastForSession = (sessionId, msg) => {
|
|
1489
|
-
for (const [clientWs, client] of clients) {
|
|
1490
|
-
if (isSubscribedToSession(client, sessionId) && clientWs.readyState === WebSocket2.OPEN) {
|
|
1491
|
-
clientWs.send(serializeServerMessage({ ...msg, sessionId }));
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
};
|
|
1495
1488
|
function enqueueSend(client, data, seq) {
|
|
1496
1489
|
if (client.sendQueue.length >= MAX_SEND_QUEUE_SIZE) {
|
|
1497
1490
|
logger.warn("WebSocket send queue full, dropping message", {
|
|
@@ -1598,6 +1591,30 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1598
1591
|
}
|
|
1599
1592
|
}
|
|
1600
1593
|
};
|
|
1594
|
+
const broadcastForSession = (sessionId, msg) => {
|
|
1595
|
+
const session = sessionManager.getSession(sessionId);
|
|
1596
|
+
const projectId = session?.projectId;
|
|
1597
|
+
for (const [clientWs, client] of clients) {
|
|
1598
|
+
if (clientWs.readyState !== WebSocket2.OPEN) continue;
|
|
1599
|
+
if (!isSubscribedToSession(client, sessionId)) continue;
|
|
1600
|
+
const seq = client.lastSentSeq + 1;
|
|
1601
|
+
enqueueSend(client, serializeServerMessage({ ...msg, sessionId }), seq);
|
|
1602
|
+
}
|
|
1603
|
+
if (msg.type === "chat.path_confirmation" && projectId) {
|
|
1604
|
+
for (const [clientWs, client] of clients) {
|
|
1605
|
+
if (clientWs.readyState !== WebSocket2.OPEN) continue;
|
|
1606
|
+
if (isSubscribedToSession(client, sessionId)) continue;
|
|
1607
|
+
const clientProjectId = client.activeSessionId ? sessionManager.getSession(client.activeSessionId)?.projectId : void 0;
|
|
1608
|
+
if (clientProjectId !== projectId) continue;
|
|
1609
|
+
const seq = client.lastSentSeq + 1;
|
|
1610
|
+
enqueueSend(
|
|
1611
|
+
client,
|
|
1612
|
+
serializeServerMessage({ type: "session.confirmation_pending", sessionId, payload: msg.payload }),
|
|
1613
|
+
seq
|
|
1614
|
+
);
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1617
|
+
};
|
|
1601
1618
|
devServerManager.onOutput((workdir, chunk) => {
|
|
1602
1619
|
broadcastAll(
|
|
1603
1620
|
createServerMessage("devServer.output", {
|
|
@@ -1632,9 +1649,7 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
|
|
|
1632
1649
|
const prevWorkdir = client.activeWorkdir;
|
|
1633
1650
|
client.activeWorkdir = effectiveWorkdir;
|
|
1634
1651
|
if (prevWorkdir) {
|
|
1635
|
-
const hasOtherClients = [...clients.values()].some(
|
|
1636
|
-
(c) => c !== client && c.activeWorkdir === prevWorkdir
|
|
1637
|
-
);
|
|
1652
|
+
const hasOtherClients = [...clients.values()].some((c) => c !== client && c.activeWorkdir === prevWorkdir);
|
|
1638
1653
|
if (!hasOtherClients) {
|
|
1639
1654
|
moduleStopGitPolling(prevWorkdir);
|
|
1640
1655
|
}
|
|
@@ -2092,7 +2107,7 @@ ${content}` : workflowInfo;
|
|
|
2092
2107
|
}
|
|
2093
2108
|
} : {},
|
|
2094
2109
|
signal: controller.signal,
|
|
2095
|
-
onMessage: (msg) =>
|
|
2110
|
+
onMessage: (msg) => _broadcastForSession(sessionId, msg)
|
|
2096
2111
|
// For path confirmation dialogs
|
|
2097
2112
|
}).catch((error) => {
|
|
2098
2113
|
if (error instanceof Error && error.message === "Aborted") {
|
|
@@ -2179,4 +2194,4 @@ export {
|
|
|
2179
2194
|
signalMcpReady,
|
|
2180
2195
|
createWebSocketServer
|
|
2181
2196
|
};
|
|
2182
|
-
//# sourceMappingURL=chunk-
|
|
2197
|
+
//# sourceMappingURL=chunk-LKUAKQZY.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getPlatformShell
|
|
3
|
+
} from "./chunk-S7O77CVO.js";
|
|
1
4
|
import {
|
|
2
5
|
appendLog,
|
|
3
6
|
createProcess,
|
|
@@ -9,9 +12,6 @@ import {
|
|
|
9
12
|
startProcess,
|
|
10
13
|
updateStatus
|
|
11
14
|
} from "./chunk-I72ACQ6R.js";
|
|
12
|
-
import {
|
|
13
|
-
getPlatformShell
|
|
14
|
-
} from "./chunk-S7O77CVO.js";
|
|
15
15
|
|
|
16
16
|
// src/server/utils/shell.ts
|
|
17
17
|
import { spawn } from "child_process";
|
|
@@ -153,4 +153,4 @@ export {
|
|
|
153
153
|
getSessionProcesses2 as getSessionProcesses,
|
|
154
154
|
getProcessLogs
|
|
155
155
|
};
|
|
156
|
-
//# sourceMappingURL=chunk-
|
|
156
|
+
//# sourceMappingURL=chunk-LTFB2WWE.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-XWBNYU2L.js";
|
|
5
5
|
import {
|
|
6
6
|
getCurrentWindowMessageOptions
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YFFP4DR4.js";
|
|
8
8
|
|
|
9
9
|
// src/server/context/compactor.ts
|
|
10
10
|
function appendCompactionPrompt(sessionId, append) {
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
shouldCompact,
|
|
32
32
|
getCompactionTarget
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-LUG5QTFC.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
tokenFromPassword,
|
|
22
22
|
verifyPassword,
|
|
23
23
|
workflowExists
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LKUAKQZY.js";
|
|
25
25
|
import {
|
|
26
26
|
agentExists,
|
|
27
27
|
createToolRegistry,
|
|
@@ -66,7 +66,10 @@ import {
|
|
|
66
66
|
setSkillEnabled,
|
|
67
67
|
skillExists,
|
|
68
68
|
updateOwnedSkill
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-6ZMGWDOD.js";
|
|
70
|
+
import {
|
|
71
|
+
createMcpTools
|
|
72
|
+
} from "./chunk-NWO6GRYE.js";
|
|
70
73
|
import {
|
|
71
74
|
deleteWorkspace,
|
|
72
75
|
ensureWorkspace,
|
|
@@ -91,11 +94,17 @@ import {
|
|
|
91
94
|
getProject
|
|
92
95
|
} from "./chunk-UV3EMWL4.js";
|
|
93
96
|
import {
|
|
94
|
-
|
|
95
|
-
|
|
97
|
+
getPathSeparator,
|
|
98
|
+
isAbsolutePath
|
|
99
|
+
} from "./chunk-S7O77CVO.js";
|
|
100
|
+
import {
|
|
101
|
+
deleteSetting,
|
|
102
|
+
getSetting,
|
|
103
|
+
setSetting
|
|
104
|
+
} from "./chunk-QNKXZH3Z.js";
|
|
96
105
|
import {
|
|
97
106
|
VERSION
|
|
98
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-6COWK53A.js";
|
|
99
108
|
import {
|
|
100
109
|
createSession,
|
|
101
110
|
deleteSession,
|
|
@@ -123,22 +132,13 @@ import {
|
|
|
123
132
|
updateSessionProvider,
|
|
124
133
|
updateSessionRunning,
|
|
125
134
|
updateSessionWorkdir
|
|
126
|
-
} from "./chunk-
|
|
127
|
-
import {
|
|
128
|
-
createContextStateMessage
|
|
129
|
-
} from "./chunk-NOU2QIL5.js";
|
|
130
|
-
import {
|
|
131
|
-
getPathSeparator,
|
|
132
|
-
isAbsolutePath
|
|
133
|
-
} from "./chunk-S7O77CVO.js";
|
|
134
|
-
import {
|
|
135
|
-
deleteSetting,
|
|
136
|
-
getSetting,
|
|
137
|
-
setSetting
|
|
138
|
-
} from "./chunk-QNKXZH3Z.js";
|
|
135
|
+
} from "./chunk-YFFP4DR4.js";
|
|
139
136
|
import {
|
|
140
137
|
initDatabase
|
|
141
138
|
} from "./chunk-I4RWK2L2.js";
|
|
139
|
+
import {
|
|
140
|
+
createContextStateMessage
|
|
141
|
+
} from "./chunk-O3NUNU4H.js";
|
|
142
142
|
import {
|
|
143
143
|
createProviderManager,
|
|
144
144
|
detectModel,
|
|
@@ -163,7 +163,7 @@ import {
|
|
|
163
163
|
} from "./chunk-K44MW7JJ.js";
|
|
164
164
|
import {
|
|
165
165
|
createServerMessage
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-5GOOSZX7.js";
|
|
167
167
|
import {
|
|
168
168
|
getGlobalConfigDir
|
|
169
169
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -4932,6 +4932,53 @@ function createPluginRoutes(options) {
|
|
|
4932
4932
|
return router;
|
|
4933
4933
|
}
|
|
4934
4934
|
|
|
4935
|
+
// src/server/utils/wsl.ts
|
|
4936
|
+
import { readFileSync as readFileSync3 } from "fs";
|
|
4937
|
+
var cached = null;
|
|
4938
|
+
function readEtcOsRelease() {
|
|
4939
|
+
try {
|
|
4940
|
+
const content = readFileSync3("/etc/os-release", "utf-8");
|
|
4941
|
+
const result = {};
|
|
4942
|
+
for (const line of content.split("\n")) {
|
|
4943
|
+
const m = line.match(/^([A-Za-z_][A-Za-z_0-9]*)=(.*)$/);
|
|
4944
|
+
if (m) {
|
|
4945
|
+
let val = m[2] ?? "";
|
|
4946
|
+
if (val.startsWith('"') && val.endsWith('"') || val.startsWith("'") && val.endsWith("'")) {
|
|
4947
|
+
val = val.slice(1, -1);
|
|
4948
|
+
}
|
|
4949
|
+
result[m[1]] = val;
|
|
4950
|
+
}
|
|
4951
|
+
}
|
|
4952
|
+
return result;
|
|
4953
|
+
} catch {
|
|
4954
|
+
return null;
|
|
4955
|
+
}
|
|
4956
|
+
}
|
|
4957
|
+
function detectWsl() {
|
|
4958
|
+
if (cached) return cached;
|
|
4959
|
+
if (process.platform === "win32") {
|
|
4960
|
+
cached = { isWSL: false, wslDistro: "" };
|
|
4961
|
+
return cached;
|
|
4962
|
+
}
|
|
4963
|
+
const distro = process.env["WSL_DISTRO_NAME"];
|
|
4964
|
+
if (distro) {
|
|
4965
|
+
cached = { isWSL: true, wslDistro: distro };
|
|
4966
|
+
return cached;
|
|
4967
|
+
}
|
|
4968
|
+
try {
|
|
4969
|
+
const osrelease = readFileSync3("/proc/sys/kernel/osrelease", "utf-8");
|
|
4970
|
+
if (osrelease.toLowerCase().includes("wsl") || osrelease.toLowerCase().includes("microsoft")) {
|
|
4971
|
+
const osInfo = readEtcOsRelease();
|
|
4972
|
+
const name = osInfo?.["NAME"] ?? "Ubuntu";
|
|
4973
|
+
cached = { isWSL: true, wslDistro: name };
|
|
4974
|
+
return cached;
|
|
4975
|
+
}
|
|
4976
|
+
} catch {
|
|
4977
|
+
}
|
|
4978
|
+
cached = { isWSL: false, wslDistro: "" };
|
|
4979
|
+
return cached;
|
|
4980
|
+
}
|
|
4981
|
+
|
|
4935
4982
|
// src/server/index.ts
|
|
4936
4983
|
var __dirname3 = dirname8(fileURLToPath7(import.meta.url));
|
|
4937
4984
|
async function createServerHandle(config3) {
|
|
@@ -4960,6 +5007,7 @@ async function createServerHandle(config3) {
|
|
|
4960
5007
|
if (useMock) {
|
|
4961
5008
|
logger.info("Using MOCK LLM client - deterministic responses for testing");
|
|
4962
5009
|
}
|
|
5010
|
+
const platformInfo = detectWsl();
|
|
4963
5011
|
async function initLLM() {
|
|
4964
5012
|
const llmClient = getLLMClient();
|
|
4965
5013
|
const backend = config3.llm.backend;
|
|
@@ -5030,7 +5078,7 @@ async function createServerHandle(config3) {
|
|
|
5030
5078
|
setMcpTools(mcpTools);
|
|
5031
5079
|
logger.info("MCP tools registered", { count: mcpTools.length });
|
|
5032
5080
|
}
|
|
5033
|
-
const { signalMcpReady } = await import("./server-
|
|
5081
|
+
const { signalMcpReady } = await import("./server-TJ3PP5EW.js");
|
|
5034
5082
|
signalMcpReady();
|
|
5035
5083
|
});
|
|
5036
5084
|
const app = express();
|
|
@@ -5271,7 +5319,8 @@ async function createServerHandle(config3) {
|
|
|
5271
5319
|
res.json({ workspaces: workspacesList });
|
|
5272
5320
|
});
|
|
5273
5321
|
app.get("/api/sessions", async (req, res) => {
|
|
5274
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5322
|
+
const { getRecentUserPromptsForSession } = await import("./events-X353XCPN.js");
|
|
5323
|
+
const { getPendingConfirmationsBySession } = await import("./path-security-3FAIPJSV.js");
|
|
5275
5324
|
const projectId = req.query["projectId"];
|
|
5276
5325
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5277
5326
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5288,7 +5337,15 @@ async function createServerHandle(config3) {
|
|
|
5288
5337
|
...session,
|
|
5289
5338
|
recentUserPrompts: getRecentUserPromptsForSession(session.id, 10)
|
|
5290
5339
|
}));
|
|
5291
|
-
|
|
5340
|
+
const allPending = getPendingConfirmationsBySession();
|
|
5341
|
+
const pendingConfirmationsBySession = {};
|
|
5342
|
+
for (const s of sessions) {
|
|
5343
|
+
const confs = allPending[s.id];
|
|
5344
|
+
if (confs) {
|
|
5345
|
+
pendingConfirmationsBySession[s.id] = confs;
|
|
5346
|
+
}
|
|
5347
|
+
}
|
|
5348
|
+
res.json({ sessions: sessionsWithPrompts, hasMore, pendingConfirmationsBySession });
|
|
5292
5349
|
});
|
|
5293
5350
|
app.post("/api/sessions", async (req, res) => {
|
|
5294
5351
|
const { projectId, title } = req.body;
|
|
@@ -5301,6 +5358,29 @@ async function createServerHandle(config3) {
|
|
|
5301
5358
|
}
|
|
5302
5359
|
const { providerId, model } = parseDefaultModelSelection(config3.defaultModelSelection);
|
|
5303
5360
|
const session = sessionManager.createSession(projectId, title, providerId ?? null, model ?? null);
|
|
5361
|
+
wssExports.broadcastAll({
|
|
5362
|
+
type: "session.created",
|
|
5363
|
+
sessionId: session.id,
|
|
5364
|
+
payload: {
|
|
5365
|
+
session: {
|
|
5366
|
+
id: session.id,
|
|
5367
|
+
projectId: session.projectId,
|
|
5368
|
+
title: session.metadata.title,
|
|
5369
|
+
workdir: session.workdir,
|
|
5370
|
+
workspace: session.workspace,
|
|
5371
|
+
mode: session.mode,
|
|
5372
|
+
phase: session.phase,
|
|
5373
|
+
isRunning: session.isRunning,
|
|
5374
|
+
providerId: session.providerId,
|
|
5375
|
+
providerModel: session.providerModel,
|
|
5376
|
+
createdAt: session.createdAt,
|
|
5377
|
+
updatedAt: session.updatedAt,
|
|
5378
|
+
criteriaCount: session.criteria.length,
|
|
5379
|
+
criteriaCompleted: session.criteria.filter((c) => c.status.type === "passed").length,
|
|
5380
|
+
messageCount: session.messageCount ?? session.messages.length
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
});
|
|
5304
5384
|
res.status(201).json({ session });
|
|
5305
5385
|
});
|
|
5306
5386
|
app.post("/api/sessions/:id/switch-workspace", async (req, res) => {
|
|
@@ -5328,9 +5408,9 @@ async function createServerHandle(config3) {
|
|
|
5328
5408
|
}
|
|
5329
5409
|
});
|
|
5330
5410
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5331
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5332
|
-
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5333
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5411
|
+
const { getEventStore: getEventStore2 } = await import("./events-X353XCPN.js");
|
|
5412
|
+
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ONH3D4OK.js");
|
|
5413
|
+
const { getPendingQuestionsForSession } = await import("./tools-RZ464GUJ.js");
|
|
5334
5414
|
const session = sessionManager.getSession(req.params.id);
|
|
5335
5415
|
if (!session) {
|
|
5336
5416
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5341,7 +5421,8 @@ async function createServerHandle(config3) {
|
|
|
5341
5421
|
const contextState = sessionManager.getContextState(req.params.id);
|
|
5342
5422
|
const queueState = sessionManager.getQueueState(req.params.id);
|
|
5343
5423
|
const pendingQuestions = getPendingQuestionsForSession(req.params.id);
|
|
5344
|
-
|
|
5424
|
+
const pendingConfirmations = foldPendingConfirmations(events);
|
|
5425
|
+
res.json({ session, messages, contextState, queueState, pendingQuestions, pendingConfirmations });
|
|
5345
5426
|
});
|
|
5346
5427
|
app.delete("/api/sessions/:id", async (req, res) => {
|
|
5347
5428
|
const sessionId = req.params["id"];
|
|
@@ -5349,14 +5430,19 @@ async function createServerHandle(config3) {
|
|
|
5349
5430
|
if (!session) {
|
|
5350
5431
|
return res.status(404).json({ error: "Session not found" });
|
|
5351
5432
|
}
|
|
5352
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5353
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5433
|
+
const { stopSessionExecution } = await import("./chat-handler-QLMBYRDY.js");
|
|
5434
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-RZ464GUJ.js");
|
|
5354
5435
|
sessionManager.clearMessageQueue(sessionId);
|
|
5355
5436
|
stopSessionExecution(sessionId, sessionManager);
|
|
5356
5437
|
abortSession(sessionId);
|
|
5357
5438
|
cancelQuestionsForSession(sessionId, "Session deleted");
|
|
5358
5439
|
cancelPathConfirmationsForSession(sessionId, "Session deleted");
|
|
5359
5440
|
sessionManager.deleteSession(sessionId);
|
|
5441
|
+
wssExports.broadcastAll({
|
|
5442
|
+
type: "session.deleted",
|
|
5443
|
+
sessionId,
|
|
5444
|
+
payload: { sessionId }
|
|
5445
|
+
});
|
|
5360
5446
|
res.json({ success: true });
|
|
5361
5447
|
});
|
|
5362
5448
|
app.delete("/api/projects/:projectId/sessions", (req, res) => {
|
|
@@ -5366,10 +5452,15 @@ async function createServerHandle(config3) {
|
|
|
5366
5452
|
return res.status(404).json({ error: "Project not found" });
|
|
5367
5453
|
}
|
|
5368
5454
|
sessionManager.deleteAllSessions(projectId, project.workdir);
|
|
5455
|
+
wssExports.broadcastAll({
|
|
5456
|
+
type: "session.deletedAll",
|
|
5457
|
+
sessionId: projectId,
|
|
5458
|
+
payload: {}
|
|
5459
|
+
});
|
|
5369
5460
|
res.json({ success: true });
|
|
5370
5461
|
});
|
|
5371
5462
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5372
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5463
|
+
const { getEventStore: getEventStore2 } = await import("./events-X353XCPN.js");
|
|
5373
5464
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5374
5465
|
const sessionId = req.params.id;
|
|
5375
5466
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5481,7 +5572,7 @@ async function createServerHandle(config3) {
|
|
|
5481
5572
|
res.json({ success: true });
|
|
5482
5573
|
});
|
|
5483
5574
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5484
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5575
|
+
const { getEventStore: getEventStore2 } = await import("./events-X353XCPN.js");
|
|
5485
5576
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5486
5577
|
const sessionId = req.params.id;
|
|
5487
5578
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -5538,15 +5629,15 @@ async function createServerHandle(config3) {
|
|
|
5538
5629
|
if (!callId || approved === void 0) {
|
|
5539
5630
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5540
5631
|
}
|
|
5541
|
-
const { providePathConfirmation } = await import("./tools-
|
|
5632
|
+
const { providePathConfirmation } = await import("./tools-RZ464GUJ.js");
|
|
5542
5633
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
5543
5634
|
if (!result.found) {
|
|
5544
5635
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5545
5636
|
}
|
|
5546
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5637
|
+
const { getEventStore: getEventStore2 } = await import("./events-X353XCPN.js");
|
|
5547
5638
|
const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-ONH3D4OK.js");
|
|
5548
|
-
const { createSessionStateMessage } = await import("./protocol-
|
|
5549
|
-
const { getPendingQuestionsForSession } = await import("./tools-
|
|
5639
|
+
const { createSessionStateMessage } = await import("./protocol-EWEVW65B.js");
|
|
5640
|
+
const { getPendingQuestionsForSession } = await import("./tools-RZ464GUJ.js");
|
|
5550
5641
|
const eventStore = getEventStore2();
|
|
5551
5642
|
const events = eventStore.getEvents(sessionId);
|
|
5552
5643
|
const messages = buildMessagesFromStoredEvents(events);
|
|
@@ -5557,6 +5648,11 @@ async function createServerHandle(config3) {
|
|
|
5557
5648
|
const stateMsg = createSessionStateMessage(session, messages, pendingConfirmations, pendingQuestions);
|
|
5558
5649
|
wssExports.broadcastForSession(sessionId, { ...stateMsg, sessionId });
|
|
5559
5650
|
}
|
|
5651
|
+
wssExports.broadcastAll({
|
|
5652
|
+
type: "session.confirmation_resolved",
|
|
5653
|
+
sessionId,
|
|
5654
|
+
payload: { sessionId, callId }
|
|
5655
|
+
});
|
|
5560
5656
|
res.json({ success: true });
|
|
5561
5657
|
});
|
|
5562
5658
|
app.post("/api/sessions/:id/answer", async (req, res) => {
|
|
@@ -5567,7 +5663,7 @@ async function createServerHandle(config3) {
|
|
|
5567
5663
|
if (!skip && typeof answer !== "string") {
|
|
5568
5664
|
return res.status(400).json({ error: "answer is required when not skipping" });
|
|
5569
5665
|
}
|
|
5570
|
-
const { provideAnswer } = await import("./tools-
|
|
5666
|
+
const { provideAnswer } = await import("./tools-RZ464GUJ.js");
|
|
5571
5667
|
const found = provideAnswer(callId, answer ?? "", skip ?? false);
|
|
5572
5668
|
if (!found) {
|
|
5573
5669
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5627,7 +5723,7 @@ async function createServerHandle(config3) {
|
|
|
5627
5723
|
backend: activeProvider?.backend ?? llmClient.getBackend(),
|
|
5628
5724
|
model: llmClient.getModel()
|
|
5629
5725
|
};
|
|
5630
|
-
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-
|
|
5726
|
+
const { runAgentTurn, TurnMetrics } = await import("./orchestrator-BIFTALBG.js");
|
|
5631
5727
|
runAgentTurn(
|
|
5632
5728
|
{
|
|
5633
5729
|
sessionManager,
|
|
@@ -5665,15 +5761,15 @@ async function createServerHandle(config3) {
|
|
|
5665
5761
|
if (!session) {
|
|
5666
5762
|
return res.status(404).json({ error: "Session not found" });
|
|
5667
5763
|
}
|
|
5668
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5669
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5764
|
+
const { stopSessionExecution } = await import("./chat-handler-QLMBYRDY.js");
|
|
5765
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-RZ464GUJ.js");
|
|
5670
5766
|
const queuedMessages = sessionManager.getQueueState(sessionId);
|
|
5671
5767
|
sessionManager.clearMessageQueue(sessionId);
|
|
5672
5768
|
stopSessionExecution(sessionId, sessionManager);
|
|
5673
5769
|
abortSession(sessionId);
|
|
5674
5770
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
5675
5771
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
5676
|
-
const eventStore = (await import("./events-
|
|
5772
|
+
const eventStore = (await import("./events-X353XCPN.js")).getEventStore();
|
|
5677
5773
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5678
5774
|
res.json({ success: true, queuedMessages });
|
|
5679
5775
|
});
|
|
@@ -5687,7 +5783,7 @@ async function createServerHandle(config3) {
|
|
|
5687
5783
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
5688
5784
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
5689
5785
|
}
|
|
5690
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5786
|
+
const { truncateSessionMessages } = await import("./events-X353XCPN.js");
|
|
5691
5787
|
truncateSessionMessages(sessionId, messageIndex);
|
|
5692
5788
|
res.json({ success: true });
|
|
5693
5789
|
});
|
|
@@ -5704,7 +5800,7 @@ async function createServerHandle(config3) {
|
|
|
5704
5800
|
if (content !== void 0 && (typeof content !== "string" || !content.trim())) {
|
|
5705
5801
|
return res.status(400).json({ error: "content must be a non-empty string if provided" });
|
|
5706
5802
|
}
|
|
5707
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5803
|
+
const { getEventStore: getEventStore2 } = await import("./events-X353XCPN.js");
|
|
5708
5804
|
const { buildMessagesFromStoredEvents } = await import("./folding-ONH3D4OK.js");
|
|
5709
5805
|
const eventStore = getEventStore2();
|
|
5710
5806
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -5717,7 +5813,7 @@ async function createServerHandle(config3) {
|
|
|
5717
5813
|
if (msg.role !== "user" || msg.isSystemGenerated) {
|
|
5718
5814
|
return res.status(400).json({ error: "Can only replay user messages" });
|
|
5719
5815
|
}
|
|
5720
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5816
|
+
const { truncateSessionMessages } = await import("./events-X353XCPN.js");
|
|
5721
5817
|
truncateSessionMessages(sessionId, msgIndex - 1);
|
|
5722
5818
|
sessionManager.queueMessage(sessionId, "asap", content ?? msg.content, msg.attachments, msg.messageKind);
|
|
5723
5819
|
res.json({ success: true });
|
|
@@ -5836,7 +5932,8 @@ async function createServerHandle(config3) {
|
|
|
5836
5932
|
providers: providerManager.getProviders(),
|
|
5837
5933
|
activeProviderId: providerManager.getActiveProviderId(),
|
|
5838
5934
|
defaultModelSelection: config3.defaultModelSelection,
|
|
5839
|
-
visionFallback
|
|
5935
|
+
visionFallback,
|
|
5936
|
+
platform: platformInfo
|
|
5840
5937
|
});
|
|
5841
5938
|
});
|
|
5842
5939
|
app.post("/api/model/refresh", async (_req, res) => {
|
|
@@ -6292,7 +6389,7 @@ async function createServerHandle(config3) {
|
|
|
6292
6389
|
});
|
|
6293
6390
|
async function rebuildMcpTools() {
|
|
6294
6391
|
const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-MOGEI6TP.js");
|
|
6295
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
6392
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-RZ464GUJ.js");
|
|
6296
6393
|
const mcpTools = createMcpTools2(mcpManager);
|
|
6297
6394
|
setMcpTools2(mcpTools);
|
|
6298
6395
|
}
|
|
@@ -6527,13 +6624,13 @@ async function createServerHandle(config3) {
|
|
|
6527
6624
|
})
|
|
6528
6625
|
);
|
|
6529
6626
|
app.get("/api/sessions/:id/background-processes", async (req, res) => {
|
|
6530
|
-
const { getSessionProcesses } = await import("./manager-
|
|
6627
|
+
const { getSessionProcesses } = await import("./manager-5GILDCVD.js");
|
|
6531
6628
|
const sessionId = req.params.id;
|
|
6532
6629
|
const processes = getSessionProcesses(sessionId);
|
|
6533
6630
|
res.json({ processes });
|
|
6534
6631
|
});
|
|
6535
6632
|
app.post("/api/sessions/:id/background-process/:processId/stop", async (req, res) => {
|
|
6536
|
-
const { stopProcess } = await import("./manager-
|
|
6633
|
+
const { stopProcess } = await import("./manager-5GILDCVD.js");
|
|
6537
6634
|
const sessionId = req.params.id;
|
|
6538
6635
|
const processId = req.params.processId;
|
|
6539
6636
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -6676,7 +6773,7 @@ async function createServerHandle(config3) {
|
|
|
6676
6773
|
const state = sessionManager.getContextState(sessionId);
|
|
6677
6774
|
wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
|
|
6678
6775
|
});
|
|
6679
|
-
const { QueueProcessor } = await import("./processor-
|
|
6776
|
+
const { QueueProcessor } = await import("./processor-MQ47QSDR.js");
|
|
6680
6777
|
const queueProcessor = new QueueProcessor({
|
|
6681
6778
|
sessionManager,
|
|
6682
6779
|
providerManager,
|
|
@@ -6756,4 +6853,4 @@ export {
|
|
|
6756
6853
|
createServerHandle,
|
|
6757
6854
|
createServer
|
|
6758
6855
|
};
|
|
6759
|
-
//# sourceMappingURL=chunk-
|
|
6856
|
+
//# sourceMappingURL=chunk-MIJX54CG.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServerMessage,
|
|
3
3
|
isClientMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5GOOSZX7.js";
|
|
5
5
|
|
|
6
6
|
// src/server/ws/protocol.ts
|
|
7
7
|
function enrichMessagesWithToolResults(messages) {
|
|
@@ -294,6 +294,9 @@ function storedEventToServerMessage(event) {
|
|
|
294
294
|
const data = event.data;
|
|
295
295
|
return createChatFormatRetryMessage(data.attempt, data.maxAttempts, data.pattern, data.field, data.matchedContent);
|
|
296
296
|
}
|
|
297
|
+
case "path.confirmation_pending":
|
|
298
|
+
case "path.confirmation_responded":
|
|
299
|
+
return null;
|
|
297
300
|
case "turn.snapshot":
|
|
298
301
|
case "context.compacted":
|
|
299
302
|
return null;
|
|
@@ -340,4 +343,4 @@ export {
|
|
|
340
343
|
createQueueStateMessage,
|
|
341
344
|
storedEventToServerMessage
|
|
342
345
|
};
|
|
343
|
-
//# sourceMappingURL=chunk-
|
|
346
|
+
//# sourceMappingURL=chunk-O3NUNU4H.js.map
|
|
@@ -25,6 +25,7 @@ Commands:
|
|
|
25
25
|
provider remove Remove a provider
|
|
26
26
|
service Manage the systemd service (install, start, stop, status, logs, uninstall)
|
|
27
27
|
pwa Manage the PWA installation (install, uninstall, launch, update, status)
|
|
28
|
+
install Install a persistent OpenFox launcher (use --check to inspect)
|
|
28
29
|
update Update OpenFox to the latest version
|
|
29
30
|
|
|
30
31
|
Options:
|
|
@@ -134,7 +135,8 @@ async function runCli(options) {
|
|
|
134
135
|
help: { type: "boolean", short: "h" },
|
|
135
136
|
version: { type: "boolean", short: "v" },
|
|
136
137
|
service: { type: "boolean" },
|
|
137
|
-
follow: { type: "boolean", short: "f" }
|
|
138
|
+
follow: { type: "boolean", short: "f" },
|
|
139
|
+
check: { type: "boolean" }
|
|
138
140
|
},
|
|
139
141
|
allowPositionals: true,
|
|
140
142
|
strict: true
|
|
@@ -189,9 +191,17 @@ async function runCli(options) {
|
|
|
189
191
|
}
|
|
190
192
|
break;
|
|
191
193
|
}
|
|
194
|
+
case "install": {
|
|
195
|
+
const { runInstall } = await import("./install-CPOPMCSE.js");
|
|
196
|
+
const code = await runInstall({ check: values.check === true });
|
|
197
|
+
if (code !== 0) {
|
|
198
|
+
process.exit(code);
|
|
199
|
+
}
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
192
202
|
case "update": {
|
|
193
|
-
const { runUpdate } = await import("./update-
|
|
194
|
-
const code = runUpdate();
|
|
203
|
+
const { runUpdate } = await import("./update-MWIZH4P2.js");
|
|
204
|
+
const code = await runUpdate();
|
|
195
205
|
if (code !== 0) {
|
|
196
206
|
process.exit(code);
|
|
197
207
|
}
|
|
@@ -203,7 +213,7 @@ async function runCli(options) {
|
|
|
203
213
|
if (!configExists) {
|
|
204
214
|
await runNetworkSetup(mode);
|
|
205
215
|
}
|
|
206
|
-
const { runServe } = await import("./serve-
|
|
216
|
+
const { runServe } = await import("./serve-UD27KOL2.js");
|
|
207
217
|
const serveOptions = { mode };
|
|
208
218
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
209
219
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -215,4 +225,4 @@ async function runCli(options) {
|
|
|
215
225
|
export {
|
|
216
226
|
runCli
|
|
217
227
|
};
|
|
218
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-PJQW6TYI.js.map
|