openfox 1.6.81 → 1.6.83
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/{auto-compaction-JSO3ZWSE.js → auto-compaction-YKNSXB3B.js} +8 -8
- package/dist/{chat-handler-RN662HKM.js → chat-handler-XORXAICJ.js} +11 -11
- package/dist/{chunk-2MHHSLNY.js → chunk-3Y3HDOT3.js} +41 -36
- package/dist/{chunk-NDJ6FKSP.js → chunk-4VT74LCD.js} +1 -1
- package/dist/{chunk-WR6QCJJO.js → chunk-6GGYIEBM.js} +10 -8
- package/dist/{chunk-A5W6JUYZ.js → chunk-6GH2PJJC.js} +4 -4
- package/dist/{chunk-LHKXWUEK.js → chunk-6THJULLK.js} +17 -6
- package/dist/{chunk-6FOC2GAY.js → chunk-AET6LELP.js} +6 -6
- package/dist/{chunk-UF6D2IPO.js → chunk-GN7RB4Y4.js} +3 -3
- package/dist/{chunk-TGWEH2BC.js → chunk-JDDNBK6T.js} +5 -9
- package/dist/{chunk-42TLGPX4.js → chunk-NAONQLLT.js} +104 -47
- package/dist/{chunk-UKMRZDWM.js → chunk-TLOL4I7K.js} +3 -3
- package/dist/{chunk-BSTVRSV6.js → chunk-WSRF5L3S.js} +2 -2
- package/dist/{chunk-TS5XFQ2D.js → chunk-XVWVAWSG.js} +1 -1
- package/dist/{chunk-CUDAT6SS.js → chunk-YNIAFX24.js} +5 -5
- package/dist/{chunk-SJHWJAJA.js → chunk-ZSTL3GO6.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{config-5CONAOL7.js → config-HMMPXQ46.js} +5 -5
- package/dist/{events-QDUOJQML.js → events-H563T5M5.js} +3 -3
- package/dist/{folding-XIKR6AFM.js → folding-4VHGQE6Y.js} +2 -2
- package/dist/{orchestrator-NJHSRHZI.js → orchestrator-4YKFENVV.js} +9 -9
- package/dist/package.json +1 -1
- package/dist/{processor-3A32D5MI.js → processor-I2NXOFPC.js} +7 -7
- package/dist/{protocol-4xbfAlGO.d.ts → protocol-DEXfLRbe.d.ts} +3 -1
- package/dist/{protocol-IXFNYZEX.js → protocol-NEBXAMJ3.js} +3 -3
- package/dist/{provider-ESEBV3LL.js → provider-LDZFYLK6.js} +7 -7
- package/dist/{serve-D4NO4GJF.js → serve-IED7B4A5.js} +13 -13
- package/dist/server/index.d.ts +2 -1
- package/dist/server/index.js +11 -11
- package/dist/shared/index.d.ts +2 -2
- package/dist/shared/index.js +1 -1
- package/dist/{tools-Y3S6BHBZ.js → tools-RGERQUMC.js} +8 -8
- package/dist/{vision-fallback-ED27LH6C.js → vision-fallback-WT66NURB.js} +2 -2
- package/dist/web/assets/{index-D4Si0Pmc.css → index-CA0bz_5H.css} +1 -1
- package/dist/web/assets/{index-DuIE79t4.js → index-DmpkTC-2.js} +50 -47
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -2,26 +2,26 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NAONQLLT.js";
|
|
6
6
|
import "./chunk-OXI26S7U.js";
|
|
7
7
|
import "./chunk-CMQCO27Y.js";
|
|
8
8
|
import "./chunk-DL6ZILAF.js";
|
|
9
9
|
import "./chunk-PBGOZMVY.js";
|
|
10
10
|
import "./chunk-VRGRAQDG.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-YNIAFX24.js";
|
|
12
|
+
import "./chunk-6THJULLK.js";
|
|
13
13
|
import "./chunk-KIOUKC3Z.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-XVWVAWSG.js";
|
|
15
|
+
import "./chunk-GN7RB4Y4.js";
|
|
16
16
|
import "./chunk-BJYPTN5S.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-4VT74LCD.js";
|
|
18
18
|
import "./chunk-CQGTEGKL.js";
|
|
19
19
|
import "./chunk-B5AP3RSV.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-WSRF5L3S.js";
|
|
21
21
|
import "./chunk-K44MW7JJ.js";
|
|
22
22
|
export {
|
|
23
23
|
maybeAutoCompactContext,
|
|
24
24
|
performManualContextCompaction,
|
|
25
25
|
resolveCompactionStatsIdentity
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=auto-compaction-
|
|
27
|
+
//# sourceMappingURL=auto-compaction-YKNSXB3B.js.map
|
|
@@ -5,32 +5,32 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6GH2PJJC.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-ZSTL3GO6.js";
|
|
12
|
+
import "./chunk-NAONQLLT.js";
|
|
13
13
|
import "./chunk-OXI26S7U.js";
|
|
14
14
|
import "./chunk-CMQCO27Y.js";
|
|
15
15
|
import "./chunk-DL6ZILAF.js";
|
|
16
16
|
import "./chunk-PBGOZMVY.js";
|
|
17
17
|
import "./chunk-VRGRAQDG.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-YNIAFX24.js";
|
|
19
19
|
import {
|
|
20
20
|
getEventStore
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6THJULLK.js";
|
|
22
22
|
import "./chunk-KIOUKC3Z.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-XVWVAWSG.js";
|
|
24
24
|
import {
|
|
25
25
|
createChatMessageMessage,
|
|
26
26
|
createPhaseChangedMessage,
|
|
27
27
|
createSessionRunningMessage
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-GN7RB4Y4.js";
|
|
29
29
|
import "./chunk-BJYPTN5S.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-4VT74LCD.js";
|
|
31
31
|
import "./chunk-CQGTEGKL.js";
|
|
32
32
|
import "./chunk-B5AP3RSV.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-WSRF5L3S.js";
|
|
34
34
|
import {
|
|
35
35
|
logger
|
|
36
36
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
|
|
|
61
61
|
sessionManager.setRunning(sessionId, true);
|
|
62
62
|
broadcastForSession(sessionId, createSessionRunningMessage(true));
|
|
63
63
|
try {
|
|
64
|
-
const { maybeAutoCompactContext } = await import("./auto-compaction-
|
|
64
|
+
const { maybeAutoCompactContext } = await import("./auto-compaction-YKNSXB3B.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
startChatSession,
|
|
176
176
|
stopSessionExecution
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chat-handler-
|
|
178
|
+
//# sourceMappingURL=chat-handler-XORXAICJ.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
createVerifierNudgeConfig,
|
|
3
3
|
runBuilderTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZSTL3GO6.js";
|
|
6
6
|
import {
|
|
7
7
|
TurnMetrics,
|
|
8
8
|
agentExists,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
setSkillEnabled,
|
|
38
38
|
skillExists,
|
|
39
39
|
spawnShellProcess
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-NAONQLLT.js";
|
|
41
41
|
import {
|
|
42
42
|
getProject
|
|
43
43
|
} from "./chunk-CMQCO27Y.js";
|
|
@@ -50,18 +50,18 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
createProviderManager,
|
|
52
52
|
parseDefaultModelSelection
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-6GGYIEBM.js";
|
|
54
54
|
import {
|
|
55
55
|
SessionNotFoundError,
|
|
56
56
|
createLLMClient,
|
|
57
57
|
detectModel,
|
|
58
58
|
getLlmStatus
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-JDDNBK6T.js";
|
|
60
60
|
import {
|
|
61
61
|
detectBackend,
|
|
62
62
|
getBackendDisplayName,
|
|
63
63
|
getModelProfile
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-YNIAFX24.js";
|
|
65
65
|
import {
|
|
66
66
|
createSession,
|
|
67
67
|
deleteSession,
|
|
@@ -87,14 +87,14 @@ import {
|
|
|
87
87
|
updateSessionProvider,
|
|
88
88
|
updateSessionRunning,
|
|
89
89
|
updateSessionSummary
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-6THJULLK.js";
|
|
91
91
|
import {
|
|
92
92
|
initDatabase
|
|
93
93
|
} from "./chunk-KIOUKC3Z.js";
|
|
94
94
|
import {
|
|
95
95
|
buildMessagesFromStoredEvents,
|
|
96
96
|
foldPendingConfirmations
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-XVWVAWSG.js";
|
|
98
98
|
import {
|
|
99
99
|
createChatErrorMessage,
|
|
100
100
|
createChatMessageMessage,
|
|
@@ -108,7 +108,7 @@ import {
|
|
|
108
108
|
parseClientMessage,
|
|
109
109
|
serializeServerMessage,
|
|
110
110
|
storedEventToServerMessage
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-GN7RB4Y4.js";
|
|
112
112
|
import {
|
|
113
113
|
EventEmitter,
|
|
114
114
|
provideAnswer
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
} from "./chunk-RGRBWDZP.js";
|
|
119
119
|
import {
|
|
120
120
|
createServerMessage
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-4VT74LCD.js";
|
|
122
122
|
import {
|
|
123
123
|
getGlobalConfigDir
|
|
124
124
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -3950,6 +3950,9 @@ var SessionManager = class {
|
|
|
3950
3950
|
if (!model) return void 0;
|
|
3951
3951
|
return this.providerManager.getModelSettings(model);
|
|
3952
3952
|
}
|
|
3953
|
+
getCurrentModelContext() {
|
|
3954
|
+
return this.providerManager.getCurrentModelContext();
|
|
3955
|
+
}
|
|
3953
3956
|
// ============================================================================
|
|
3954
3957
|
// Session Lifecycle
|
|
3955
3958
|
// ============================================================================
|
|
@@ -4022,6 +4025,7 @@ var SessionManager = class {
|
|
|
4022
4025
|
});
|
|
4023
4026
|
const eventStore = getEventStore();
|
|
4024
4027
|
eventStore.deleteSession(id);
|
|
4028
|
+
this.messageQueues.delete(id);
|
|
4025
4029
|
deleteSession(id);
|
|
4026
4030
|
if (this.activeSessionId === id) {
|
|
4027
4031
|
this.activeSessionId = null;
|
|
@@ -5257,7 +5261,7 @@ function createTerminalRoutes() {
|
|
|
5257
5261
|
}
|
|
5258
5262
|
|
|
5259
5263
|
// src/constants.ts
|
|
5260
|
-
var VERSION = "1.6.
|
|
5264
|
+
var VERSION = "1.6.83";
|
|
5261
5265
|
|
|
5262
5266
|
// src/server/index.ts
|
|
5263
5267
|
var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
|
|
@@ -5459,7 +5463,7 @@ async function createServerHandle(config) {
|
|
|
5459
5463
|
res.json({ success: true });
|
|
5460
5464
|
});
|
|
5461
5465
|
app.get("/api/sessions", async (req, res) => {
|
|
5462
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
5466
|
+
const { getRecentUserPromptsForSession } = await import("./events-H563T5M5.js");
|
|
5463
5467
|
const projectId = req.query["projectId"];
|
|
5464
5468
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
5465
5469
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -5492,8 +5496,8 @@ async function createServerHandle(config) {
|
|
|
5492
5496
|
res.status(201).json({ session });
|
|
5493
5497
|
});
|
|
5494
5498
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
5495
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5496
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5499
|
+
const { getEventStore: getEventStore2 } = await import("./events-H563T5M5.js");
|
|
5500
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5497
5501
|
const session = sessionManager.getSession(req.params.id);
|
|
5498
5502
|
if (!session) {
|
|
5499
5503
|
return res.status(404).json({ error: "Session not found" });
|
|
@@ -5523,8 +5527,8 @@ async function createServerHandle(config) {
|
|
|
5523
5527
|
res.json({ success: true });
|
|
5524
5528
|
});
|
|
5525
5529
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
5526
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5527
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5530
|
+
const { getEventStore: getEventStore2 } = await import("./events-H563T5M5.js");
|
|
5531
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5528
5532
|
const sessionId = req.params.id;
|
|
5529
5533
|
const session = sessionManager.getSession(sessionId);
|
|
5530
5534
|
if (!session) {
|
|
@@ -5535,7 +5539,7 @@ async function createServerHandle(config) {
|
|
|
5535
5539
|
return res.status(400).json({ error: "providerId is required" });
|
|
5536
5540
|
}
|
|
5537
5541
|
sessionManager.setSessionProvider(sessionId, providerId, model ?? "auto");
|
|
5538
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
5542
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-HMMPXQ46.js");
|
|
5539
5543
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5540
5544
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model ?? "auto");
|
|
5541
5545
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -5561,8 +5565,8 @@ async function createServerHandle(config) {
|
|
|
5561
5565
|
res.json({ success: true });
|
|
5562
5566
|
});
|
|
5563
5567
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
5564
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5565
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-
|
|
5568
|
+
const { getEventStore: getEventStore2 } = await import("./events-H563T5M5.js");
|
|
5569
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-4VHGQE6Y.js");
|
|
5566
5570
|
const sessionId = req.params.id;
|
|
5567
5571
|
const session = sessionManager.getSession(sessionId);
|
|
5568
5572
|
if (!session) {
|
|
@@ -5614,14 +5618,14 @@ async function createServerHandle(config) {
|
|
|
5614
5618
|
if (!callId || approved === void 0) {
|
|
5615
5619
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
5616
5620
|
}
|
|
5617
|
-
const { providePathConfirmation } = await import("./tools-
|
|
5621
|
+
const { providePathConfirmation } = await import("./tools-RGERQUMC.js");
|
|
5618
5622
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
5619
5623
|
if (!result.found) {
|
|
5620
5624
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
5621
5625
|
}
|
|
5622
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
5623
|
-
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-
|
|
5624
|
-
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-
|
|
5626
|
+
const { getEventStore: getEventStore2 } = await import("./events-H563T5M5.js");
|
|
5627
|
+
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-4VHGQE6Y.js");
|
|
5628
|
+
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-NEBXAMJ3.js");
|
|
5625
5629
|
const eventStore = getEventStore2();
|
|
5626
5630
|
const events = eventStore.getEvents(sessionId);
|
|
5627
5631
|
const messages = buildMessagesFromStoredEvents2(events);
|
|
@@ -5638,7 +5642,7 @@ async function createServerHandle(config) {
|
|
|
5638
5642
|
if (!callId || !answer) {
|
|
5639
5643
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
5640
5644
|
}
|
|
5641
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
5645
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-RGERQUMC.js");
|
|
5642
5646
|
const found = provideAnswer2(callId, answer);
|
|
5643
5647
|
if (!found) {
|
|
5644
5648
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -5674,14 +5678,14 @@ async function createServerHandle(config) {
|
|
|
5674
5678
|
if (!session) {
|
|
5675
5679
|
return res.status(404).json({ error: "Session not found" });
|
|
5676
5680
|
}
|
|
5677
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
5678
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
5681
|
+
const { stopSessionExecution } = await import("./chat-handler-XORXAICJ.js");
|
|
5682
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-RGERQUMC.js");
|
|
5679
5683
|
stopSessionExecution(sessionId, sessionManager);
|
|
5680
5684
|
abortSession(sessionId);
|
|
5681
5685
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
5682
5686
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
5683
5687
|
sessionManager.clearMessageQueue(sessionId);
|
|
5684
|
-
const eventStore = (await import("./events-
|
|
5688
|
+
const eventStore = (await import("./events-H563T5M5.js")).getEventStore();
|
|
5685
5689
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
5686
5690
|
res.json({ success: true });
|
|
5687
5691
|
});
|
|
@@ -5695,7 +5699,7 @@ async function createServerHandle(config) {
|
|
|
5695
5699
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
5696
5700
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
5697
5701
|
}
|
|
5698
|
-
const { truncateSessionMessages } = await import("./events-
|
|
5702
|
+
const { truncateSessionMessages } = await import("./events-H563T5M5.js");
|
|
5699
5703
|
truncateSessionMessages(sessionId, messageIndex);
|
|
5700
5704
|
res.json({ success: true });
|
|
5701
5705
|
});
|
|
@@ -5747,7 +5751,7 @@ async function createServerHandle(config) {
|
|
|
5747
5751
|
let visionFallback;
|
|
5748
5752
|
let globalWorkdir;
|
|
5749
5753
|
try {
|
|
5750
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
5754
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-HMMPXQ46.js");
|
|
5751
5755
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5752
5756
|
const fallback = getVisionFallback(globalConfig);
|
|
5753
5757
|
if (fallback) {
|
|
@@ -5826,7 +5830,7 @@ async function createServerHandle(config) {
|
|
|
5826
5830
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
5827
5831
|
}
|
|
5828
5832
|
try {
|
|
5829
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
5833
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-HMMPXQ46.js");
|
|
5830
5834
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5831
5835
|
const providerBackend = backend;
|
|
5832
5836
|
const configWithProvider = addProvider(globalConfig, {
|
|
@@ -5859,7 +5863,7 @@ async function createServerHandle(config) {
|
|
|
5859
5863
|
app.post("/api/init/config", async (req, res) => {
|
|
5860
5864
|
const { workdir, visionFallback } = req.body;
|
|
5861
5865
|
try {
|
|
5862
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5866
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-HMMPXQ46.js");
|
|
5863
5867
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5864
5868
|
const updatedConfig = {
|
|
5865
5869
|
...globalConfig,
|
|
@@ -5887,7 +5891,7 @@ async function createServerHandle(config) {
|
|
|
5887
5891
|
});
|
|
5888
5892
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
5889
5893
|
const { id } = req.params;
|
|
5890
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
5894
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-HMMPXQ46.js");
|
|
5891
5895
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5892
5896
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
5893
5897
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -5907,7 +5911,7 @@ async function createServerHandle(config) {
|
|
|
5907
5911
|
return res.status(400).json({ error: result.error });
|
|
5908
5912
|
}
|
|
5909
5913
|
const llmClient = getLLMClient();
|
|
5910
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
5914
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-HMMPXQ46.js");
|
|
5911
5915
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5912
5916
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
5913
5917
|
await saveGlobalConfig(config.mode ?? "production", updatedConfig);
|
|
@@ -5938,7 +5942,7 @@ async function createServerHandle(config) {
|
|
|
5938
5942
|
if (!result.success) {
|
|
5939
5943
|
return res.status(400).json({ error: result.error });
|
|
5940
5944
|
}
|
|
5941
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
5945
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-HMMPXQ46.js");
|
|
5942
5946
|
const globalConfig = await loadGlobalConfig(config.mode ?? "production");
|
|
5943
5947
|
const updatedProviders = providerManager.getProviders();
|
|
5944
5948
|
const updatedConfig = {
|
|
@@ -5978,7 +5982,8 @@ async function createServerHandle(config) {
|
|
|
5978
5982
|
res.json({
|
|
5979
5983
|
success: true,
|
|
5980
5984
|
providerId: id,
|
|
5981
|
-
models: updatedProvider?.models ?? []
|
|
5985
|
+
models: updatedProvider?.models ?? [],
|
|
5986
|
+
status: updatedProvider?.status ?? "unknown"
|
|
5982
5987
|
});
|
|
5983
5988
|
});
|
|
5984
5989
|
app.use("/api/skills", createSkillRoutes(configDir));
|
|
@@ -6163,7 +6168,7 @@ async function createServerHandle(config) {
|
|
|
6163
6168
|
providerManager
|
|
6164
6169
|
);
|
|
6165
6170
|
const wss = wssExports.wss;
|
|
6166
|
-
const { QueueProcessor } = await import("./processor-
|
|
6171
|
+
const { QueueProcessor } = await import("./processor-I2NXOFPC.js");
|
|
6167
6172
|
const queueProcessor = new QueueProcessor({
|
|
6168
6173
|
sessionManager,
|
|
6169
6174
|
providerManager,
|
|
@@ -6238,4 +6243,4 @@ export {
|
|
|
6238
6243
|
createServerHandle,
|
|
6239
6244
|
createServer
|
|
6240
6245
|
};
|
|
6241
|
-
//# sourceMappingURL=chunk-
|
|
6246
|
+
//# sourceMappingURL=chunk-3Y3HDOT3.js.map
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearModelCache,
|
|
3
3
|
createLLMClient,
|
|
4
|
-
detectModel
|
|
5
|
-
|
|
6
|
-
} from "./chunk-TGWEH2BC.js";
|
|
4
|
+
detectModel
|
|
5
|
+
} from "./chunk-JDDNBK6T.js";
|
|
7
6
|
import {
|
|
8
7
|
detectBackend,
|
|
9
8
|
getModelProfile
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YNIAFX24.js";
|
|
11
10
|
import {
|
|
12
11
|
logger
|
|
13
12
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -194,7 +193,10 @@ function createProviderManager(config) {
|
|
|
194
193
|
}
|
|
195
194
|
return {
|
|
196
195
|
getProviders() {
|
|
197
|
-
return
|
|
196
|
+
return providers.map((p) => ({
|
|
197
|
+
...p,
|
|
198
|
+
status: providerStatus.get(p.id) ?? "unknown"
|
|
199
|
+
}));
|
|
198
200
|
},
|
|
199
201
|
getActiveProvider() {
|
|
200
202
|
const { providerId } = parseDefaultModelSelection(defaultModelSelection);
|
|
@@ -475,7 +477,7 @@ function createProviderManager(config) {
|
|
|
475
477
|
backendModelsCount: modelsWithContext.length
|
|
476
478
|
});
|
|
477
479
|
if (modelsWithContext.length === 0) {
|
|
478
|
-
|
|
480
|
+
providerStatus.set(providerId, "disconnected");
|
|
479
481
|
if (userModels.length > 0) {
|
|
480
482
|
logger.debug("Backend unavailable, preserving user models", {
|
|
481
483
|
providerId,
|
|
@@ -486,7 +488,7 @@ function createProviderManager(config) {
|
|
|
486
488
|
}
|
|
487
489
|
return { success: false, error: "No models returned from backend" };
|
|
488
490
|
}
|
|
489
|
-
|
|
491
|
+
providerStatus.set(providerId, "connected");
|
|
490
492
|
const updatedModels = mergeModelsWithUserOverrides(modelsWithContext, userModels);
|
|
491
493
|
providers = providers.map((p) => p.id === providerId ? { ...p, models: updatedModels } : p);
|
|
492
494
|
const { providerId: currentProviderId, model: currentModel } = parseDefaultModelSelection(defaultModelSelection);
|
|
@@ -509,4 +511,4 @@ export {
|
|
|
509
511
|
parseDefaultModelSelection,
|
|
510
512
|
createProviderManager
|
|
511
513
|
};
|
|
512
|
-
//# sourceMappingURL=chunk-
|
|
514
|
+
//# sourceMappingURL=chunk-6GGYIEBM.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore,
|
|
3
3
|
updateSessionMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6THJULLK.js";
|
|
5
5
|
import {
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
7
7
|
foldPendingConfirmations
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XVWVAWSG.js";
|
|
9
9
|
import {
|
|
10
10
|
createContextStateMessage,
|
|
11
11
|
createSessionStateMessage
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-GN7RB4Y4.js";
|
|
13
13
|
import {
|
|
14
14
|
logger
|
|
15
15
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
needsNameGenerationCheck,
|
|
144
144
|
applyGeneratedSessionName
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-6GH2PJJC.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
foldSessionState,
|
|
10
10
|
spreadOptionalMessageFields,
|
|
11
11
|
stripPromptContextMessages
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-XVWVAWSG.js";
|
|
13
13
|
import {
|
|
14
14
|
getRuntimeConfig
|
|
15
15
|
} from "./chunk-B5AP3RSV.js";
|
|
@@ -113,6 +113,15 @@ var EventStore = class {
|
|
|
113
113
|
* Append a single event to a session
|
|
114
114
|
*/
|
|
115
115
|
append(sessionId, event) {
|
|
116
|
+
if (!sessionId || typeof sessionId !== "string") {
|
|
117
|
+
throw new Error("Invalid sessionId: must be a non-empty string");
|
|
118
|
+
}
|
|
119
|
+
if (!event || typeof event.type !== "string" || !event.type) {
|
|
120
|
+
throw new Error("Invalid event: must have a type property");
|
|
121
|
+
}
|
|
122
|
+
if (!event.data || typeof event.data !== "object") {
|
|
123
|
+
throw new Error("Invalid event: must have data object");
|
|
124
|
+
}
|
|
116
125
|
const timestamp = Date.now();
|
|
117
126
|
const seq = this.getNextSeq(sessionId);
|
|
118
127
|
const payload = JSON.stringify(event.data);
|
|
@@ -256,13 +265,15 @@ var EventStore = class {
|
|
|
256
265
|
notifySubscribers(sessionId, event) {
|
|
257
266
|
const sessionSubs = this.subscribers.get(sessionId);
|
|
258
267
|
if (sessionSubs) {
|
|
259
|
-
|
|
268
|
+
const subscribersCopy = Array.from(sessionSubs);
|
|
269
|
+
for (const subscriber of subscribersCopy) {
|
|
260
270
|
if (!subscriber.closed) {
|
|
261
271
|
subscriber.callback(event);
|
|
262
272
|
}
|
|
263
273
|
}
|
|
264
274
|
}
|
|
265
|
-
|
|
275
|
+
const globalSubscribersCopy = Array.from(this.globalSubscribers.values());
|
|
276
|
+
for (const subscriber of globalSubscribersCopy) {
|
|
266
277
|
if (!subscriber.closed) {
|
|
267
278
|
subscriber.callback(event);
|
|
268
279
|
}
|
|
@@ -982,11 +993,11 @@ function emitToolCall(sessionId, messageId, toolCall) {
|
|
|
982
993
|
data: { messageId, toolCall }
|
|
983
994
|
});
|
|
984
995
|
}
|
|
985
|
-
function emitToolOutput(sessionId, toolCallId, stream, content) {
|
|
996
|
+
function emitToolOutput(sessionId, messageId, toolCallId, stream, content) {
|
|
986
997
|
const eventStore = getEventStore();
|
|
987
998
|
eventStore.append(sessionId, {
|
|
988
999
|
type: "tool.output",
|
|
989
|
-
data: { toolCallId, stream, content }
|
|
1000
|
+
data: { messageId, toolCallId, stream, content }
|
|
990
1001
|
});
|
|
991
1002
|
}
|
|
992
1003
|
function emitToolResult(sessionId, messageId, toolCallId, result) {
|
|
@@ -1258,4 +1269,4 @@ export {
|
|
|
1258
1269
|
compactContext,
|
|
1259
1270
|
getRecentUserPromptsForSession
|
|
1260
1271
|
};
|
|
1261
|
-
//# sourceMappingURL=chunk-
|
|
1272
|
+
//# sourceMappingURL=chunk-6THJULLK.js.map
|
|
@@ -33,7 +33,7 @@ Options:
|
|
|
33
33
|
}
|
|
34
34
|
async function runNetworkSetup(mode) {
|
|
35
35
|
const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-56SIRACI.js");
|
|
36
|
-
const { saveGlobalConfig } = await import("./config-
|
|
36
|
+
const { saveGlobalConfig } = await import("./config-HMMPXQ46.js");
|
|
37
37
|
const { getAuthKeyPath } = await import("./paths-X46PPOI2.js");
|
|
38
38
|
const existingAuth = await loadAuthConfig(mode);
|
|
39
39
|
if (existingAuth) {
|
|
@@ -94,7 +94,7 @@ async function runNetworkSetup(mode) {
|
|
|
94
94
|
console.log("\u2713 Configuration saved!\n");
|
|
95
95
|
}
|
|
96
96
|
async function runConfig(mode) {
|
|
97
|
-
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-
|
|
97
|
+
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-HMMPXQ46.js");
|
|
98
98
|
const { getGlobalConfigPath } = await import("./paths-X46PPOI2.js");
|
|
99
99
|
const config = await loadGlobalConfig(mode);
|
|
100
100
|
const configPath = getGlobalConfigPath(mode);
|
|
@@ -149,7 +149,7 @@ async function runCli(options) {
|
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
case "provider": {
|
|
152
|
-
const { runProviderCommand } = await import("./provider-
|
|
152
|
+
const { runProviderCommand } = await import("./provider-LDZFYLK6.js");
|
|
153
153
|
const [, subcommand] = positionals;
|
|
154
154
|
await runProviderCommand(mode, subcommand);
|
|
155
155
|
break;
|
|
@@ -185,12 +185,12 @@ async function runCli(options) {
|
|
|
185
185
|
break;
|
|
186
186
|
}
|
|
187
187
|
default: {
|
|
188
|
-
const { configFileExists } = await import("./config-
|
|
188
|
+
const { configFileExists } = await import("./config-HMMPXQ46.js");
|
|
189
189
|
const configExists = await configFileExists(mode);
|
|
190
190
|
if (!configExists) {
|
|
191
191
|
await runNetworkSetup(mode);
|
|
192
192
|
}
|
|
193
|
-
const { runServe } = await import("./serve-
|
|
193
|
+
const { runServe } = await import("./serve-IED7B4A5.js");
|
|
194
194
|
const serveOptions = { mode };
|
|
195
195
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
196
196
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -202,4 +202,4 @@ async function runCli(options) {
|
|
|
202
202
|
export {
|
|
203
203
|
runCli
|
|
204
204
|
};
|
|
205
|
-
//# sourceMappingURL=chunk-
|
|
205
|
+
//# sourceMappingURL=chunk-AET6LELP.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServerMessage,
|
|
3
3
|
isClientMessage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4VT74LCD.js";
|
|
5
5
|
|
|
6
6
|
// src/server/ws/protocol.ts
|
|
7
7
|
function enrichMessagesWithToolResults(messages) {
|
|
@@ -206,7 +206,7 @@ function storedEventToServerMessage(event) {
|
|
|
206
206
|
}
|
|
207
207
|
case "tool.output": {
|
|
208
208
|
const data = event.data;
|
|
209
|
-
return createChatToolOutputMessage(
|
|
209
|
+
return createChatToolOutputMessage(data.messageId, data.toolCallId, data.content, data.stream);
|
|
210
210
|
}
|
|
211
211
|
case "tool.result": {
|
|
212
212
|
const data = event.data;
|
|
@@ -343,4 +343,4 @@ export {
|
|
|
343
343
|
createQueueStateMessage,
|
|
344
344
|
storedEventToServerMessage
|
|
345
345
|
};
|
|
346
|
-
//# sourceMappingURL=chunk-
|
|
346
|
+
//# sourceMappingURL=chunk-GN7RB4Y4.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getBackendCapabilities,
|
|
6
6
|
getModelProfile,
|
|
7
7
|
mapFinishReason
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YNIAFX24.js";
|
|
9
9
|
import {
|
|
10
10
|
ensureVisionFallbackConfigLoaded
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WSRF5L3S.js";
|
|
12
12
|
import {
|
|
13
13
|
logger
|
|
14
14
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -104,9 +104,6 @@ async function detectModel(llmBaseUrl, retries = 3, silent = false) {
|
|
|
104
104
|
function getLlmStatus() {
|
|
105
105
|
return llmStatus;
|
|
106
106
|
}
|
|
107
|
-
function setLlmStatus(status) {
|
|
108
|
-
llmStatus = status;
|
|
109
|
-
}
|
|
110
107
|
function clearModelCache(url) {
|
|
111
108
|
if (url) {
|
|
112
109
|
modelCache.delete(getCacheKey(url));
|
|
@@ -191,7 +188,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
191
188
|
try {
|
|
192
189
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
193
190
|
await ensureVisionFallbackConfigLoaded();
|
|
194
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
191
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-WT66NURB.js");
|
|
195
192
|
const paramsOptions = {
|
|
196
193
|
model,
|
|
197
194
|
request,
|
|
@@ -268,7 +265,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
268
265
|
});
|
|
269
266
|
try {
|
|
270
267
|
await ensureVisionFallbackConfigLoaded();
|
|
271
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
268
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-WT66NURB.js");
|
|
272
269
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
273
270
|
const createParams = await buildStreamingCreateParams({
|
|
274
271
|
model,
|
|
@@ -479,7 +476,6 @@ export {
|
|
|
479
476
|
createLLMClient,
|
|
480
477
|
detectModel,
|
|
481
478
|
getLlmStatus,
|
|
482
|
-
setLlmStatus,
|
|
483
479
|
clearModelCache
|
|
484
480
|
};
|
|
485
|
-
//# sourceMappingURL=chunk-
|
|
481
|
+
//# sourceMappingURL=chunk-JDDNBK6T.js.map
|