openfox 2.0.76 → 2.0.77
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-3BZ4PDL2.js → chat-handler-FNRKORKP.js} +8 -8
- package/dist/{chunk-XTK6E2QR.js → chunk-3TQN25OM.js} +2 -2
- package/dist/{chunk-J7VCI5EX.js → chunk-BX3VJP2D.js} +96 -44
- package/dist/{chunk-OMWVB2XC.js → chunk-CI5BWHW7.js} +5 -5
- package/dist/{chunk-OCVRIPQP.js → chunk-CJDYSUU5.js} +3 -3
- package/dist/{chunk-HAQV6AJP.js → chunk-CPTC2MD5.js} +2 -2
- package/dist/chunk-NUXS5OQB.js +7 -0
- package/dist/{chunk-EZK7CGJ7.js → chunk-RMXPVQP4.js} +315 -45
- package/dist/{chunk-HLHGNHMV.js → chunk-VMYDUZWI.js} +5 -5
- package/dist/{chunk-KVRSAC4Z.js → chunk-VPFUXGMM.js} +6 -1
- package/dist/{chunk-W4ZEG3LX.js → chunk-WL2WEJAK.js} +2 -2
- package/dist/{chunk-7772ENZN.js → chunk-XNCHOD2X.js} +2 -2
- package/dist/{chunk-D6CI2B7B.js → chunk-YDV7RIQ6.js} +115 -72
- package/dist/{chunk-WGAAQASA.js → chunk-YFVSSMA3.js} +3 -2
- package/dist/{chunk-HHUIXHHX.js → chunk-YPHLCRFP.js} +7 -7
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-TDPQVBQ7.js → client-V5DZRO2D.js} +3 -3
- package/dist/{client-pure-NMLDKRDN.js → client-pure-5YE5WFJP.js} +2 -2
- package/dist/{compactor-BB3YYVRP.js → compactor-BJXFE5PL.js} +4 -4
- package/dist/{config-EUMVEFHU.js → config-MD74ETY5.js} +2 -2
- package/dist/{orchestrator-5IMCWX5P.js → orchestrator-67BZJEOO.js} +7 -7
- package/dist/package.json +3 -1
- package/dist/{processor-3R4GS6VB.js → processor-BCOSEMZK.js} +8 -8
- package/dist/{protocol-Sr6Jr4ZS.d.ts → protocol-Ceapo3jt.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-G2YC2IC4.js → provider-PI3RDDE4.js} +6 -6
- package/dist/{provider-manager-SQIELYLK.js → provider-manager-PD3BXUHY.js} +4 -4
- package/dist/{serve-MXKMKZYY.js → serve-BD44GN7N.js} +13 -13
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +12 -12
- package/dist/{server-SPYFMFQE.js → server-OLRW27DH.js} +9 -9
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tools-JRCUWPJO.js → tools-T7S45DOQ.js} +6 -6
- package/dist/{types-C4cG9CtC.d.ts → types-DABVUbUu.d.ts} +1 -0
- package/dist/{types-DSZhFA8O.d.ts → types-pssMT-oY.d.ts} +1 -1
- package/dist/{update-OXDQ75M7.js → update-56VZOLQJ.js} +2 -2
- package/dist/{update-server-4MTM7M5P.js → update-server-V6GJ43WH.js} +2 -2
- package/dist/web/assets/index-BuUd6IgK.js +305 -0
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +3 -1
- package/dist/chunk-KQEVAO2Q.js +0 -7
- package/dist/web/assets/index-ghDkIdlf.js +0 -305
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-NWO6GRYE.js";
|
|
4
4
|
import {
|
|
5
5
|
applyMcpServerUpdate
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VPFUXGMM.js";
|
|
7
7
|
import {
|
|
8
8
|
getGitBranch,
|
|
9
9
|
listWorkspaces
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
createToolCallEvent,
|
|
25
25
|
createToolResultEvent,
|
|
26
26
|
streamLLMPure
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XNCHOD2X.js";
|
|
28
28
|
import {
|
|
29
29
|
startInspectProxy
|
|
30
30
|
} from "./chunk-DH3SSBZN.js";
|
|
@@ -86,18 +86,22 @@ import {
|
|
|
86
86
|
} from "./chunk-V4IE7HJY.js";
|
|
87
87
|
import {
|
|
88
88
|
OUTPUT_LIMITS,
|
|
89
|
+
cacheSet,
|
|
90
|
+
contentHash,
|
|
91
|
+
decodeDataUrl,
|
|
92
|
+
extractPdfContent,
|
|
89
93
|
extractPdfText,
|
|
90
94
|
formatPdfErrorMessage,
|
|
91
95
|
isPdfBuffer,
|
|
92
96
|
processPdfContent
|
|
93
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-RMXPVQP4.js";
|
|
94
98
|
import {
|
|
95
99
|
logger
|
|
96
100
|
} from "./chunk-K44MW7JJ.js";
|
|
97
101
|
import {
|
|
98
102
|
loadGlobalConfig,
|
|
99
103
|
saveGlobalConfig
|
|
100
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-YFVSSMA3.js";
|
|
101
105
|
import {
|
|
102
106
|
getGlobalConfigDir
|
|
103
107
|
} from "./chunk-CQGTEGKL.js";
|
|
@@ -2513,7 +2517,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2513
2517
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens, config.subAgentMetadata?.subAgentId);
|
|
2514
2518
|
if (!compacting) {
|
|
2515
2519
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
2516
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2520
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-BJXFE5PL.js");
|
|
2517
2521
|
if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
|
|
2518
2522
|
appendCompactionPrompt(sessionId, append);
|
|
2519
2523
|
compacting = true;
|
|
@@ -2870,10 +2874,9 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
|
|
|
2870
2874
|
}
|
|
2871
2875
|
|
|
2872
2876
|
// src/server/context/image-processor.ts
|
|
2873
|
-
import { createHash as createHash2 } from "crypto";
|
|
2874
2877
|
async function loadVisionModelFromGlobalConfig() {
|
|
2875
2878
|
try {
|
|
2876
|
-
const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-
|
|
2879
|
+
const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-MD74ETY5.js");
|
|
2877
2880
|
const runtimeConfig = getRuntimeConfig();
|
|
2878
2881
|
const mode = runtimeConfig.mode ?? "production";
|
|
2879
2882
|
const globalConfig = await loadGlobalConfig2(mode);
|
|
@@ -2891,12 +2894,12 @@ async function loadVisionModelFromGlobalConfig() {
|
|
|
2891
2894
|
return void 0;
|
|
2892
2895
|
}
|
|
2893
2896
|
var descriptionCache = /* @__PURE__ */ new Map();
|
|
2894
|
-
function contentHash(data) {
|
|
2895
|
-
return createHash2("sha256").update(data).digest("hex").slice(0, 16);
|
|
2896
|
-
}
|
|
2897
2897
|
function isImageAttachment(att) {
|
|
2898
2898
|
return att.mimeType.startsWith("image/");
|
|
2899
2899
|
}
|
|
2900
|
+
function isPdfAttachment(att) {
|
|
2901
|
+
return att.mimeType === "application/pdf";
|
|
2902
|
+
}
|
|
2900
2903
|
function hasImageMetadata(result) {
|
|
2901
2904
|
const meta = result.metadata;
|
|
2902
2905
|
if (!meta) return false;
|
|
@@ -2904,46 +2907,17 @@ function hasImageMetadata(result) {
|
|
|
2904
2907
|
const mimeType = meta["mimeType"];
|
|
2905
2908
|
return typeof dataUrl === "string" && typeof mimeType === "string" && mimeType.startsWith("image/");
|
|
2906
2909
|
}
|
|
2907
|
-
async function
|
|
2908
|
-
const cacheKey = contentHash(att.data);
|
|
2909
|
-
if (descriptionCache.has(cacheKey)) {
|
|
2910
|
-
const cached = descriptionCache.get(cacheKey);
|
|
2911
|
-
descriptions.set(att.id, cached);
|
|
2912
|
-
return cached;
|
|
2913
|
-
}
|
|
2914
|
-
if (options.visionModel) {
|
|
2915
|
-
const startData = {
|
|
2916
|
-
messageId,
|
|
2917
|
-
attachmentId: att.id
|
|
2918
|
-
};
|
|
2919
|
-
if (att.filename !== void 0) {
|
|
2920
|
-
startData.filename = att.filename;
|
|
2921
|
-
}
|
|
2922
|
-
options.onEvent?.({ type: "vision_fallback.start", data: startData });
|
|
2923
|
-
const description = await describeImageFromDataUrl(att.data, options.visionModel, {
|
|
2924
|
-
context: att.filename ? `File: ${att.filename}` : void 0,
|
|
2925
|
-
signal: options.signal
|
|
2926
|
-
});
|
|
2927
|
-
descriptionCache.set(cacheKey, description);
|
|
2928
|
-
descriptions.set(att.id, description);
|
|
2929
|
-
options.onEvent?.({ type: "vision_fallback.done", data: { messageId, attachmentId: att.id, description } });
|
|
2930
|
-
return description;
|
|
2931
|
-
}
|
|
2932
|
-
const placeholder = `[Image: ${att.filename || "image"}]`;
|
|
2933
|
-
descriptions.set(att.id, placeholder);
|
|
2934
|
-
return placeholder;
|
|
2935
|
-
}
|
|
2936
|
-
async function describeToolResultImage(dataUrl, filename, toolCallId, messageId, options, descriptions) {
|
|
2910
|
+
async function describeImageDataUrl(dataUrl, attachmentId, messageId, options, descriptions, filename) {
|
|
2937
2911
|
const cacheKey = contentHash(dataUrl);
|
|
2938
2912
|
if (descriptionCache.has(cacheKey)) {
|
|
2939
2913
|
const cached = descriptionCache.get(cacheKey);
|
|
2940
|
-
descriptions.set(
|
|
2914
|
+
descriptions.set(attachmentId, cached);
|
|
2941
2915
|
return cached;
|
|
2942
2916
|
}
|
|
2943
2917
|
if (options.visionModel) {
|
|
2944
2918
|
const startData = {
|
|
2945
2919
|
messageId,
|
|
2946
|
-
attachmentId
|
|
2920
|
+
attachmentId
|
|
2947
2921
|
};
|
|
2948
2922
|
if (filename !== void 0) {
|
|
2949
2923
|
startData.filename = filename;
|
|
@@ -2953,18 +2927,61 @@ async function describeToolResultImage(dataUrl, filename, toolCallId, messageId,
|
|
|
2953
2927
|
context: filename ? `File: ${filename}` : void 0,
|
|
2954
2928
|
signal: options.signal
|
|
2955
2929
|
});
|
|
2956
|
-
descriptionCache
|
|
2957
|
-
descriptions.set(
|
|
2958
|
-
options.onEvent?.({
|
|
2959
|
-
type: "vision_fallback.done",
|
|
2960
|
-
data: { messageId, attachmentId: toolCallId, description }
|
|
2961
|
-
});
|
|
2930
|
+
cacheSet(descriptionCache, cacheKey, description);
|
|
2931
|
+
descriptions.set(attachmentId, description);
|
|
2932
|
+
options.onEvent?.({ type: "vision_fallback.done", data: { messageId, attachmentId, description } });
|
|
2962
2933
|
return description;
|
|
2963
2934
|
}
|
|
2964
|
-
const placeholder = `[Image: ${filename
|
|
2965
|
-
descriptions.set(
|
|
2935
|
+
const placeholder = filename ? `[Image: ${filename}]` : "[Image]";
|
|
2936
|
+
descriptions.set(attachmentId, placeholder);
|
|
2966
2937
|
return placeholder;
|
|
2967
2938
|
}
|
|
2939
|
+
async function describeAttachment(att, messageId, options, descriptions) {
|
|
2940
|
+
return describeImageDataUrl(att.data, att.id, messageId, options, descriptions, att.filename);
|
|
2941
|
+
}
|
|
2942
|
+
async function describePdfAttachment(att, messageId, options, descriptions) {
|
|
2943
|
+
const hasVision = !!options.visionModel;
|
|
2944
|
+
const cacheKey = `pdf:${hasVision}:${contentHash(att.data)}`;
|
|
2945
|
+
const filenameLabel = att.filename || "document.pdf";
|
|
2946
|
+
if (descriptionCache.has(cacheKey)) {
|
|
2947
|
+
const cached = descriptionCache.get(cacheKey);
|
|
2948
|
+
const output2 = `[PDF: ${filenameLabel}]${cached}`;
|
|
2949
|
+
descriptions.set(att.id, output2);
|
|
2950
|
+
return output2;
|
|
2951
|
+
}
|
|
2952
|
+
const buffer = decodeDataUrl(att.data);
|
|
2953
|
+
if (!buffer) {
|
|
2954
|
+
const fallback = `[PDF: ${filenameLabel}] (could not decode)`;
|
|
2955
|
+
cacheSet(descriptionCache, cacheKey, fallback);
|
|
2956
|
+
descriptions.set(att.id, fallback);
|
|
2957
|
+
return fallback;
|
|
2958
|
+
}
|
|
2959
|
+
let blocks;
|
|
2960
|
+
try {
|
|
2961
|
+
const result = await extractPdfContent(buffer);
|
|
2962
|
+
blocks = result.blocks;
|
|
2963
|
+
} catch {
|
|
2964
|
+
const errorText = `[PDF: ${filenameLabel}] (could not extract content)`;
|
|
2965
|
+
descriptions.set(att.id, errorText);
|
|
2966
|
+
return errorText;
|
|
2967
|
+
}
|
|
2968
|
+
let body = "";
|
|
2969
|
+
let imageIndex = 0;
|
|
2970
|
+
for (const block of blocks) {
|
|
2971
|
+
if (block.type === "text" && block.content) {
|
|
2972
|
+
body += "\n\n" + block.content;
|
|
2973
|
+
} else if (block.type === "image" && block.dataUrl) {
|
|
2974
|
+
const imgAttachmentId = `${att.id}/image-${imageIndex}`;
|
|
2975
|
+
const description = await describeImageDataUrl(block.dataUrl, imgAttachmentId, messageId, options, descriptions);
|
|
2976
|
+
body += "\n\n" + description;
|
|
2977
|
+
imageIndex++;
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
const output = `[PDF: ${filenameLabel}]${body}`;
|
|
2981
|
+
cacheSet(descriptionCache, cacheKey, body);
|
|
2982
|
+
descriptions.set(att.id, output);
|
|
2983
|
+
return output;
|
|
2984
|
+
}
|
|
2968
2985
|
async function processContextImages(events, options) {
|
|
2969
2986
|
if (options.modelSupportsVision) {
|
|
2970
2987
|
return { events, descriptions: /* @__PURE__ */ new Map() };
|
|
@@ -2975,9 +2992,8 @@ async function processContextImages(events, options) {
|
|
|
2975
2992
|
if (event.type === "message.start") {
|
|
2976
2993
|
const data = event.data;
|
|
2977
2994
|
if (!data.attachments || data.attachments.length === 0) continue;
|
|
2978
|
-
const imageAtts = data.attachments.filter(isImageAttachment);
|
|
2979
|
-
if (imageAtts.length === 0) continue;
|
|
2980
2995
|
let enriched = false;
|
|
2996
|
+
const imageAtts = data.attachments.filter(isImageAttachment);
|
|
2981
2997
|
for (const att of imageAtts) {
|
|
2982
2998
|
if (att.description) {
|
|
2983
2999
|
descriptions.set(att.id, att.description);
|
|
@@ -2987,6 +3003,16 @@ async function processContextImages(events, options) {
|
|
|
2987
3003
|
att.description = description;
|
|
2988
3004
|
enriched = true;
|
|
2989
3005
|
}
|
|
3006
|
+
const pdfAtts = data.attachments.filter(isPdfAttachment);
|
|
3007
|
+
for (const att of pdfAtts) {
|
|
3008
|
+
if (att.pdfContent) {
|
|
3009
|
+
descriptions.set(att.id, att.pdfContent);
|
|
3010
|
+
continue;
|
|
3011
|
+
}
|
|
3012
|
+
const pdfContent = await describePdfAttachment(att, data.messageId, options, descriptions);
|
|
3013
|
+
att.pdfContent = pdfContent;
|
|
3014
|
+
enriched = true;
|
|
3015
|
+
}
|
|
2990
3016
|
if (enriched && options.persistEvent) {
|
|
2991
3017
|
options.persistEvent(event.sessionId, event.seq, data);
|
|
2992
3018
|
}
|
|
@@ -3001,13 +3027,13 @@ async function processContextImages(events, options) {
|
|
|
3001
3027
|
}
|
|
3002
3028
|
const dataUrl = meta["dataUrl"];
|
|
3003
3029
|
const path = meta["path"];
|
|
3004
|
-
const description = await
|
|
3030
|
+
const description = await describeImageDataUrl(
|
|
3005
3031
|
dataUrl,
|
|
3006
|
-
path,
|
|
3007
3032
|
data.toolCallId,
|
|
3008
3033
|
data.messageId,
|
|
3009
3034
|
options,
|
|
3010
|
-
descriptions
|
|
3035
|
+
descriptions,
|
|
3036
|
+
path
|
|
3011
3037
|
);
|
|
3012
3038
|
meta["description"] = description;
|
|
3013
3039
|
if (options.persistEvent) {
|
|
@@ -3019,16 +3045,24 @@ async function processContextImages(events, options) {
|
|
|
3019
3045
|
let enriched = false;
|
|
3020
3046
|
for (const message of snapshot.messages) {
|
|
3021
3047
|
if (message.role === "user" && message.attachments && message.attachments.length > 0) {
|
|
3022
|
-
const
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3048
|
+
for (const att of message.attachments) {
|
|
3049
|
+
if (isImageAttachment(att)) {
|
|
3050
|
+
if (att.description) {
|
|
3051
|
+
descriptions.set(att.id, att.description);
|
|
3052
|
+
continue;
|
|
3053
|
+
}
|
|
3054
|
+
const description = await describeAttachment(att, message.id, options, descriptions);
|
|
3055
|
+
att.description = description;
|
|
3056
|
+
enriched = true;
|
|
3057
|
+
} else if (isPdfAttachment(att)) {
|
|
3058
|
+
if (att.pdfContent) {
|
|
3059
|
+
descriptions.set(att.id, att.pdfContent);
|
|
3060
|
+
continue;
|
|
3061
|
+
}
|
|
3062
|
+
const pdfContent = await describePdfAttachment(att, message.id, options, descriptions);
|
|
3063
|
+
att.pdfContent = pdfContent;
|
|
3064
|
+
enriched = true;
|
|
3028
3065
|
}
|
|
3029
|
-
const description = await describeAttachment(att, message.id, options, descriptions);
|
|
3030
|
-
att.description = description;
|
|
3031
|
-
enriched = true;
|
|
3032
3066
|
}
|
|
3033
3067
|
}
|
|
3034
3068
|
if (message.role === "assistant" && message.toolCalls) {
|
|
@@ -3041,13 +3075,13 @@ async function processContextImages(events, options) {
|
|
|
3041
3075
|
}
|
|
3042
3076
|
const dataUrl = meta["dataUrl"];
|
|
3043
3077
|
const path = meta["path"];
|
|
3044
|
-
const description = await
|
|
3078
|
+
const description = await describeImageDataUrl(
|
|
3045
3079
|
dataUrl,
|
|
3046
|
-
path,
|
|
3047
3080
|
toolCall.id,
|
|
3048
3081
|
message.id,
|
|
3049
3082
|
options,
|
|
3050
|
-
descriptions
|
|
3083
|
+
descriptions,
|
|
3084
|
+
path
|
|
3051
3085
|
);
|
|
3052
3086
|
meta["description"] = description;
|
|
3053
3087
|
enriched = true;
|
|
@@ -3418,7 +3452,7 @@ var callSubAgentTool = {
|
|
|
3418
3452
|
};
|
|
3419
3453
|
}
|
|
3420
3454
|
try {
|
|
3421
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3455
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-T7S45DOQ.js");
|
|
3422
3456
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3423
3457
|
const turnMetrics = new TurnMetrics();
|
|
3424
3458
|
const result = await executeSubAgent({
|
|
@@ -4388,6 +4422,10 @@ var mcpConfigTool = createTool(
|
|
|
4388
4422
|
enabled: {
|
|
4389
4423
|
type: "boolean",
|
|
4390
4424
|
description: "Whether the tool should be enabled (required for: toggle-tool)"
|
|
4425
|
+
},
|
|
4426
|
+
timeout: {
|
|
4427
|
+
type: "number",
|
|
4428
|
+
description: "Timeout in seconds for MCP tool calls (optional)"
|
|
4391
4429
|
}
|
|
4392
4430
|
},
|
|
4393
4431
|
required: ["action"]
|
|
@@ -4417,7 +4455,7 @@ var mcpConfigTool = createTool(
|
|
|
4417
4455
|
mcpNotifyChanged?.(sessionId);
|
|
4418
4456
|
}
|
|
4419
4457
|
async function rebuildTools() {
|
|
4420
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4458
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-T7S45DOQ.js");
|
|
4421
4459
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4422
4460
|
setMcpTools2(mcpTools);
|
|
4423
4461
|
}
|
|
@@ -4454,13 +4492,17 @@ var mcpConfigTool = createTool(
|
|
|
4454
4492
|
} else if (!args.command) {
|
|
4455
4493
|
return helpers.error("command is required for stdio transport");
|
|
4456
4494
|
}
|
|
4495
|
+
if (args.timeout !== void 0 && (typeof args.timeout !== "number" || args.timeout <= 0)) {
|
|
4496
|
+
return helpers.error("timeout must be a positive number");
|
|
4497
|
+
}
|
|
4457
4498
|
const serverCfg = {
|
|
4458
4499
|
transport: args.transport ?? "stdio",
|
|
4459
4500
|
...args.command ? { command: args.command } : {},
|
|
4460
4501
|
...args.args && args.args.length > 0 ? { args: args.args } : {},
|
|
4461
4502
|
...args.env && Object.keys(args.env).length > 0 ? { env: args.env } : {},
|
|
4462
4503
|
...args.url ? { url: args.url } : {},
|
|
4463
|
-
...args.headers && Object.keys(args.headers).length > 0 ? { headers: args.headers } : {}
|
|
4504
|
+
...args.headers && Object.keys(args.headers).length > 0 ? { headers: args.headers } : {},
|
|
4505
|
+
...args.timeout !== void 0 ? { timeout: args.timeout } : {}
|
|
4464
4506
|
};
|
|
4465
4507
|
await persistAndRebuild((mcpServers) => {
|
|
4466
4508
|
mcpServers[args.name] = serverCfg;
|
|
@@ -4485,7 +4527,8 @@ var mcpConfigTool = createTool(
|
|
|
4485
4527
|
...args.args !== void 0 ? { args: args.args } : {},
|
|
4486
4528
|
...args.env !== void 0 ? { env: args.env } : {},
|
|
4487
4529
|
...args.url !== void 0 ? { url: args.url } : {},
|
|
4488
|
-
...args.headers !== void 0 ? { headers: args.headers } : {}
|
|
4530
|
+
...args.headers !== void 0 ? { headers: args.headers } : {},
|
|
4531
|
+
...args.timeout !== void 0 ? { timeout: args.timeout } : {}
|
|
4489
4532
|
};
|
|
4490
4533
|
const { error: updateError } = await applyMcpServerUpdate({
|
|
4491
4534
|
name: args.name,
|
|
@@ -5065,4 +5108,4 @@ export {
|
|
|
5065
5108
|
getToolRegistryForAgent,
|
|
5066
5109
|
createToolRegistry
|
|
5067
5110
|
};
|
|
5068
|
-
//# sourceMappingURL=chunk-
|
|
5111
|
+
//# sourceMappingURL=chunk-YDV7RIQ6.js.map
|
|
@@ -104,7 +104,8 @@ var mcpServerSchema = z.object({
|
|
|
104
104
|
url: z.string().optional(),
|
|
105
105
|
headers: z.record(z.string(), z.string()).optional(),
|
|
106
106
|
disabledTools: z.array(z.string()).optional(),
|
|
107
|
-
cachedTools: z.array(cachedToolSchema).optional()
|
|
107
|
+
cachedTools: z.array(cachedToolSchema).optional(),
|
|
108
|
+
timeout: z.number().positive().optional()
|
|
108
109
|
});
|
|
109
110
|
var llmConfigSchema = z.object({
|
|
110
111
|
timeout: z.number().optional(),
|
|
@@ -313,4 +314,4 @@ export {
|
|
|
313
314
|
removeProvider,
|
|
314
315
|
activateProvider
|
|
315
316
|
};
|
|
316
|
-
//# sourceMappingURL=chunk-
|
|
317
|
+
//# sourceMappingURL=chunk-YFVSSMA3.js.map
|
|
@@ -37,7 +37,7 @@ Options:
|
|
|
37
37
|
}
|
|
38
38
|
async function runNetworkSetup(mode) {
|
|
39
39
|
const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-YY5PJYSC.js");
|
|
40
|
-
const { saveGlobalConfig } = await import("./config-
|
|
40
|
+
const { saveGlobalConfig } = await import("./config-MD74ETY5.js");
|
|
41
41
|
const { getAuthKeyPath } = await import("./paths-F27V3S4I.js");
|
|
42
42
|
const existingAuth = await loadAuthConfig(mode);
|
|
43
43
|
if (existingAuth) {
|
|
@@ -104,7 +104,7 @@ async function runNetworkSetup(mode) {
|
|
|
104
104
|
console.log("\u2713 Configuration saved!\n");
|
|
105
105
|
}
|
|
106
106
|
async function runConfig(mode) {
|
|
107
|
-
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-
|
|
107
|
+
const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-MD74ETY5.js");
|
|
108
108
|
const { getGlobalConfigPath } = await import("./paths-F27V3S4I.js");
|
|
109
109
|
const config = await loadGlobalConfig(mode);
|
|
110
110
|
const configPath = getGlobalConfigPath(mode);
|
|
@@ -163,7 +163,7 @@ async function runCli(options) {
|
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
case "provider": {
|
|
166
|
-
const { runProviderCommand } = await import("./provider-
|
|
166
|
+
const { runProviderCommand } = await import("./provider-PI3RDDE4.js");
|
|
167
167
|
const [, subcommand] = positionals;
|
|
168
168
|
await runProviderCommand(mode, subcommand);
|
|
169
169
|
break;
|
|
@@ -200,7 +200,7 @@ async function runCli(options) {
|
|
|
200
200
|
break;
|
|
201
201
|
}
|
|
202
202
|
case "update": {
|
|
203
|
-
const { runUpdate } = await import("./update-
|
|
203
|
+
const { runUpdate } = await import("./update-56VZOLQJ.js");
|
|
204
204
|
const code = await runUpdate();
|
|
205
205
|
if (code !== 0) {
|
|
206
206
|
process.exit(code);
|
|
@@ -208,12 +208,12 @@ async function runCli(options) {
|
|
|
208
208
|
break;
|
|
209
209
|
}
|
|
210
210
|
default: {
|
|
211
|
-
const { configFileExists } = await import("./config-
|
|
211
|
+
const { configFileExists } = await import("./config-MD74ETY5.js");
|
|
212
212
|
const configExists = await configFileExists(mode);
|
|
213
213
|
if (!configExists) {
|
|
214
214
|
await runNetworkSetup(mode);
|
|
215
215
|
}
|
|
216
|
-
const { runServe } = await import("./serve-
|
|
216
|
+
const { runServe } = await import("./serve-BD44GN7N.js");
|
|
217
217
|
const serveOptions = { mode };
|
|
218
218
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
219
219
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -225,4 +225,4 @@ async function runCli(options) {
|
|
|
225
225
|
export {
|
|
226
226
|
runCli
|
|
227
227
|
};
|
|
228
|
-
//# sourceMappingURL=chunk-
|
|
228
|
+
//# sourceMappingURL=chunk-YPHLCRFP.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WL2WEJAK.js";
|
|
4
4
|
import "./chunk-V4IE7HJY.js";
|
|
5
5
|
import "./chunk-YHEQTVFV.js";
|
|
6
6
|
import "./chunk-HNCM3D7Y.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-RMXPVQP4.js";
|
|
8
8
|
import "./chunk-ZO5EXQMG.js";
|
|
9
9
|
import "./chunk-K44MW7JJ.js";
|
|
10
10
|
import "./chunk-5WRI5ZAA.js";
|
|
11
11
|
export {
|
|
12
12
|
createLLMClient
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=client-
|
|
14
|
+
//# sourceMappingURL=client-V5DZRO2D.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
mapFinishReason,
|
|
9
9
|
parseToolArguments,
|
|
10
10
|
resolveAttachmentsInMessages
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-RMXPVQP4.js";
|
|
12
12
|
import "./chunk-5WRI5ZAA.js";
|
|
13
13
|
export {
|
|
14
14
|
buildModelParams,
|
|
@@ -21,4 +21,4 @@ export {
|
|
|
21
21
|
parseToolArguments,
|
|
22
22
|
resolveAttachmentsInMessages
|
|
23
23
|
};
|
|
24
|
-
//# sourceMappingURL=client-pure-
|
|
24
|
+
//# sourceMappingURL=client-pure-5YE5WFJP.js.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
appendCompactionPrompt,
|
|
3
3
|
getCompactionTarget,
|
|
4
4
|
shouldCompact
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-CPTC2MD5.js";
|
|
6
|
+
import "./chunk-XNCHOD2X.js";
|
|
7
7
|
import "./chunk-4QHDQP2N.js";
|
|
8
8
|
import "./chunk-YMFCFMMB.js";
|
|
9
9
|
import "./chunk-NGJ5XJ7D.js";
|
|
@@ -12,7 +12,7 @@ import "./chunk-DJASQ2ZB.js";
|
|
|
12
12
|
import "./chunk-J2GP3J3X.js";
|
|
13
13
|
import "./chunk-V4IE7HJY.js";
|
|
14
14
|
import "./chunk-YHEQTVFV.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-RMXPVQP4.js";
|
|
16
16
|
import "./chunk-K44MW7JJ.js";
|
|
17
17
|
import "./chunk-5WRI5ZAA.js";
|
|
18
18
|
export {
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
getCompactionTarget,
|
|
21
21
|
shouldCompact
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=compactor-
|
|
23
|
+
//# sourceMappingURL=compactor-BJXFE5PL.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
saveGlobalConfig,
|
|
12
12
|
setDefaultModelSelection,
|
|
13
13
|
updateProvider
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YFVSSMA3.js";
|
|
15
15
|
import "./chunk-CQGTEGKL.js";
|
|
16
16
|
import "./chunk-5WRI5ZAA.js";
|
|
17
17
|
export {
|
|
@@ -28,4 +28,4 @@ export {
|
|
|
28
28
|
setDefaultModelSelection,
|
|
29
29
|
updateProvider
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=config-
|
|
31
|
+
//# sourceMappingURL=config-MD74ETY5.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runAgentTurn,
|
|
3
3
|
runChatTurn
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-VMYDUZWI.js";
|
|
5
|
+
import "./chunk-YDV7RIQ6.js";
|
|
6
6
|
import "./chunk-NWO6GRYE.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-VPFUXGMM.js";
|
|
8
8
|
import "./chunk-MF3UW36X.js";
|
|
9
9
|
import "./chunk-WGMJCFCE.js";
|
|
10
10
|
import "./chunk-EU3WWTFH.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
createMessageStartEvent,
|
|
16
16
|
createToolCallEvent,
|
|
17
17
|
createToolResultEvent
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-XNCHOD2X.js";
|
|
19
19
|
import "./chunk-DH3SSBZN.js";
|
|
20
20
|
import "./chunk-LXFLRM7M.js";
|
|
21
21
|
import "./chunk-OBQPXUXI.js";
|
|
@@ -30,10 +30,10 @@ import "./chunk-O3NUNU4H.js";
|
|
|
30
30
|
import "./chunk-J2GP3J3X.js";
|
|
31
31
|
import "./chunk-V4IE7HJY.js";
|
|
32
32
|
import "./chunk-YHEQTVFV.js";
|
|
33
|
-
import "./chunk-
|
|
33
|
+
import "./chunk-RMXPVQP4.js";
|
|
34
34
|
import "./chunk-K44MW7JJ.js";
|
|
35
35
|
import "./chunk-5GOOSZX7.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-YFVSSMA3.js";
|
|
37
37
|
import "./chunk-CQGTEGKL.js";
|
|
38
38
|
import "./chunk-5WRI5ZAA.js";
|
|
39
39
|
export {
|
|
@@ -46,4 +46,4 @@ export {
|
|
|
46
46
|
runAgentTurn,
|
|
47
47
|
runChatTurn
|
|
48
48
|
};
|
|
49
|
-
//# sourceMappingURL=orchestrator-
|
|
49
|
+
//# sourceMappingURL=orchestrator-67BZJEOO.js.map
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openfox",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.77",
|
|
4
4
|
"description": "Local-LLM-first agentic coding assistant",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -86,6 +86,7 @@
|
|
|
86
86
|
"node-pty": "^1.2.0-beta.12",
|
|
87
87
|
"open": "^11.0.0",
|
|
88
88
|
"pdfjs-dist": "^6.1.200",
|
|
89
|
+
"pngjs": "^7.0.0",
|
|
89
90
|
"pyright": "^1.1.408",
|
|
90
91
|
"react-markdown": "^10.1.0",
|
|
91
92
|
"react-syntax-highlighter": "^16.1.1",
|
|
@@ -118,6 +119,7 @@
|
|
|
118
119
|
"@types/http-proxy": "^1.17.17",
|
|
119
120
|
"@types/multer": "^2.2.0",
|
|
120
121
|
"@types/node": "^22.19.15",
|
|
122
|
+
"@types/pngjs": "^6.0.5",
|
|
121
123
|
"@types/react": "^19.0.8",
|
|
122
124
|
"@types/react-dom": "^19.0.3",
|
|
123
125
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
@@ -2,14 +2,14 @@ import {
|
|
|
2
2
|
buildRunChatTurnParams,
|
|
3
3
|
finalizeTurnCompletion,
|
|
4
4
|
generateSessionNameForSession
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-3TQN25OM.js";
|
|
6
|
+
import "./chunk-YDV7RIQ6.js";
|
|
7
7
|
import "./chunk-NWO6GRYE.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-VPFUXGMM.js";
|
|
9
9
|
import "./chunk-MF3UW36X.js";
|
|
10
10
|
import "./chunk-WGMJCFCE.js";
|
|
11
11
|
import "./chunk-EU3WWTFH.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-XNCHOD2X.js";
|
|
13
13
|
import "./chunk-DH3SSBZN.js";
|
|
14
14
|
import "./chunk-LXFLRM7M.js";
|
|
15
15
|
import "./chunk-OBQPXUXI.js";
|
|
@@ -29,12 +29,12 @@ import {
|
|
|
29
29
|
import "./chunk-J2GP3J3X.js";
|
|
30
30
|
import "./chunk-V4IE7HJY.js";
|
|
31
31
|
import "./chunk-YHEQTVFV.js";
|
|
32
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-RMXPVQP4.js";
|
|
33
33
|
import {
|
|
34
34
|
logger
|
|
35
35
|
} from "./chunk-K44MW7JJ.js";
|
|
36
36
|
import "./chunk-5GOOSZX7.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-YFVSSMA3.js";
|
|
38
38
|
import "./chunk-CQGTEGKL.js";
|
|
39
39
|
import "./chunk-5WRI5ZAA.js";
|
|
40
40
|
|
|
@@ -180,7 +180,7 @@ var QueueProcessor = class {
|
|
|
180
180
|
backend: provider?.backend ?? llmClient.getBackend(),
|
|
181
181
|
model: llmClient.getModel()
|
|
182
182
|
};
|
|
183
|
-
const { runChatTurn } = await import("./orchestrator-
|
|
183
|
+
const { runChatTurn } = await import("./orchestrator-67BZJEOO.js");
|
|
184
184
|
const runChatTurnParams = buildRunChatTurnParams({
|
|
185
185
|
sessionManager,
|
|
186
186
|
sessionId,
|
|
@@ -228,4 +228,4 @@ var QueueProcessor = class {
|
|
|
228
228
|
export {
|
|
229
229
|
QueueProcessor
|
|
230
230
|
};
|
|
231
|
-
//# sourceMappingURL=processor-
|
|
231
|
+
//# sourceMappingURL=processor-BCOSEMZK.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as Attachment, K as ToolMode, O as ToolResult, M as Message, T as Todo, b as ContextState, d as Criterion, h as Diagnostic, q as MetadataEntry, y as SessionMode, z as SessionPhase, t as Project, B as SessionSummary, w as Session } from './types-
|
|
1
|
+
import { A as Attachment, K as ToolMode, O as ToolResult, M as Message, T as Todo, b as ContextState, d as Criterion, h as Diagnostic, q as MetadataEntry, y as SessionMode, z as SessionPhase, t as Project, B as SessionSummary, w as Session } from './types-DABVUbUu.js';
|
|
2
2
|
|
|
3
3
|
type ClientMessageType = 'session.load' | 'context.compact' | 'context.checkDynamic' | 'context.applyDynamic' | 'runner.launch' | 'path.confirm' | 'ask.answer';
|
|
4
4
|
interface ClientMessage<T = unknown> {
|
package/dist/provider/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as ModelConfig } from '../types-
|
|
2
|
-
export { J as ToolCall } from '../types-
|
|
3
|
-
import { L as LLMCompletionRequest, a as LLMCompletionResponse, b as LLMStreamEvent } from '../types-
|
|
4
|
-
export { c as LLMMessage, d as LLMToolDefinition } from '../types-
|
|
1
|
+
import { r as ModelConfig } from '../types-DABVUbUu.js';
|
|
2
|
+
export { J as ToolCall } from '../types-DABVUbUu.js';
|
|
3
|
+
import { L as LLMCompletionRequest, a as LLMCompletionResponse, b as LLMStreamEvent } from '../types-pssMT-oY.js';
|
|
4
|
+
export { c as LLMMessage, d as LLMToolDefinition } from '../types-pssMT-oY.js';
|
|
5
5
|
|
|
6
6
|
type ProviderAuthState = 'disconnected' | 'pending' | 'connected' | 'expired' | 'error';
|
|
7
7
|
interface ProviderAuthStatus {
|