openfox 2.0.0-beta.16 → 2.0.0-beta.17
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-7QLHIQOM.js → chat-handler-LJMW4OK3.js} +6 -6
- package/dist/{chunk-W52UQCER.js → chunk-32GQUDLN.js} +5 -5
- package/dist/{chunk-6CVDQJDV.js → chunk-7ZMMDZU7.js} +388 -17
- package/dist/{chunk-OKLV3ZNN.js → chunk-CK6LGE7G.js} +2 -2
- package/dist/{chunk-LXX2CPM5.js → chunk-FFEAEPJB.js} +1 -133
- package/dist/{chunk-N53OLRIU.js → chunk-HPCGVAS4.js} +12 -42
- package/dist/{chunk-D2QILH47.js → chunk-LEDG5WAN.js} +3 -3
- package/dist/{chunk-BE7YHSTL.js → chunk-PRBZSBKW.js} +44 -58
- package/dist/{chunk-LQWVMRMW.js → chunk-SN7ZAMHV.js} +6 -6
- package/dist/{chunk-DHAKJSE7.js → chunk-XEK3KII6.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{config-B6HYTLT4.js → config-BU66P4KX.js} +2 -7
- package/dist/{events-R7FRQEBE.js → events-ZKWAKWI7.js} +2 -2
- package/dist/{orchestrator-2AK4AYUD.js → orchestrator-LX6FKB6L.js} +5 -5
- package/dist/package.json +1 -1
- package/dist/{processor-IU56GBIW.js → processor-NMYSEBC7.js} +4 -4
- package/dist/{protocol-zn90yuIr.d.ts → protocol-D59sCy9L.d.ts} +3 -3
- package/dist/{provider-2JAXE5EA.js → provider-DTNQYCMV.js} +7 -18
- package/dist/{provider-manager-JMLJSPNX.js → provider-manager-LMHAHLIF.js} +3 -4
- package/dist/{serve-TFOO6AZH.js → serve-KB7IVU5D.js} +9 -10
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +6 -7
- package/dist/shared/index.d.ts +2 -2
- package/dist/{tools-VJMWGBUO.js → tools-BOE5T3KC.js} +4 -4
- package/dist/web/assets/{index-DCu8wsRj.js → index-Bego8SwT.js} +2 -2
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4F3C6X4M.js +0 -381
|
@@ -1,38 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getGlobalConfigPath
|
|
3
3
|
} from "./chunk-CQGTEGKL.js";
|
|
4
|
-
import {
|
|
5
|
-
detectModel
|
|
6
|
-
} from "./chunk-4F3C6X4M.js";
|
|
7
|
-
import {
|
|
8
|
-
detectBackend
|
|
9
|
-
} from "./chunk-LXX2CPM5.js";
|
|
10
4
|
|
|
11
5
|
// src/cli/config.ts
|
|
12
6
|
import { z } from "zod";
|
|
13
7
|
import { randomUUID } from "crypto";
|
|
14
8
|
import { readFile, writeFile, mkdir, access } from "fs/promises";
|
|
15
9
|
import { dirname } from "path";
|
|
16
|
-
var SMART_DEFAULTS = ["http://localhost:8000", "http://localhost:11434", "http://localhost:8080"];
|
|
17
|
-
async function trySmartDefaults(_mode) {
|
|
18
|
-
const results = await Promise.all(
|
|
19
|
-
SMART_DEFAULTS.map(async (url) => {
|
|
20
|
-
try {
|
|
21
|
-
const [backend, model] = await Promise.all([
|
|
22
|
-
detectBackend(url, void 0, true),
|
|
23
|
-
detectModel(url, 1, true)
|
|
24
|
-
// Only 1 retry attempt
|
|
25
|
-
]);
|
|
26
|
-
if (backend !== "unknown" && model) {
|
|
27
|
-
return { url, backend, model };
|
|
28
|
-
}
|
|
29
|
-
} catch {
|
|
30
|
-
}
|
|
31
|
-
return null;
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
return results.find((r) => r !== null) || null;
|
|
35
|
-
}
|
|
36
10
|
async function configFileExists(mode) {
|
|
37
11
|
const configPath = getGlobalConfigPath(mode);
|
|
38
12
|
try {
|
|
@@ -42,17 +16,7 @@ async function configFileExists(mode) {
|
|
|
42
16
|
return false;
|
|
43
17
|
}
|
|
44
18
|
}
|
|
45
|
-
var backendSchema = z.enum([
|
|
46
|
-
"auto",
|
|
47
|
-
"vllm",
|
|
48
|
-
"sglang",
|
|
49
|
-
"ollama",
|
|
50
|
-
"llamacpp",
|
|
51
|
-
"openai",
|
|
52
|
-
"anthropic",
|
|
53
|
-
"opencode-go",
|
|
54
|
-
"unknown"
|
|
55
|
-
]);
|
|
19
|
+
var backendSchema = z.enum(["vllm", "sglang", "ollama", "llamacpp", "openai", "anthropic", "opencode-go", "unknown"]);
|
|
56
20
|
var modelConfigSchema = z.object({
|
|
57
21
|
id: z.string(),
|
|
58
22
|
contextWindow: z.number(),
|
|
@@ -122,7 +86,7 @@ var configSchema = z.object({
|
|
|
122
86
|
var oldLlmSchema = z.object({
|
|
123
87
|
url: z.string().url().default("http://localhost:8000/v1"),
|
|
124
88
|
model: z.string().default("auto"),
|
|
125
|
-
backend: z.enum(["
|
|
89
|
+
backend: z.enum(["vllm", "sglang", "ollama", "llamacpp", "unknown"]).default("unknown"),
|
|
126
90
|
maxContext: z.number().default(2e5),
|
|
127
91
|
// Deprecated: use reasoningEffort instead
|
|
128
92
|
disableThinking: z.boolean().optional(),
|
|
@@ -148,7 +112,8 @@ function migrateConfig(raw) {
|
|
|
148
112
|
const obj = raw;
|
|
149
113
|
let migrationOccurred = false;
|
|
150
114
|
const providers = obj.providers.map((p) => {
|
|
151
|
-
const { model, maxContext, models: existingModels, ...rest } = p;
|
|
115
|
+
const { model, maxContext, models: existingModels, backend, ...rest } = p;
|
|
116
|
+
const normalizedBackend = backend === "auto" ? "unknown" : backend;
|
|
152
117
|
let models = existingModels ?? [];
|
|
153
118
|
if (maxContext !== void 0 && (existingModels === void 0 || existingModels.length === 0)) {
|
|
154
119
|
migrationOccurred = true;
|
|
@@ -162,6 +127,7 @@ function migrateConfig(raw) {
|
|
|
162
127
|
}
|
|
163
128
|
return {
|
|
164
129
|
...rest,
|
|
130
|
+
backend: normalizedBackend,
|
|
165
131
|
models
|
|
166
132
|
};
|
|
167
133
|
});
|
|
@@ -196,6 +162,11 @@ function migrateConfig(raw) {
|
|
|
196
162
|
};
|
|
197
163
|
}
|
|
198
164
|
if (typeof raw === "object" && raw !== null && "llm" in raw) {
|
|
165
|
+
const rawObj = raw;
|
|
166
|
+
const llm = rawObj["llm"];
|
|
167
|
+
if (llm && llm["backend"] === "auto") {
|
|
168
|
+
llm["backend"] = "unknown";
|
|
169
|
+
}
|
|
199
170
|
const oldConfig = oldConfigSchema.parse(raw);
|
|
200
171
|
const providerId = randomUUID();
|
|
201
172
|
const models = [
|
|
@@ -422,7 +393,7 @@ function mergeConfigs(...configs) {
|
|
|
422
393
|
llm: {
|
|
423
394
|
url: "http://localhost:8000/v1",
|
|
424
395
|
model: "auto",
|
|
425
|
-
backend: "
|
|
396
|
+
backend: "unknown",
|
|
426
397
|
maxContext: 2e5
|
|
427
398
|
},
|
|
428
399
|
server: { port: 10369, host: "127.0.0.1", openBrowser: true },
|
|
@@ -433,7 +404,6 @@ function mergeConfigs(...configs) {
|
|
|
433
404
|
}
|
|
434
405
|
|
|
435
406
|
export {
|
|
436
|
-
trySmartDefaults,
|
|
437
407
|
configFileExists,
|
|
438
408
|
getVisionFallback,
|
|
439
409
|
migrateConfig,
|
|
@@ -449,4 +419,4 @@ export {
|
|
|
449
419
|
activateProvider,
|
|
450
420
|
mergeConfigs
|
|
451
421
|
};
|
|
452
|
-
//# sourceMappingURL=chunk-
|
|
422
|
+
//# sourceMappingURL=chunk-HPCGVAS4.js.map
|
|
@@ -17,13 +17,13 @@ import {
|
|
|
17
17
|
loadAllAgentsDefault,
|
|
18
18
|
processEventsForConversation,
|
|
19
19
|
runTopLevelAgentLoop
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-32GQUDLN.js";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentContextWindowId,
|
|
23
23
|
getCurrentWindowMessageOptions,
|
|
24
24
|
getEventStore,
|
|
25
25
|
getRuntimeConfig
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XEK3KII6.js";
|
|
27
27
|
import {
|
|
28
28
|
buildSnapshotFromSessionState
|
|
29
29
|
} from "./chunk-ITWVFGFV.js";
|
|
@@ -311,4 +311,4 @@ export {
|
|
|
311
311
|
runAgentTurn,
|
|
312
312
|
injectWorkflowKickoffIfNeeded
|
|
313
313
|
};
|
|
314
|
-
//# sourceMappingURL=chunk-
|
|
314
|
+
//# sourceMappingURL=chunk-LEDG5WAN.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
injectWorkflowKickoffIfNeeded,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LEDG5WAN.js";
|
|
7
7
|
import {
|
|
8
8
|
COMPACTION_PROMPT,
|
|
9
9
|
TurnMetrics,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
skillExists,
|
|
60
60
|
spawnShellProcess,
|
|
61
61
|
streamLLMPure
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-32GQUDLN.js";
|
|
63
63
|
import {
|
|
64
64
|
getPathSeparator,
|
|
65
65
|
getPlatformShell,
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
updateSessionMetadata,
|
|
98
98
|
updateSessionProvider,
|
|
99
99
|
updateSessionRunning
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-XEK3KII6.js";
|
|
101
101
|
import {
|
|
102
102
|
buildMessagesFromStoredEvents,
|
|
103
103
|
foldPendingConfirmations
|
|
@@ -133,24 +133,21 @@ import {
|
|
|
133
133
|
import {
|
|
134
134
|
getGlobalConfigDir
|
|
135
135
|
} from "./chunk-CQGTEGKL.js";
|
|
136
|
-
import {
|
|
137
|
-
createProviderManager,
|
|
138
|
-
parseDefaultModelSelection
|
|
139
|
-
} from "./chunk-6CVDQJDV.js";
|
|
140
136
|
import {
|
|
141
137
|
SessionNotFoundError,
|
|
138
|
+
buildModelsUrl,
|
|
142
139
|
createLLMClient,
|
|
140
|
+
createProviderManager,
|
|
143
141
|
detectModel,
|
|
144
|
-
getLlmStatus
|
|
145
|
-
} from "./chunk-4F3C6X4M.js";
|
|
146
|
-
import {
|
|
147
|
-
buildModelsUrl,
|
|
148
|
-
detectBackend,
|
|
149
142
|
ensureVersionPrefix,
|
|
143
|
+
getLlmStatus,
|
|
144
|
+
parseDefaultModelSelection
|
|
145
|
+
} from "./chunk-7ZMMDZU7.js";
|
|
146
|
+
import {
|
|
150
147
|
getBackendDisplayName,
|
|
151
148
|
getModelProfile,
|
|
152
149
|
modelSupportsVision
|
|
153
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-FFEAEPJB.js";
|
|
154
151
|
import {
|
|
155
152
|
logger,
|
|
156
153
|
setLogLevel
|
|
@@ -2860,7 +2857,7 @@ function createWebSocketServer(httpServer, config4, getLLMClient, getActiveProvi
|
|
|
2860
2857
|
}
|
|
2861
2858
|
};
|
|
2862
2859
|
const client = createLLMClient(sessionConfig);
|
|
2863
|
-
if (provider.backend !== "
|
|
2860
|
+
if (provider.backend !== "unknown") {
|
|
2864
2861
|
client.setBackend(provider.backend);
|
|
2865
2862
|
}
|
|
2866
2863
|
client.setModel(session.providerModel);
|
|
@@ -5835,7 +5832,7 @@ import { Router as Router6 } from "express";
|
|
|
5835
5832
|
import { spawn as spawn5 } from "child_process";
|
|
5836
5833
|
|
|
5837
5834
|
// src/constants.ts
|
|
5838
|
-
var VERSION = "2.0.0-beta.
|
|
5835
|
+
var VERSION = "2.0.0-beta.17";
|
|
5839
5836
|
|
|
5840
5837
|
// src/server/routes/auto-update.ts
|
|
5841
5838
|
var updateInProgress = false;
|
|
@@ -5945,29 +5942,19 @@ async function createServerHandle(config4) {
|
|
|
5945
5942
|
}
|
|
5946
5943
|
async function initLLM() {
|
|
5947
5944
|
const llmClient = getLLMClient();
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
if (
|
|
5951
|
-
|
|
5952
|
-
llmClient.setBackend(backend);
|
|
5953
|
-
if (!useMock2) {
|
|
5954
|
-
logger.info("Auto-detected LLM backend", { backend: getBackendDisplayName(backend) });
|
|
5955
|
-
}
|
|
5956
|
-
} else {
|
|
5957
|
-
backend = config4.llm.backend;
|
|
5958
|
-
llmClient.setBackend(backend);
|
|
5959
|
-
if (!useMock2) {
|
|
5960
|
-
logger.info("Using configured LLM backend", { backend: getBackendDisplayName(backend) });
|
|
5961
|
-
}
|
|
5945
|
+
const backend = config4.llm.backend;
|
|
5946
|
+
llmClient.setBackend(backend);
|
|
5947
|
+
if (!useMock) {
|
|
5948
|
+
logger.info("Using configured LLM backend", { backend: getBackendDisplayName(backend) });
|
|
5962
5949
|
}
|
|
5963
5950
|
const detected = await detectModel(config4.llm.baseUrl);
|
|
5964
5951
|
if (detected) {
|
|
5965
5952
|
llmClient.setModel(detected);
|
|
5966
|
-
if (!
|
|
5953
|
+
if (!useMock) {
|
|
5967
5954
|
logger.info("Auto-detected LLM model", { model: detected, backend: getBackendDisplayName(backend) });
|
|
5968
5955
|
}
|
|
5969
5956
|
} else {
|
|
5970
|
-
if (!
|
|
5957
|
+
if (!useMock) {
|
|
5971
5958
|
logger.warn("Could not auto-detect model, using config", { model: config4.llm.model });
|
|
5972
5959
|
}
|
|
5973
5960
|
}
|
|
@@ -6138,7 +6125,7 @@ async function createServerHandle(config4) {
|
|
|
6138
6125
|
res.json({ project });
|
|
6139
6126
|
});
|
|
6140
6127
|
app.get("/api/sessions", async (req, res) => {
|
|
6141
|
-
const { getRecentUserPromptsForSession } = await import("./events-
|
|
6128
|
+
const { getRecentUserPromptsForSession } = await import("./events-ZKWAKWI7.js");
|
|
6142
6129
|
const projectId = req.query["projectId"];
|
|
6143
6130
|
const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
|
|
6144
6131
|
const offset = parseInt(req.query["offset"]) || 0;
|
|
@@ -6171,7 +6158,7 @@ async function createServerHandle(config4) {
|
|
|
6171
6158
|
res.status(201).json({ session });
|
|
6172
6159
|
});
|
|
6173
6160
|
app.get("/api/sessions/:id", async (req, res) => {
|
|
6174
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6161
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZKWAKWI7.js");
|
|
6175
6162
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-YOCGTZYH.js");
|
|
6176
6163
|
const session = sessionManager.getSession(req.params.id);
|
|
6177
6164
|
if (!session) {
|
|
@@ -6202,7 +6189,7 @@ async function createServerHandle(config4) {
|
|
|
6202
6189
|
res.json({ success: true });
|
|
6203
6190
|
});
|
|
6204
6191
|
app.post("/api/sessions/:id/provider", async (req, res) => {
|
|
6205
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6192
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZKWAKWI7.js");
|
|
6206
6193
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-YOCGTZYH.js");
|
|
6207
6194
|
const sessionId = req.params.id;
|
|
6208
6195
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -6214,7 +6201,7 @@ async function createServerHandle(config4) {
|
|
|
6214
6201
|
return res.status(400).json({ error: "providerId is required" });
|
|
6215
6202
|
}
|
|
6216
6203
|
sessionManager.setSessionProvider(sessionId, providerId, model ?? "auto");
|
|
6217
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6204
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-BU66P4KX.js");
|
|
6218
6205
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6219
6206
|
const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model ?? "auto");
|
|
6220
6207
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -6245,7 +6232,7 @@ async function createServerHandle(config4) {
|
|
|
6245
6232
|
res.json({ success: true });
|
|
6246
6233
|
});
|
|
6247
6234
|
app.put("/api/sessions/:id/mode", async (req, res) => {
|
|
6248
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6235
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZKWAKWI7.js");
|
|
6249
6236
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-YOCGTZYH.js");
|
|
6250
6237
|
const sessionId = req.params.id;
|
|
6251
6238
|
const session = sessionManager.getSession(sessionId);
|
|
@@ -6302,12 +6289,12 @@ async function createServerHandle(config4) {
|
|
|
6302
6289
|
if (!callId || approved === void 0) {
|
|
6303
6290
|
return res.status(400).json({ error: "callId and approved are required" });
|
|
6304
6291
|
}
|
|
6305
|
-
const { providePathConfirmation } = await import("./tools-
|
|
6292
|
+
const { providePathConfirmation } = await import("./tools-BOE5T3KC.js");
|
|
6306
6293
|
const result = providePathConfirmation(callId, approved, alwaysAllow);
|
|
6307
6294
|
if (!result.found) {
|
|
6308
6295
|
return res.status(404).json({ error: "No pending path confirmation with that ID" });
|
|
6309
6296
|
}
|
|
6310
|
-
const { getEventStore: getEventStore2 } = await import("./events-
|
|
6297
|
+
const { getEventStore: getEventStore2 } = await import("./events-ZKWAKWI7.js");
|
|
6311
6298
|
const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-YOCGTZYH.js");
|
|
6312
6299
|
const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-CN24IKQN.js");
|
|
6313
6300
|
const eventStore = getEventStore2();
|
|
@@ -6326,7 +6313,7 @@ async function createServerHandle(config4) {
|
|
|
6326
6313
|
if (!callId || !answer) {
|
|
6327
6314
|
return res.status(400).json({ error: "callId and answer are required" });
|
|
6328
6315
|
}
|
|
6329
|
-
const { provideAnswer: provideAnswer2 } = await import("./tools-
|
|
6316
|
+
const { provideAnswer: provideAnswer2 } = await import("./tools-BOE5T3KC.js");
|
|
6330
6317
|
const found = provideAnswer2(callId, answer);
|
|
6331
6318
|
if (!found) {
|
|
6332
6319
|
return res.status(404).json({ error: "No pending question with that ID" });
|
|
@@ -6362,14 +6349,14 @@ async function createServerHandle(config4) {
|
|
|
6362
6349
|
if (!session) {
|
|
6363
6350
|
return res.status(404).json({ error: "Session not found" });
|
|
6364
6351
|
}
|
|
6365
|
-
const { stopSessionExecution } = await import("./chat-handler-
|
|
6366
|
-
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-
|
|
6352
|
+
const { stopSessionExecution } = await import("./chat-handler-LJMW4OK3.js");
|
|
6353
|
+
const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-BOE5T3KC.js");
|
|
6367
6354
|
stopSessionExecution(sessionId, sessionManager);
|
|
6368
6355
|
abortSession(sessionId);
|
|
6369
6356
|
cancelQuestionsForSession(sessionId, "Session stopped by user");
|
|
6370
6357
|
cancelPathConfirmationsForSession(sessionId, "Session stopped by user");
|
|
6371
6358
|
sessionManager.clearMessageQueue(sessionId);
|
|
6372
|
-
const eventStore = (await import("./events-
|
|
6359
|
+
const eventStore = (await import("./events-ZKWAKWI7.js")).getEventStore();
|
|
6373
6360
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
6374
6361
|
res.json({ success: true });
|
|
6375
6362
|
});
|
|
@@ -6383,7 +6370,7 @@ async function createServerHandle(config4) {
|
|
|
6383
6370
|
if (typeof messageIndex !== "number" || messageIndex < 0) {
|
|
6384
6371
|
return res.status(400).json({ error: "messageIndex must be a non-negative number" });
|
|
6385
6372
|
}
|
|
6386
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6373
|
+
const { truncateSessionMessages } = await import("./events-ZKWAKWI7.js");
|
|
6387
6374
|
truncateSessionMessages(sessionId, messageIndex);
|
|
6388
6375
|
res.json({ success: true });
|
|
6389
6376
|
});
|
|
@@ -6401,7 +6388,7 @@ async function createServerHandle(config4) {
|
|
|
6401
6388
|
if (!msg) {
|
|
6402
6389
|
return res.status(400).json({ error: "Message not found at this index" });
|
|
6403
6390
|
}
|
|
6404
|
-
const { truncateSessionMessages } = await import("./events-
|
|
6391
|
+
const { truncateSessionMessages } = await import("./events-ZKWAKWI7.js");
|
|
6405
6392
|
truncateSessionMessages(sessionId, messageIndex - 1);
|
|
6406
6393
|
sessionManager.queueMessage(sessionId, "asap", msg.content, msg.attachments, msg.messageKind);
|
|
6407
6394
|
res.json({ success: true });
|
|
@@ -6473,7 +6460,7 @@ async function createServerHandle(config4) {
|
|
|
6473
6460
|
let visionFallback;
|
|
6474
6461
|
let globalWorkdir;
|
|
6475
6462
|
try {
|
|
6476
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
6463
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-BU66P4KX.js");
|
|
6477
6464
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6478
6465
|
const fallback = getVisionFallback(globalConfig);
|
|
6479
6466
|
if (fallback) {
|
|
@@ -6526,17 +6513,16 @@ async function createServerHandle(config4) {
|
|
|
6526
6513
|
});
|
|
6527
6514
|
});
|
|
6528
6515
|
app.post("/api/providers/test", async (req, res) => {
|
|
6529
|
-
const { url,
|
|
6516
|
+
const { url, backend: reqBackend } = req.body;
|
|
6530
6517
|
if (!url) {
|
|
6531
6518
|
return res.status(400).json({ error: "url is required" });
|
|
6532
6519
|
}
|
|
6533
6520
|
try {
|
|
6534
|
-
const backend = skipBackendDetection ? "auto" : await detectBackend(url);
|
|
6535
6521
|
const model = await detectModel(url);
|
|
6536
6522
|
res.json({
|
|
6537
6523
|
success: true,
|
|
6538
6524
|
url,
|
|
6539
|
-
backend,
|
|
6525
|
+
backend: reqBackend || "unknown",
|
|
6540
6526
|
model
|
|
6541
6527
|
});
|
|
6542
6528
|
} catch (error) {
|
|
@@ -6550,7 +6536,7 @@ async function createServerHandle(config4) {
|
|
|
6550
6536
|
const url = req.query["url"];
|
|
6551
6537
|
if (!url) return res.status(400).json({ error: "url is required" });
|
|
6552
6538
|
try {
|
|
6553
|
-
const { fetchModelsWithContext } = await import("./provider-manager-
|
|
6539
|
+
const { fetchModelsWithContext } = await import("./provider-manager-LMHAHLIF.js");
|
|
6554
6540
|
const models = await fetchModelsWithContext(url);
|
|
6555
6541
|
if (models.length === 0) {
|
|
6556
6542
|
return res.status(404).json({ error: `No models found at ${buildModelsUrl(url)}`, url });
|
|
@@ -6618,7 +6604,7 @@ async function createServerHandle(config4) {
|
|
|
6618
6604
|
return res.status(400).json({ error: "name, url, and backend are required" });
|
|
6619
6605
|
}
|
|
6620
6606
|
try {
|
|
6621
|
-
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-
|
|
6607
|
+
const { loadGlobalConfig, saveGlobalConfig, addProvider, setDefaultModelSelection } = await import("./config-BU66P4KX.js");
|
|
6622
6608
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6623
6609
|
const providerBackend = backend;
|
|
6624
6610
|
const configWithProvider = addProvider(globalConfig, {
|
|
@@ -6663,7 +6649,7 @@ async function createServerHandle(config4) {
|
|
|
6663
6649
|
app.post("/api/init/config", async (req, res) => {
|
|
6664
6650
|
const { workdir, visionFallback } = req.body;
|
|
6665
6651
|
try {
|
|
6666
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6652
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-BU66P4KX.js");
|
|
6667
6653
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6668
6654
|
const updatedConfig = {
|
|
6669
6655
|
...globalConfig,
|
|
@@ -6691,7 +6677,7 @@ async function createServerHandle(config4) {
|
|
|
6691
6677
|
});
|
|
6692
6678
|
app.delete("/api/providers/:id", async (req, res) => {
|
|
6693
6679
|
const { id } = req.params;
|
|
6694
|
-
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-
|
|
6680
|
+
const { loadGlobalConfig, saveGlobalConfig, removeProvider } = await import("./config-BU66P4KX.js");
|
|
6695
6681
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6696
6682
|
const updatedConfig = removeProvider(globalConfig, id);
|
|
6697
6683
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -6702,7 +6688,7 @@ async function createServerHandle(config4) {
|
|
|
6702
6688
|
const { id } = req.params;
|
|
6703
6689
|
const { isLocal } = req.body;
|
|
6704
6690
|
try {
|
|
6705
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
6691
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-BU66P4KX.js");
|
|
6706
6692
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6707
6693
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
6708
6694
|
if (!provider) {
|
|
@@ -6730,7 +6716,7 @@ async function createServerHandle(config4) {
|
|
|
6730
6716
|
models: modelConfigs
|
|
6731
6717
|
} = req.body;
|
|
6732
6718
|
try {
|
|
6733
|
-
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-
|
|
6719
|
+
const { loadGlobalConfig, saveGlobalConfig, updateProvider } = await import("./config-BU66P4KX.js");
|
|
6734
6720
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6735
6721
|
const provider = globalConfig.providers.find((p) => p.id === id);
|
|
6736
6722
|
if (!provider) {
|
|
@@ -6777,7 +6763,7 @@ async function createServerHandle(config4) {
|
|
|
6777
6763
|
return res.status(400).json({ error: result.error });
|
|
6778
6764
|
}
|
|
6779
6765
|
const llmClient = getLLMClient();
|
|
6780
|
-
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-
|
|
6766
|
+
const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-BU66P4KX.js");
|
|
6781
6767
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6782
6768
|
const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
|
|
6783
6769
|
await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
|
|
@@ -6808,7 +6794,7 @@ async function createServerHandle(config4) {
|
|
|
6808
6794
|
if (!result.success) {
|
|
6809
6795
|
return res.status(400).json({ error: result.error });
|
|
6810
6796
|
}
|
|
6811
|
-
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-
|
|
6797
|
+
const { loadGlobalConfig, saveGlobalConfig } = await import("./config-BU66P4KX.js");
|
|
6812
6798
|
const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
|
|
6813
6799
|
const updatedProviders = providerManager.getProviders();
|
|
6814
6800
|
const updatedConfig = {
|
|
@@ -7022,7 +7008,7 @@ async function createServerHandle(config4) {
|
|
|
7022
7008
|
providerManager
|
|
7023
7009
|
);
|
|
7024
7010
|
const wss = wssExports.wss;
|
|
7025
|
-
const { QueueProcessor } = await import("./processor-
|
|
7011
|
+
const { QueueProcessor } = await import("./processor-NMYSEBC7.js");
|
|
7026
7012
|
const queueProcessor = new QueueProcessor({
|
|
7027
7013
|
sessionManager,
|
|
7028
7014
|
providerManager,
|
|
@@ -7094,4 +7080,4 @@ export {
|
|
|
7094
7080
|
createServerHandle,
|
|
7095
7081
|
createServer
|
|
7096
7082
|
};
|
|
7097
|
-
//# sourceMappingURL=chunk-
|
|
7083
|
+
//# sourceMappingURL=chunk-PRBZSBKW.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-BU66P4KX.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-BU66P4KX.js");
|
|
98
98
|
const { getGlobalConfigPath } = await import("./paths-X46PPOI2.js");
|
|
99
99
|
const config = await loadGlobalConfig(mode);
|
|
100
100
|
const configPath = getGlobalConfigPath(mode);
|
|
@@ -151,7 +151,7 @@ async function runCli(options) {
|
|
|
151
151
|
break;
|
|
152
152
|
}
|
|
153
153
|
case "provider": {
|
|
154
|
-
const { runProviderCommand } = await import("./provider-
|
|
154
|
+
const { runProviderCommand } = await import("./provider-DTNQYCMV.js");
|
|
155
155
|
const [, subcommand] = positionals;
|
|
156
156
|
await runProviderCommand(mode, subcommand);
|
|
157
157
|
break;
|
|
@@ -188,12 +188,12 @@ async function runCli(options) {
|
|
|
188
188
|
break;
|
|
189
189
|
}
|
|
190
190
|
default: {
|
|
191
|
-
const { configFileExists } = await import("./config-
|
|
191
|
+
const { configFileExists } = await import("./config-BU66P4KX.js");
|
|
192
192
|
const configExists = await configFileExists(mode);
|
|
193
193
|
if (!configExists) {
|
|
194
194
|
await runNetworkSetup(mode);
|
|
195
195
|
}
|
|
196
|
-
const { runServe } = await import("./serve-
|
|
196
|
+
const { runServe } = await import("./serve-KB7IVU5D.js");
|
|
197
197
|
const serveOptions = { mode };
|
|
198
198
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
199
199
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -205,4 +205,4 @@ async function runCli(options) {
|
|
|
205
205
|
export {
|
|
206
206
|
runCli
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=chunk-
|
|
208
|
+
//# sourceMappingURL=chunk-SN7ZAMHV.js.map
|
|
@@ -882,7 +882,7 @@ function mapSessionSummaryRow(row) {
|
|
|
882
882
|
|
|
883
883
|
// src/server/config.ts
|
|
884
884
|
import { z } from "zod";
|
|
885
|
-
var backendSchema = z.enum(["
|
|
885
|
+
var backendSchema = z.enum(["vllm", "sglang", "ollama", "llamacpp", "unknown"]).default("unknown");
|
|
886
886
|
var envSchema = z.object({
|
|
887
887
|
// New env var name, with fallback to old name for backward compatibility
|
|
888
888
|
OPENFOX_LLM_URL: z.string().url().optional(),
|
|
@@ -1424,4 +1424,4 @@ export {
|
|
|
1424
1424
|
compactContext,
|
|
1425
1425
|
getRecentUserPromptsForSession
|
|
1426
1426
|
};
|
|
1427
|
-
//# sourceMappingURL=chunk-
|
|
1427
|
+
//# sourceMappingURL=chunk-XEK3KII6.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -12,13 +12,9 @@ import {
|
|
|
12
12
|
removeProvider,
|
|
13
13
|
saveGlobalConfig,
|
|
14
14
|
setDefaultModelSelection,
|
|
15
|
-
trySmartDefaults,
|
|
16
15
|
updateProvider
|
|
17
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-HPCGVAS4.js";
|
|
18
17
|
import "./chunk-CQGTEGKL.js";
|
|
19
|
-
import "./chunk-4F3C6X4M.js";
|
|
20
|
-
import "./chunk-LXX2CPM5.js";
|
|
21
|
-
import "./chunk-K44MW7JJ.js";
|
|
22
18
|
export {
|
|
23
19
|
activateProvider,
|
|
24
20
|
addProvider,
|
|
@@ -33,7 +29,6 @@ export {
|
|
|
33
29
|
removeProvider,
|
|
34
30
|
saveGlobalConfig,
|
|
35
31
|
setDefaultModelSelection,
|
|
36
|
-
trySmartDefaults,
|
|
37
32
|
updateProvider
|
|
38
33
|
};
|
|
39
|
-
//# sourceMappingURL=config-
|
|
34
|
+
//# sourceMappingURL=config-BU66P4KX.js.map
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
isStoredEvent,
|
|
40
40
|
isTurnEvent,
|
|
41
41
|
truncateSessionMessages
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XEK3KII6.js";
|
|
43
43
|
import {
|
|
44
44
|
buildContextMessagesFromEventHistory,
|
|
45
45
|
buildContextMessagesFromMessages,
|
|
@@ -116,4 +116,4 @@ export {
|
|
|
116
116
|
isTurnEvent,
|
|
117
117
|
truncateSessionMessages
|
|
118
118
|
};
|
|
119
|
-
//# sourceMappingURL=events-
|
|
119
|
+
//# sourceMappingURL=events-ZKWAKWI7.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
injectWorkflowKickoffIfNeeded,
|
|
3
3
|
runAgentTurn,
|
|
4
4
|
runChatTurn
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LEDG5WAN.js";
|
|
6
6
|
import {
|
|
7
7
|
TurnMetrics,
|
|
8
8
|
createChatDoneEvent,
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
createMessageStartEvent,
|
|
11
11
|
createToolCallEvent,
|
|
12
12
|
createToolResultEvent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-32GQUDLN.js";
|
|
14
14
|
import "./chunk-DL6ZILAF.js";
|
|
15
15
|
import "./chunk-PBGOZMVY.js";
|
|
16
16
|
import "./chunk-VRGRAQDG.js";
|
|
17
17
|
import "./chunk-XAMAYRDA.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-XEK3KII6.js";
|
|
19
19
|
import "./chunk-ITWVFGFV.js";
|
|
20
20
|
import "./chunk-7TTEGAO6.js";
|
|
21
21
|
import "./chunk-BJYPTN5S.js";
|
|
@@ -23,7 +23,7 @@ import "./chunk-RFNEDBVO.js";
|
|
|
23
23
|
import "./chunk-FBGWG4N6.js";
|
|
24
24
|
import "./chunk-BVHFMAVN.js";
|
|
25
25
|
import "./chunk-CQGTEGKL.js";
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-FFEAEPJB.js";
|
|
27
27
|
import "./chunk-K44MW7JJ.js";
|
|
28
28
|
export {
|
|
29
29
|
TurnMetrics,
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
runAgentTurn,
|
|
37
37
|
runChatTurn
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=orchestrator-
|
|
39
|
+
//# sourceMappingURL=orchestrator-LX6FKB6L.js.map
|
package/dist/package.json
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-CK6LGE7G.js";
|
|
9
9
|
import {
|
|
10
10
|
getEventStore
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XEK3KII6.js";
|
|
12
12
|
import "./chunk-ITWVFGFV.js";
|
|
13
13
|
import {
|
|
14
14
|
createChatMessageMessage,
|
|
@@ -181,7 +181,7 @@ var QueueProcessor = class {
|
|
|
181
181
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
182
182
|
model: llmClient.getModel()
|
|
183
183
|
};
|
|
184
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
184
|
+
const { runChatTurn } = await import("./orchestrator-LX6FKB6L.js");
|
|
185
185
|
const runChatTurnParams = buildRunChatTurnParams({
|
|
186
186
|
sessionManager,
|
|
187
187
|
sessionId,
|
|
@@ -225,4 +225,4 @@ var QueueProcessor = class {
|
|
|
225
225
|
export {
|
|
226
226
|
QueueProcessor
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=processor-
|
|
228
|
+
//# sourceMappingURL=processor-NMYSEBC7.js.map
|