openfox 2.0.67 → 2.0.68
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-72DFHK5K.js → chat-handler-QFEHJBWN.js} +6 -6
- package/dist/{chunk-MQHMT5WF.js → chunk-32KLLK4N.js} +3 -3
- package/dist/{chunk-TMHWQYWE.js → chunk-64GN6OPR.js} +2 -2
- package/dist/{chunk-YU6DZAVA.js → chunk-6LK47TNE.js} +15 -95
- package/dist/{chunk-5EO6SEGV.js → chunk-7OW6X764.js} +2 -2
- package/dist/{chunk-B6JUWVTK.js → chunk-COWJRBV4.js} +5 -5
- package/dist/{chunk-2GRUQN2B.js → chunk-DWZEGLHJ.js} +251 -57
- package/dist/{chunk-B7WGOK7G.js → chunk-E4POUD2M.js} +2 -2
- package/dist/{chunk-PYRH4G2J.js → chunk-FCLCEIY4.js} +5 -5
- package/dist/{chunk-BL5LOLVA.js → chunk-JHGKXQBO.js} +161 -28
- package/dist/{chunk-TJO4QFDQ.js → chunk-QFSDJIUS.js} +2 -2
- package/dist/{chunk-ZLON3JTI.js → chunk-YQ3MEZJL.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-BUX62J2K.js → client-63U5CTPE.js} +3 -3
- package/dist/{client-pure-U6ZYUPJQ.js → client-pure-XHH4RRLB.js} +2 -2
- package/dist/{compactor-74CZVUWI.js → compactor-IPMMFFHM.js} +4 -4
- package/dist/{orchestrator-FEMPJOZD.js → orchestrator-GNXKJPX4.js} +5 -5
- package/dist/package.json +3 -2
- package/dist/{processor-QB3NMRMO.js → processor-TIQEQDP7.js} +6 -6
- package/dist/{protocol-42f_Png6.d.ts → protocol-DIhV-tAc.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-BDH6JGZB.js → provider-IBIWR4AI.js} +4 -4
- package/dist/{provider-manager-D3KIOD5E.js → provider-manager-7C3JVOLW.js} +4 -4
- package/dist/{serve-32FAA4FX.js → serve-QVVZ5SJE.js} +10 -10
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +9 -9
- package/dist/{server-OYE7GERR.js → server-ECKS2Y3R.js} +7 -7
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tools-INWP6FGV.js → tools-QAEN5KHA.js} +4 -4
- package/dist/{types-vezAEt_y.d.ts → types-BsfYpEai.d.ts} +2 -1
- package/dist/{types-apiMd7Df.d.ts → types-CBC6lLqc.d.ts} +1 -1
- package/dist/web/assets/{index-BELeAs12.css → index-BA_65WJ5.css} +1 -1
- package/dist/web/assets/{index-C3n65CNu.js → index-CsZQdTAd.js} +74 -74
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +3 -2
- package/plugins-registry.json +14 -0
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
buildRunChatTurnParams,
|
|
3
3
|
finalizeTurnCompletion,
|
|
4
4
|
generateSessionNameForSession
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-64GN6OPR.js";
|
|
6
6
|
import {
|
|
7
7
|
runChatTurn
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-FCLCEIY4.js";
|
|
9
|
+
import "./chunk-6LK47TNE.js";
|
|
10
|
+
import "./chunk-QFSDJIUS.js";
|
|
11
11
|
import "./chunk-4QBDV6LX.js";
|
|
12
12
|
import "./chunk-KXVFHMSM.js";
|
|
13
13
|
import "./chunk-TFCHWMOJ.js";
|
|
@@ -31,7 +31,7 @@ import "./chunk-EU3WWTFH.js";
|
|
|
31
31
|
import "./chunk-J2GP3J3X.js";
|
|
32
32
|
import "./chunk-V4IE7HJY.js";
|
|
33
33
|
import "./chunk-YHEQTVFV.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-JHGKXQBO.js";
|
|
35
35
|
import "./chunk-K44MW7JJ.js";
|
|
36
36
|
import "./chunk-YD6NDTKF.js";
|
|
37
37
|
import "./chunk-WGAAQASA.js";
|
|
@@ -157,4 +157,4 @@ export {
|
|
|
157
157
|
startChatSession,
|
|
158
158
|
stopSessionExecution
|
|
159
159
|
};
|
|
160
|
-
//# sourceMappingURL=chat-handler-
|
|
160
|
+
//# sourceMappingURL=chat-handler-QFEHJBWN.js.map
|
|
@@ -164,7 +164,7 @@ async function runCli(options) {
|
|
|
164
164
|
break;
|
|
165
165
|
}
|
|
166
166
|
case "provider": {
|
|
167
|
-
const { runProviderCommand } = await import("./provider-
|
|
167
|
+
const { runProviderCommand } = await import("./provider-IBIWR4AI.js");
|
|
168
168
|
const [, subcommand] = positionals;
|
|
169
169
|
await runProviderCommand(mode, subcommand);
|
|
170
170
|
break;
|
|
@@ -208,7 +208,7 @@ async function runCli(options) {
|
|
|
208
208
|
if (!configExists) {
|
|
209
209
|
await runNetworkSetup(mode);
|
|
210
210
|
}
|
|
211
|
-
const { runServe } = await import("./serve-
|
|
211
|
+
const { runServe } = await import("./serve-QVVZ5SJE.js");
|
|
212
212
|
const serveOptions = { mode };
|
|
213
213
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
214
214
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -220,4 +220,4 @@ async function runCli(options) {
|
|
|
220
220
|
export {
|
|
221
221
|
runCli
|
|
222
222
|
};
|
|
223
|
-
//# sourceMappingURL=chunk-
|
|
223
|
+
//# sourceMappingURL=chunk-32KLLK4N.js.map
|
|
@@ -135,7 +135,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
|
|
|
135
135
|
client = deps.getLLMClient();
|
|
136
136
|
client.setModel(providerConfig.model);
|
|
137
137
|
} else if (providerConfig) {
|
|
138
|
-
const { createLLMClient } = await import("./client-
|
|
138
|
+
const { createLLMClient } = await import("./client-63U5CTPE.js");
|
|
139
139
|
client = createLLMClient({
|
|
140
140
|
llm: {
|
|
141
141
|
baseUrl: providerConfig.baseUrl,
|
|
@@ -184,4 +184,4 @@ export {
|
|
|
184
184
|
buildRunChatTurnParams,
|
|
185
185
|
generateSessionNameForSession
|
|
186
186
|
};
|
|
187
|
-
//# sourceMappingURL=chunk-
|
|
187
|
+
//# sourceMappingURL=chunk-64GN6OPR.js.map
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
createToolCallEvent,
|
|
11
11
|
createToolResultEvent,
|
|
12
12
|
streamLLMPure
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QFSDJIUS.js";
|
|
14
14
|
import {
|
|
15
15
|
startInspectProxy
|
|
16
16
|
} from "./chunk-4QBDV6LX.js";
|
|
@@ -75,6 +75,13 @@ import {
|
|
|
75
75
|
import {
|
|
76
76
|
modelSupportsVision
|
|
77
77
|
} from "./chunk-V4IE7HJY.js";
|
|
78
|
+
import {
|
|
79
|
+
OUTPUT_LIMITS,
|
|
80
|
+
extractPdfText,
|
|
81
|
+
formatPdfErrorMessage,
|
|
82
|
+
isPdfBuffer,
|
|
83
|
+
processPdfContent
|
|
84
|
+
} from "./chunk-JHGKXQBO.js";
|
|
78
85
|
import {
|
|
79
86
|
logger
|
|
80
87
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -90,32 +97,6 @@ import {
|
|
|
90
97
|
import { readFile as readFile2, stat, readdir } from "fs/promises";
|
|
91
98
|
import { extname, join as join2 } from "path";
|
|
92
99
|
|
|
93
|
-
// src/server/tools/types.ts
|
|
94
|
-
var OUTPUT_LIMITS = {
|
|
95
|
-
read_file: {
|
|
96
|
-
maxLines: 2e3,
|
|
97
|
-
maxBytes: 1e5,
|
|
98
|
-
maxImageBytes: 2097152,
|
|
99
|
-
// 2MB for images
|
|
100
|
-
maxPdfPages: 50,
|
|
101
|
-
maxFileBytes: 20971520
|
|
102
|
-
// 20MB general file safety limit
|
|
103
|
-
},
|
|
104
|
-
run_command: {
|
|
105
|
-
maxLines: 2e3,
|
|
106
|
-
maxBytes: 5e4
|
|
107
|
-
},
|
|
108
|
-
glob: {
|
|
109
|
-
maxResults: 500
|
|
110
|
-
},
|
|
111
|
-
grep: {
|
|
112
|
-
maxMatches: 200
|
|
113
|
-
},
|
|
114
|
-
web_fetch: {
|
|
115
|
-
maxBytes: 1e5
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
|
|
119
100
|
// src/server/tools/tool-helpers.ts
|
|
120
101
|
import { resolve as resolve2, isAbsolute } from "path";
|
|
121
102
|
|
|
@@ -244,9 +225,9 @@ function extractAbsolutePathsFromCommand(command) {
|
|
|
244
225
|
const paths = [];
|
|
245
226
|
const home = homedir();
|
|
246
227
|
let sanitized = command.replace(/https?:\/\/[^\s'"]+/g, " __URL__ ").replace(/ftp:\/\/[^\s'"]+/g, " __URL__ ");
|
|
247
|
-
sanitized = sanitized.replace(/s\/[^/]*\/[^/]*\/[gip]*/g, " __SED__ ");
|
|
248
|
-
sanitized = sanitized.replace(/s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
|
|
249
|
-
sanitized = sanitized.replace(/s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
|
|
228
|
+
sanitized = sanitized.replace(/(?<!\w)s\/[^/]*\/[^/]*\/[gip]*/g, " __SED__ ");
|
|
229
|
+
sanitized = sanitized.replace(/(?<!\w)s\|[^|]*\|[^|]*\|[gip]*/g, " __SED__ ");
|
|
230
|
+
sanitized = sanitized.replace(/(?<!\w)s:[^:]*:[^:]*:[gip]*/g, " __SED__ ");
|
|
250
231
|
sanitized = sanitized.replace(
|
|
251
232
|
/git\s+commit\b.*?(?:-(?:[a-zA-Z]*m)(?=\s)|--message)\s+(["'])(?:(?!\1).)*\1/g,
|
|
252
233
|
(match2) => match2.replace(/\/[^\s"'|&;<>`()]+/g, " __COMMIT_MSG__ ")
|
|
@@ -863,67 +844,6 @@ function stringToUtf32(str, littleEndian) {
|
|
|
863
844
|
|
|
864
845
|
// src/server/tools/read.ts
|
|
865
846
|
import { fileTypeFromBuffer } from "file-type";
|
|
866
|
-
|
|
867
|
-
// src/server/tools/pdf-utils.ts
|
|
868
|
-
import { getDocument } from "pdfjs-dist/legacy/build/pdf.mjs";
|
|
869
|
-
var PDF_HEADER = Buffer.from("%PDF");
|
|
870
|
-
function isPdfBuffer(buffer) {
|
|
871
|
-
return buffer.length > 4 && buffer.subarray(0, 4).equals(PDF_HEADER);
|
|
872
|
-
}
|
|
873
|
-
function isPasswordError(err) {
|
|
874
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
875
|
-
return message.toLowerCase().includes("password") || message.toLowerCase().includes("encrypt");
|
|
876
|
-
}
|
|
877
|
-
function formatPdfErrorMessage(err) {
|
|
878
|
-
if (isPasswordError(err)) {
|
|
879
|
-
return "This PDF is password-protected. Unlock it with an external tool first.";
|
|
880
|
-
}
|
|
881
|
-
return `Failed to read PDF: ${err instanceof Error ? err.message : String(err)}`;
|
|
882
|
-
}
|
|
883
|
-
function processPdfContent(text, maxBytes) {
|
|
884
|
-
let output = text;
|
|
885
|
-
let truncated = false;
|
|
886
|
-
if (output.length > maxBytes) {
|
|
887
|
-
output = output.slice(0, maxBytes) + "\n\n[Output truncated due to size limit]";
|
|
888
|
-
truncated = true;
|
|
889
|
-
}
|
|
890
|
-
const isScanned = output.replace(/\[Page \d+\/\d+\]\n/g, "").trim().length === 0;
|
|
891
|
-
return { output, truncated, isScanned };
|
|
892
|
-
}
|
|
893
|
-
async function extractPdfText(buffer) {
|
|
894
|
-
const doc = await getDocument({ data: Uint8Array.from(buffer) }).promise;
|
|
895
|
-
const pageCount = doc.numPages;
|
|
896
|
-
const rawMeta = await doc.getMetadata();
|
|
897
|
-
const info = rawMeta.info;
|
|
898
|
-
const title = info?.["Title"] || null;
|
|
899
|
-
const author = info?.["Author"] || null;
|
|
900
|
-
const pages = [];
|
|
901
|
-
const limitedPageCount = Math.min(pageCount, OUTPUT_LIMITS.read_file.maxPdfPages);
|
|
902
|
-
try {
|
|
903
|
-
for (let i = 1; i <= limitedPageCount; i++) {
|
|
904
|
-
const page = await doc.getPage(i);
|
|
905
|
-
try {
|
|
906
|
-
const content = await page.getTextContent();
|
|
907
|
-
const pageText = content.items.map((item) => "str" in item ? item.str : "").join(" ");
|
|
908
|
-
pages.push(`[Page ${i}/${pageCount}]
|
|
909
|
-
${pageText}`);
|
|
910
|
-
} finally {
|
|
911
|
-
page.cleanup();
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
} finally {
|
|
915
|
-
doc.cleanup();
|
|
916
|
-
}
|
|
917
|
-
let text = pages.join("\n\n");
|
|
918
|
-
if (pageCount > limitedPageCount) {
|
|
919
|
-
text += `
|
|
920
|
-
|
|
921
|
-
[PDF has ${pageCount} pages, showing first ${limitedPageCount}. Use a shell command to process more.]`;
|
|
922
|
-
}
|
|
923
|
-
return { text, pageCount, title, author };
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// src/server/tools/read.ts
|
|
927
847
|
async function detectImageType(buffer, filePath) {
|
|
928
848
|
const fileType = await fileTypeFromBuffer(buffer);
|
|
929
849
|
const imageMimeTypes = ["image/png", "image/jpeg", "image/gif", "image/webp", "image/bmp", "image/svg+xml"];
|
|
@@ -2954,7 +2874,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2954
2874
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
|
|
2955
2875
|
if (!compacting) {
|
|
2956
2876
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
2957
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2877
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-IPMMFFHM.js");
|
|
2958
2878
|
if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
|
|
2959
2879
|
appendCompactionPrompt(sessionId, append);
|
|
2960
2880
|
compacting = true;
|
|
@@ -3859,7 +3779,7 @@ var callSubAgentTool = {
|
|
|
3859
3779
|
};
|
|
3860
3780
|
}
|
|
3861
3781
|
try {
|
|
3862
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3782
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-QAEN5KHA.js");
|
|
3863
3783
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3864
3784
|
const turnMetrics = new TurnMetrics();
|
|
3865
3785
|
const result = await executeSubAgent({
|
|
@@ -4858,7 +4778,7 @@ var mcpConfigTool = createTool(
|
|
|
4858
4778
|
mcpNotifyChanged?.(sessionId);
|
|
4859
4779
|
}
|
|
4860
4780
|
async function rebuildTools() {
|
|
4861
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4781
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-QAEN5KHA.js");
|
|
4862
4782
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4863
4783
|
setMcpTools2(mcpTools);
|
|
4864
4784
|
}
|
|
@@ -5521,4 +5441,4 @@ export {
|
|
|
5521
5441
|
getToolRegistryForAgent,
|
|
5522
5442
|
createToolRegistry
|
|
5523
5443
|
};
|
|
5524
|
-
//# sourceMappingURL=chunk-
|
|
5444
|
+
//# sourceMappingURL=chunk-6LK47TNE.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-E4POUD2M.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -796,4 +796,4 @@ export {
|
|
|
796
796
|
parseDefaultModelSelection,
|
|
797
797
|
createProviderManager
|
|
798
798
|
};
|
|
799
|
-
//# sourceMappingURL=chunk-
|
|
799
|
+
//# sourceMappingURL=chunk-7OW6X764.js.map
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
computeSessionHash,
|
|
4
4
|
runAgentTurn,
|
|
5
5
|
runChatTurn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCLCEIY4.js";
|
|
7
7
|
import {
|
|
8
8
|
appendCompactionPrompt
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YQ3MEZJL.js";
|
|
10
10
|
import {
|
|
11
11
|
deleteItemFromDir,
|
|
12
12
|
devServerManager,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
jsonSerializer,
|
|
17
17
|
loadAllAgentsDefault,
|
|
18
18
|
saveItemToDir
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6LK47TNE.js";
|
|
20
20
|
import {
|
|
21
21
|
TurnMetrics,
|
|
22
22
|
createMessageStartEvent
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QFSDJIUS.js";
|
|
24
24
|
import {
|
|
25
25
|
checkAborted,
|
|
26
26
|
onProcessEvent,
|
|
@@ -2158,4 +2158,4 @@ export {
|
|
|
2158
2158
|
signalMcpReady,
|
|
2159
2159
|
createWebSocketServer
|
|
2160
2160
|
};
|
|
2161
|
-
//# sourceMappingURL=chunk-
|
|
2161
|
+
//# sourceMappingURL=chunk-COWJRBV4.js.map
|