openfox 1.6.71 → 1.6.73
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/{auth-JF2HDJ6P.js → auth-LZZX63KI.js} +1 -1
- package/dist/{auto-compaction-FJ2LGJSA.js → auto-compaction-HQHEK75L.js} +9 -9
- package/dist/{chat-handler-KSF2CR5H.js → chat-handler-NNDQSDFI.js} +12 -12
- package/dist/{chunk-ENAZTRCR.js → chunk-4CQ7CUQ6.js} +2 -2
- package/dist/{chunk-F2VWCCMC.js → chunk-55Z3DJ7G.js} +5 -5
- package/dist/{chunk-LRXDM2PJ.js → chunk-5UTTLO4D.js} +5 -5
- package/dist/{chunk-TVQOONDR.js → chunk-AFATQ5LJ.js} +1 -6
- package/dist/{chunk-VCALN543.js → chunk-DLINTLB7.js} +3 -3
- package/dist/{chunk-K6NHXJM3.js → chunk-EGIJKK4U.js} +7 -5
- package/dist/{chunk-WNZIUQ2L.js → chunk-J5DV33SS.js} +2 -2
- package/dist/{chunk-HYIQFRYJ.js → chunk-JQBTYHUR.js} +21 -10
- package/dist/{chunk-KVZIYCT4.js → chunk-ODUSHSK2.js} +20 -22
- package/dist/{chunk-YNWDWIX2.js → chunk-PPSXSDMY.js} +18 -7
- package/dist/{chunk-WNDXRFVQ.js → chunk-RTOWT3GF.js} +42 -87
- package/dist/{chunk-4DNPYFL4.js → chunk-TYUNDOX2.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{config-3TU54V4X.js → config-6T4EHAP2.js} +5 -5
- package/dist/{events-2NH6YMVZ.js → events-LKEZ3YCW.js} +4 -4
- package/dist/{orchestrator-KBUCDCWE.js → orchestrator-T2EQZJS5.js} +10 -10
- package/dist/package.json +3 -1
- package/dist/{processor-TUK3TJ3N.js → processor-HF5SS6CR.js} +6 -6
- package/dist/{protocol-D8pu3Njm.d.ts → protocol-DRBnujwe.d.ts} +4 -0
- package/dist/{provider-J4G7XBDP.js → provider-AKN355YH.js} +8 -9
- package/dist/pwa-GHQCMCIU.js +357 -0
- package/dist/{runtime-config-2XJJIMSC.js → runtime-config-ZCK74XKM.js} +2 -2
- package/dist/{serve-Y7CERCIH.js → serve-YCFUOOGT.js} +14 -14
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +12 -12
- package/dist/shared/index.d.ts +2 -2
- package/dist/{tools-J23MXDY6.js → tools-5MCH72FH.js} +9 -9
- package/dist/{vision-fallback-HXPTLQHN.js → vision-fallback-AXH3BGJC.js} +2 -2
- package/dist/web/assets/{index-o22LDSSr.js → index-9GgVgB7B.js} +47 -47
- package/dist/web/assets/{index-Da8AupAk.css → index-D4Si0Pmc.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +3 -1
|
@@ -2,26 +2,26 @@ import {
|
|
|
2
2
|
maybeAutoCompactContext,
|
|
3
3
|
performManualContextCompaction,
|
|
4
4
|
resolveCompactionStatsIdentity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ODUSHSK2.js";
|
|
6
|
+
import "./chunk-GQZGIMJO.js";
|
|
7
|
+
import "./chunk-7JPKRM6M.js";
|
|
6
8
|
import "./chunk-RBPOAAIZ.js";
|
|
7
9
|
import "./chunk-NBU6KIOD.js";
|
|
8
10
|
import "./chunk-574HZVLE.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-J5DV33SS.js";
|
|
12
|
+
import "./chunk-5UTTLO4D.js";
|
|
13
|
+
import "./chunk-BLNFJ22S.js";
|
|
12
14
|
import "./chunk-PFRQO5Z3.js";
|
|
13
15
|
import "./chunk-KFBIHS3S.js";
|
|
14
16
|
import "./chunk-22CTURMH.js";
|
|
15
|
-
import "./chunk-GQZGIMJO.js";
|
|
16
|
-
import "./chunk-BLNFJ22S.js";
|
|
17
17
|
import "./chunk-CTAIXOZJ.js";
|
|
18
18
|
import "./chunk-R4HADRYO.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-AFATQ5LJ.js";
|
|
20
|
+
import "./chunk-DLINTLB7.js";
|
|
21
21
|
import "./chunk-PNBH3RAX.js";
|
|
22
22
|
export {
|
|
23
23
|
maybeAutoCompactContext,
|
|
24
24
|
performManualContextCompaction,
|
|
25
25
|
resolveCompactionStatsIdentity
|
|
26
26
|
};
|
|
27
|
-
//# sourceMappingURL=auto-compaction-
|
|
27
|
+
//# sourceMappingURL=auto-compaction-HQHEK75L.js.map
|
|
@@ -5,19 +5,21 @@ import {
|
|
|
5
5
|
generateSessionName,
|
|
6
6
|
getSessionMessageCount,
|
|
7
7
|
needsNameGenerationCheck
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4CQ7CUQ6.js";
|
|
9
9
|
import {
|
|
10
10
|
runChatTurn
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-EGIJKK4U.js";
|
|
12
|
+
import "./chunk-ODUSHSK2.js";
|
|
13
|
+
import "./chunk-GQZGIMJO.js";
|
|
14
|
+
import "./chunk-7JPKRM6M.js";
|
|
13
15
|
import "./chunk-RBPOAAIZ.js";
|
|
14
16
|
import "./chunk-NBU6KIOD.js";
|
|
15
17
|
import "./chunk-574HZVLE.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-WNZIUQ2L.js";
|
|
18
|
+
import "./chunk-J5DV33SS.js";
|
|
18
19
|
import {
|
|
19
20
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-5UTTLO4D.js";
|
|
22
|
+
import "./chunk-BLNFJ22S.js";
|
|
21
23
|
import "./chunk-PFRQO5Z3.js";
|
|
22
24
|
import {
|
|
23
25
|
createChatMessageMessage,
|
|
@@ -25,12 +27,10 @@ import {
|
|
|
25
27
|
createSessionRunningMessage
|
|
26
28
|
} from "./chunk-KFBIHS3S.js";
|
|
27
29
|
import "./chunk-22CTURMH.js";
|
|
28
|
-
import "./chunk-GQZGIMJO.js";
|
|
29
|
-
import "./chunk-BLNFJ22S.js";
|
|
30
30
|
import "./chunk-CTAIXOZJ.js";
|
|
31
31
|
import "./chunk-R4HADRYO.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-AFATQ5LJ.js";
|
|
33
|
+
import "./chunk-DLINTLB7.js";
|
|
34
34
|
import {
|
|
35
35
|
logger
|
|
36
36
|
} from "./chunk-PNBH3RAX.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-HQHEK75L.js");
|
|
65
65
|
await maybeAutoCompactContext({
|
|
66
66
|
sessionManager,
|
|
67
67
|
sessionId,
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
startChatSession,
|
|
171
171
|
stopSessionExecution
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chat-handler-
|
|
173
|
+
//# sourceMappingURL=chat-handler-NNDQSDFI.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore,
|
|
3
3
|
updateSessionMetadata
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5UTTLO4D.js";
|
|
5
5
|
import {
|
|
6
6
|
buildMessagesFromStoredEvents,
|
|
7
7
|
foldPendingConfirmations
|
|
@@ -143,4 +143,4 @@ export {
|
|
|
143
143
|
needsNameGenerationCheck,
|
|
144
144
|
applyGeneratedSessionName
|
|
145
145
|
};
|
|
146
|
-
//# sourceMappingURL=chunk-
|
|
146
|
+
//# sourceMappingURL=chunk-4CQ7CUQ6.js.map
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getBackendCapabilities,
|
|
6
6
|
getModelProfile,
|
|
7
7
|
mapFinishReason
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-J5DV33SS.js";
|
|
9
9
|
import {
|
|
10
10
|
ensureVisionFallbackConfigLoaded
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DLINTLB7.js";
|
|
12
12
|
import {
|
|
13
13
|
logger
|
|
14
14
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -191,7 +191,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
191
191
|
try {
|
|
192
192
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
193
193
|
await ensureVisionFallbackConfigLoaded();
|
|
194
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
194
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-AXH3BGJC.js");
|
|
195
195
|
const paramsOptions = {
|
|
196
196
|
model,
|
|
197
197
|
request,
|
|
@@ -269,7 +269,7 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
269
269
|
});
|
|
270
270
|
try {
|
|
271
271
|
await ensureVisionFallbackConfigLoaded();
|
|
272
|
-
const { isVisionFallbackEnabled } = await import("./vision-fallback-
|
|
272
|
+
const { isVisionFallbackEnabled } = await import("./vision-fallback-AXH3BGJC.js");
|
|
273
273
|
const shouldDisableThinking = disableThinking || request.disableThinking === true;
|
|
274
274
|
const createParams = await buildStreamingCreateParams({
|
|
275
275
|
model,
|
|
@@ -483,4 +483,4 @@ export {
|
|
|
483
483
|
setLlmStatus,
|
|
484
484
|
clearModelCache
|
|
485
485
|
};
|
|
486
|
-
//# sourceMappingURL=chunk-
|
|
486
|
+
//# sourceMappingURL=chunk-55Z3DJ7G.js.map
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getDatabase
|
|
3
|
+
} from "./chunk-BLNFJ22S.js";
|
|
1
4
|
import {
|
|
2
5
|
buildContextMessagesFromEventHistory,
|
|
3
6
|
buildMessagesFromStoredEvents,
|
|
@@ -7,12 +10,9 @@ import {
|
|
|
7
10
|
spreadOptionalMessageFields,
|
|
8
11
|
stripPromptContextMessages
|
|
9
12
|
} from "./chunk-PFRQO5Z3.js";
|
|
10
|
-
import {
|
|
11
|
-
getDatabase
|
|
12
|
-
} from "./chunk-BLNFJ22S.js";
|
|
13
13
|
import {
|
|
14
14
|
getRuntimeConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-AFATQ5LJ.js";
|
|
16
16
|
import {
|
|
17
17
|
logger
|
|
18
18
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -1181,4 +1181,4 @@ export {
|
|
|
1181
1181
|
compactContext,
|
|
1182
1182
|
getRecentUserPromptsForSession
|
|
1183
1183
|
};
|
|
1184
|
-
//# sourceMappingURL=chunk-
|
|
1184
|
+
//# sourceMappingURL=chunk-5UTTLO4D.js.map
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
// src/server/config.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var backendSchema = z.enum(["auto", "vllm", "sglang", "ollama", "llamacpp"]).default("auto");
|
|
4
|
-
var visionFallbackSchema = z.object({
|
|
5
|
-
enabled: z.boolean().default(false),
|
|
6
|
-
url: z.string().default("http://localhost:11434"),
|
|
7
|
-
model: z.string().default("qwen3-vl:2b")
|
|
8
|
-
});
|
|
9
4
|
var envSchema = z.object({
|
|
10
5
|
// New env var name, with fallback to old name for backward compatibility
|
|
11
6
|
OPENFOX_LLM_URL: z.string().url().optional(),
|
|
@@ -72,4 +67,4 @@ export {
|
|
|
72
67
|
setRuntimeConfig,
|
|
73
68
|
getRuntimeConfig
|
|
74
69
|
};
|
|
75
|
-
//# sourceMappingURL=chunk-
|
|
70
|
+
//# sourceMappingURL=chunk-AFATQ5LJ.js.map
|
|
@@ -29,8 +29,8 @@ function isVisionFallbackEnabled() {
|
|
|
29
29
|
async function ensureVisionFallbackConfigLoaded() {
|
|
30
30
|
if (configLoaded) return;
|
|
31
31
|
try {
|
|
32
|
-
const { loadGlobalConfig, getVisionFallback } = await import("./config-
|
|
33
|
-
const { getRuntimeConfig } = await import("./runtime-config-
|
|
32
|
+
const { loadGlobalConfig, getVisionFallback } = await import("./config-6T4EHAP2.js");
|
|
33
|
+
const { getRuntimeConfig } = await import("./runtime-config-ZCK74XKM.js");
|
|
34
34
|
const runtimeConfig = getRuntimeConfig();
|
|
35
35
|
const mode = runtimeConfig.mode ?? "production";
|
|
36
36
|
const globalConfig = await loadGlobalConfig(mode);
|
|
@@ -135,4 +135,4 @@ export {
|
|
|
135
135
|
describeImage,
|
|
136
136
|
describeImageFromDataUrl
|
|
137
137
|
};
|
|
138
|
-
//# sourceMappingURL=chunk-
|
|
138
|
+
//# sourceMappingURL=chunk-DLINTLB7.js.map
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
getToolRegistryForAgent,
|
|
14
14
|
loadAllAgentsDefault,
|
|
15
15
|
runTopLevelAgentLoop
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ODUSHSK2.js";
|
|
17
17
|
import {
|
|
18
18
|
getCurrentContextWindowId,
|
|
19
19
|
getEventStore
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5UTTLO4D.js";
|
|
21
21
|
import {
|
|
22
22
|
buildSnapshotFromSessionState
|
|
23
23
|
} from "./chunk-PFRQO5Z3.js";
|
|
@@ -108,6 +108,8 @@ async function runChatTurn(options) {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
if (error instanceof Error && error.message === "Aborted") {
|
|
111
|
+
const snapshot = buildSnapshot(sessionManager, sessionId, turnMetrics.buildStats(statsIdentity, mode));
|
|
112
|
+
eventStore.append(sessionId, { type: "turn.snapshot", data: snapshot });
|
|
111
113
|
return;
|
|
112
114
|
}
|
|
113
115
|
logger.error("Chat turn error", { sessionId, mode, error });
|
|
@@ -129,7 +131,7 @@ async function runChatTurn(options) {
|
|
|
129
131
|
eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
|
|
130
132
|
}
|
|
131
133
|
}
|
|
132
|
-
function injectModeReminderIfNeeded(sessionManager, sessionId, agentId, allAgents,
|
|
134
|
+
function injectModeReminderIfNeeded(sessionManager, sessionId, agentId, allAgents, _onMessage) {
|
|
133
135
|
const eventStore = getEventStore();
|
|
134
136
|
const session = sessionManager.requireSession(sessionId);
|
|
135
137
|
const lastModeReminder = session.executionState?.lastModeWithReminder;
|
|
@@ -274,7 +276,7 @@ async function runVerifierTurn(options, turnMetrics) {
|
|
|
274
276
|
content: result.content
|
|
275
277
|
};
|
|
276
278
|
}
|
|
277
|
-
function buildSnapshot(sessionManager, sessionId,
|
|
279
|
+
function buildSnapshot(sessionManager, sessionId, _lastStats) {
|
|
278
280
|
const eventStore = getEventStore();
|
|
279
281
|
const session = sessionManager.requireSession(sessionId);
|
|
280
282
|
const events = eventStore.getEvents(sessionId);
|
|
@@ -293,4 +295,4 @@ export {
|
|
|
293
295
|
runBuilderTurn,
|
|
294
296
|
runVerifierTurn
|
|
295
297
|
};
|
|
296
|
-
//# sourceMappingURL=chunk-
|
|
298
|
+
//# sourceMappingURL=chunk-EGIJKK4U.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
describeImageFromDataUrl
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DLINTLB7.js";
|
|
4
4
|
import {
|
|
5
5
|
logger
|
|
6
6
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -773,4 +773,4 @@ export {
|
|
|
773
773
|
extractThinking,
|
|
774
774
|
streamWithSegments
|
|
775
775
|
};
|
|
776
|
-
//# sourceMappingURL=chunk-
|
|
776
|
+
//# sourceMappingURL=chunk-J5DV33SS.js.map
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
createLLMClient,
|
|
4
4
|
detectModel,
|
|
5
5
|
setLlmStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-55Z3DJ7G.js";
|
|
7
7
|
import {
|
|
8
|
-
detectBackend
|
|
9
|
-
|
|
8
|
+
detectBackend,
|
|
9
|
+
getModelProfile
|
|
10
|
+
} from "./chunk-J5DV33SS.js";
|
|
10
11
|
import {
|
|
11
12
|
logger
|
|
12
13
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -39,19 +40,29 @@ async function fetchModelsFromBackend(url, apiKey) {
|
|
|
39
40
|
return [];
|
|
40
41
|
}
|
|
41
42
|
}
|
|
43
|
+
function enrichWithProfileDefaults(model) {
|
|
44
|
+
const profile = getModelProfile(model.id);
|
|
45
|
+
return {
|
|
46
|
+
...model,
|
|
47
|
+
defaultTemperature: profile.temperature,
|
|
48
|
+
defaultTopP: profile.topP,
|
|
49
|
+
...profile.topK !== void 0 && { defaultTopK: profile.topK },
|
|
50
|
+
defaultMaxTokens: profile.defaultMaxTokens
|
|
51
|
+
};
|
|
52
|
+
}
|
|
42
53
|
function mergeModelsWithUserOverrides(backendModels, userModels) {
|
|
43
54
|
const normalizedUserIdMap = new Map(userModels.map((m) => [normalizeModelId(m.id), m]));
|
|
44
55
|
const updatedModels = backendModels.map((backendModel) => {
|
|
45
56
|
const existingUserModel = normalizedUserIdMap.get(normalizeModelId(backendModel.id));
|
|
46
57
|
if (existingUserModel) {
|
|
47
|
-
return { ...existingUserModel, id: backendModel.id };
|
|
58
|
+
return enrichWithProfileDefaults({ ...existingUserModel, id: backendModel.id });
|
|
48
59
|
}
|
|
49
|
-
return backendModel;
|
|
60
|
+
return enrichWithProfileDefaults(backendModel);
|
|
50
61
|
});
|
|
51
62
|
const normalizedBackendIds = new Set(backendModels.map((m) => normalizeModelId(m.id)));
|
|
52
63
|
for (const userModel of userModels) {
|
|
53
64
|
if (!normalizedBackendIds.has(normalizeModelId(userModel.id))) {
|
|
54
|
-
updatedModels.push(userModel);
|
|
65
|
+
updatedModels.push(enrichWithProfileDefaults(userModel));
|
|
55
66
|
}
|
|
56
67
|
}
|
|
57
68
|
return updatedModels;
|
|
@@ -79,7 +90,7 @@ async function fetchModelsWithContext(baseUrl, apiKey, backend) {
|
|
|
79
90
|
source: m.contextWindow ? "backend" : "default"
|
|
80
91
|
}));
|
|
81
92
|
}
|
|
82
|
-
async function fetchOllamaModelsWithContext(baseUrl,
|
|
93
|
+
async function fetchOllamaModelsWithContext(baseUrl, _apiKey) {
|
|
83
94
|
const tagsUrl = `${baseUrl}/api/tags`;
|
|
84
95
|
try {
|
|
85
96
|
const tagsResponse = await fetch(tagsUrl, {
|
|
@@ -383,7 +394,7 @@ function createProviderManager(config) {
|
|
|
383
394
|
incoming: settings,
|
|
384
395
|
final: { temperature: finalTemp, topP: finalTopP, topK: finalTopK, maxTokens: finalMaxTokens, supportsVision: finalSupportsVision }
|
|
385
396
|
});
|
|
386
|
-
const updatedModel = {
|
|
397
|
+
const updatedModel = enrichWithProfileDefaults({
|
|
387
398
|
id: modelId,
|
|
388
399
|
contextWindow: settings.contextWindow ?? existingModel?.contextWindow ?? 2e5,
|
|
389
400
|
source: "user",
|
|
@@ -392,7 +403,7 @@ function createProviderManager(config) {
|
|
|
392
403
|
...finalTopK !== void 0 && { topK: finalTopK },
|
|
393
404
|
...finalMaxTokens !== void 0 && { maxTokens: finalMaxTokens },
|
|
394
405
|
...finalSupportsVision !== void 0 && { supportsVision: finalSupportsVision }
|
|
395
|
-
};
|
|
406
|
+
});
|
|
396
407
|
if (existingModel) {
|
|
397
408
|
providers = providers.map(
|
|
398
409
|
(p) => p.id === providerId ? { ...p, models: p.models.map((m) => m.id === modelId ? updatedModel : m) } : p
|
|
@@ -460,4 +471,4 @@ export {
|
|
|
460
471
|
parseDefaultModelSelection,
|
|
461
472
|
createProviderManager
|
|
462
473
|
};
|
|
463
|
-
//# sourceMappingURL=chunk-
|
|
474
|
+
//# sourceMappingURL=chunk-JQBTYHUR.js.map
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SETTINGS_KEYS,
|
|
3
|
+
deleteSetting,
|
|
4
|
+
getSetting,
|
|
5
|
+
setSetting
|
|
6
|
+
} from "./chunk-GQZGIMJO.js";
|
|
7
|
+
import {
|
|
8
|
+
getProject
|
|
9
|
+
} from "./chunk-7JPKRM6M.js";
|
|
1
10
|
import {
|
|
2
11
|
startInspectProxy
|
|
3
12
|
} from "./chunk-RBPOAAIZ.js";
|
|
@@ -14,20 +23,17 @@ import {
|
|
|
14
23
|
getMaxPerSession,
|
|
15
24
|
getSessionProcessCount
|
|
16
25
|
} from "./chunk-574HZVLE.js";
|
|
17
|
-
import {
|
|
18
|
-
getProject
|
|
19
|
-
} from "./chunk-7JPKRM6M.js";
|
|
20
26
|
import {
|
|
21
27
|
buildModelParams,
|
|
22
28
|
getBackendCapabilities,
|
|
23
29
|
getModelProfile,
|
|
24
30
|
streamWithSegments
|
|
25
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-J5DV33SS.js";
|
|
26
32
|
import {
|
|
27
33
|
getContextMessages,
|
|
28
34
|
getCurrentContextWindowId,
|
|
29
35
|
getEventStore
|
|
30
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-5UTTLO4D.js";
|
|
31
37
|
import {
|
|
32
38
|
createChatDoneMessage,
|
|
33
39
|
createChatMessageMessage,
|
|
@@ -41,18 +47,12 @@ import {
|
|
|
41
47
|
AskUserInterrupt,
|
|
42
48
|
askUserTool
|
|
43
49
|
} from "./chunk-22CTURMH.js";
|
|
44
|
-
import {
|
|
45
|
-
SETTINGS_KEYS,
|
|
46
|
-
deleteSetting,
|
|
47
|
-
getSetting,
|
|
48
|
-
setSetting
|
|
49
|
-
} from "./chunk-GQZGIMJO.js";
|
|
50
50
|
import {
|
|
51
51
|
getGlobalConfigDir
|
|
52
52
|
} from "./chunk-R4HADRYO.js";
|
|
53
53
|
import {
|
|
54
54
|
getRuntimeConfig
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-AFATQ5LJ.js";
|
|
56
56
|
import {
|
|
57
57
|
logger
|
|
58
58
|
} from "./chunk-PNBH3RAX.js";
|
|
@@ -1126,7 +1126,7 @@ async function deleteAgent(configDir, agentId) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
1128
1128
|
// src/server/tools/read.ts
|
|
1129
|
-
import { readFile as readFile4, stat
|
|
1129
|
+
import { readFile as readFile4, stat } from "fs/promises";
|
|
1130
1130
|
import { extname } from "path";
|
|
1131
1131
|
|
|
1132
1132
|
// src/server/tools/types.ts
|
|
@@ -1722,7 +1722,6 @@ var readFileTool = createTool(
|
|
|
1722
1722
|
}
|
|
1723
1723
|
},
|
|
1724
1724
|
async (args, context, helpers) => {
|
|
1725
|
-
const startTime = Date.now();
|
|
1726
1725
|
const offset = args.offset ?? 1;
|
|
1727
1726
|
const limit = Math.min(
|
|
1728
1727
|
args.limit ?? OUTPUT_LIMITS.read_file.maxLines,
|
|
@@ -1731,7 +1730,7 @@ var readFileTool = createTool(
|
|
|
1731
1730
|
const fullPath = helpers.resolvePath(args.path);
|
|
1732
1731
|
await helpers.checkPathAccess([fullPath]);
|
|
1733
1732
|
try {
|
|
1734
|
-
const stats = await
|
|
1733
|
+
const stats = await stat(fullPath);
|
|
1735
1734
|
if (stats.isDirectory()) {
|
|
1736
1735
|
return helpers.error(`Path is a directory, not a file: ${args.path}`);
|
|
1737
1736
|
}
|
|
@@ -2097,7 +2096,6 @@ Make sure whitespace and indentation match exactly.`
|
|
|
2097
2096
|
);
|
|
2098
2097
|
|
|
2099
2098
|
// src/server/tools/shell.ts
|
|
2100
|
-
import "child_process";
|
|
2101
2099
|
import { resolve as resolve4, isAbsolute as isAbsolute2 } from "path";
|
|
2102
2100
|
|
|
2103
2101
|
// src/server/utils/shell.ts
|
|
@@ -2105,7 +2103,7 @@ import { spawn } from "child_process";
|
|
|
2105
2103
|
function checkAborted(signal) {
|
|
2106
2104
|
return !!signal?.aborted;
|
|
2107
2105
|
}
|
|
2108
|
-
function spawnShellProcess(command, cwd,
|
|
2106
|
+
function spawnShellProcess(command, cwd, _signal, detached = false) {
|
|
2109
2107
|
const shell = getPlatformShell();
|
|
2110
2108
|
return spawn(shell.command, [...shell.args, command], {
|
|
2111
2109
|
cwd,
|
|
@@ -3142,7 +3140,7 @@ async function executeSubAgent(options) {
|
|
|
3142
3140
|
}));
|
|
3143
3141
|
}
|
|
3144
3142
|
}
|
|
3145
|
-
const {
|
|
3143
|
+
const { files } = await getAllInstructions(session.workdir, session.projectId);
|
|
3146
3144
|
const injectedFiles = files.map((file) => ({
|
|
3147
3145
|
path: file.path,
|
|
3148
3146
|
content: file.content ?? "",
|
|
@@ -3383,7 +3381,7 @@ var callSubAgentTool = {
|
|
|
3383
3381
|
};
|
|
3384
3382
|
}
|
|
3385
3383
|
try {
|
|
3386
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3384
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-5MCH72FH.js");
|
|
3387
3385
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3388
3386
|
const turnMetrics = new TurnMetrics();
|
|
3389
3387
|
const result = await executeSubAgent({
|
|
@@ -3637,7 +3635,7 @@ var webFetchTool = createTool(
|
|
|
3637
3635
|
);
|
|
3638
3636
|
|
|
3639
3637
|
// src/server/dev-server/manager.ts
|
|
3640
|
-
import { spawn as
|
|
3638
|
+
import { spawn as spawn3 } from "child_process";
|
|
3641
3639
|
import { readFile as readFile7, writeFile as writeFile5, mkdir as mkdir4 } from "fs/promises";
|
|
3642
3640
|
import { resolve as resolve5, join as join6 } from "path";
|
|
3643
3641
|
var MAX_LOG_LINES = 2e3;
|
|
@@ -3751,7 +3749,7 @@ var DevServerManager = class {
|
|
|
3751
3749
|
}
|
|
3752
3750
|
const resolved = this.resolveWorkdir(workdir);
|
|
3753
3751
|
const shell = getPlatformShell();
|
|
3754
|
-
const proc =
|
|
3752
|
+
const proc = spawn3(shell.command, [...shell.args, config.command], {
|
|
3755
3753
|
cwd: resolved,
|
|
3756
3754
|
env: { ...process.env, FORCE_COLOR: "1" },
|
|
3757
3755
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -4537,4 +4535,4 @@ export {
|
|
|
4537
4535
|
getToolRegistryForAgent,
|
|
4538
4536
|
createToolRegistry
|
|
4539
4537
|
};
|
|
4540
|
-
//# sourceMappingURL=chunk-
|
|
4538
|
+
//# sourceMappingURL=chunk-ODUSHSK2.js.map
|
|
@@ -21,6 +21,7 @@ Commands:
|
|
|
21
21
|
provider use Switch active provider
|
|
22
22
|
provider remove Remove a provider
|
|
23
23
|
service Manage the systemd service (install, start, stop, status, logs, uninstall)
|
|
24
|
+
pwa Manage the PWA installation (install, uninstall, launch, update, status)
|
|
24
25
|
update Update OpenFox to the latest version (see update.sh)
|
|
25
26
|
|
|
26
27
|
Options:
|
|
@@ -31,8 +32,8 @@ Options:
|
|
|
31
32
|
`);
|
|
32
33
|
}
|
|
33
34
|
async function runNetworkSetup(mode) {
|
|
34
|
-
const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-
|
|
35
|
-
const { saveGlobalConfig } = await import("./config-
|
|
35
|
+
const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-LZZX63KI.js");
|
|
36
|
+
const { saveGlobalConfig } = await import("./config-6T4EHAP2.js");
|
|
36
37
|
const { getAuthKeyPath } = await import("./paths-ZRI56O63.js");
|
|
37
38
|
const existingAuth = await loadAuthConfig(mode);
|
|
38
39
|
if (existingAuth) {
|
|
@@ -93,7 +94,7 @@ async function runNetworkSetup(mode) {
|
|
|
93
94
|
console.log("\u2713 Configuration saved!\n");
|
|
94
95
|
}
|
|
95
96
|
async function runConfig(mode) {
|
|
96
|
-
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-
|
|
97
|
+
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-6T4EHAP2.js");
|
|
97
98
|
const { getGlobalConfigPath } = await import("./paths-ZRI56O63.js");
|
|
98
99
|
const config = await loadGlobalConfig(mode);
|
|
99
100
|
const configPath = getGlobalConfigPath(mode);
|
|
@@ -148,7 +149,7 @@ async function runCli(options) {
|
|
|
148
149
|
break;
|
|
149
150
|
}
|
|
150
151
|
case "provider": {
|
|
151
|
-
const { runProviderCommand } = await import("./provider-
|
|
152
|
+
const { runProviderCommand } = await import("./provider-AKN355YH.js");
|
|
152
153
|
const [, subcommand] = positionals;
|
|
153
154
|
await runProviderCommand(mode, subcommand);
|
|
154
155
|
break;
|
|
@@ -163,6 +164,16 @@ async function runCli(options) {
|
|
|
163
164
|
}
|
|
164
165
|
break;
|
|
165
166
|
}
|
|
167
|
+
case "pwa": {
|
|
168
|
+
const { runPwaCommand, printPwaHelp } = await import("./pwa-GHQCMCIU.js");
|
|
169
|
+
const [, subcommand] = positionals;
|
|
170
|
+
if (subcommand === "--help" || subcommand === "-h" || values.help) {
|
|
171
|
+
printPwaHelp();
|
|
172
|
+
} else {
|
|
173
|
+
await runPwaCommand(mode, subcommand);
|
|
174
|
+
}
|
|
175
|
+
break;
|
|
176
|
+
}
|
|
166
177
|
case "update": {
|
|
167
178
|
const __filename = fileURLToPath(import.meta.url);
|
|
168
179
|
const __dirname = dirname(__filename);
|
|
@@ -174,12 +185,12 @@ async function runCli(options) {
|
|
|
174
185
|
break;
|
|
175
186
|
}
|
|
176
187
|
default: {
|
|
177
|
-
const { configFileExists } = await import("./config-
|
|
188
|
+
const { configFileExists } = await import("./config-6T4EHAP2.js");
|
|
178
189
|
const configExists = await configFileExists(mode);
|
|
179
190
|
if (!configExists) {
|
|
180
191
|
await runNetworkSetup(mode);
|
|
181
192
|
}
|
|
182
|
-
const { runServe } = await import("./serve-
|
|
193
|
+
const { runServe } = await import("./serve-YCFUOOGT.js");
|
|
183
194
|
await runServe({
|
|
184
195
|
mode,
|
|
185
196
|
port: values.port ? parseInt(values.port) : void 0,
|
|
@@ -192,4 +203,4 @@ async function runCli(options) {
|
|
|
192
203
|
export {
|
|
193
204
|
runCli
|
|
194
205
|
};
|
|
195
|
-
//# sourceMappingURL=chunk-
|
|
206
|
+
//# sourceMappingURL=chunk-PPSXSDMY.js.map
|