openfox 2.0.129 → 2.0.130
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/CHANGELOG.md +32 -0
- package/README.md +2 -0
- package/dist/CHANGELOG.md +32 -0
- package/dist/auth-D3WLIBTG.js +19 -0
- package/dist/{auto-config-454YE6KC.js → auto-config-5VSNLVNI.js} +6 -5
- package/dist/{backend-4YPEC3J2.js → backend-NDBY3DAQ.js} +4 -2
- package/dist/{chat-handler-TH6JBO6G.js → chat-handler-4WCKNCQV.js} +32 -32
- package/dist/chunk-25DAVVTP.js +395 -0
- package/dist/{chunk-ISE55FOR.js → chunk-2AI7VYPN.js} +11 -1
- package/dist/{chunk-2COZT3YI.js → chunk-2OMXXCJJ.js} +24 -24
- package/dist/{chunk-OHTBWA7L.js → chunk-35GQEIH2.js} +13 -13
- package/dist/{chunk-N2Q3KYWM.js → chunk-3DZSHRXE.js} +7 -2
- package/dist/chunk-3OBZ55SX.js +7 -0
- package/dist/{chunk-ZIL6VKLU.js → chunk-64N4CZFT.js} +2 -2
- package/dist/{chunk-66MG44TF.js → chunk-6QZVAOSA.js} +2 -2
- package/dist/{chunk-6LX43YRA.js → chunk-7ET46SNE.js} +4 -4
- package/dist/{chunk-YJD5A375.js → chunk-AYCB32NI.js} +5 -5
- package/dist/{chunk-GIJUWPRQ.js → chunk-CGCEAKG5.js} +2 -2
- package/dist/{auth-GTGIGX5X.js → chunk-CQGJ5RWB.js} +4 -4
- package/dist/{chunk-JQMQ4DGC.js → chunk-CYQUM42E.js} +76 -32
- package/dist/{chunk-P6GTPKE5.js → chunk-DHDIKVRT.js} +278 -16
- package/dist/{chunk-ZXWJ6JTL.js → chunk-DI5GTIAU.js} +1154 -196
- package/dist/chunk-DQTN4B33.js +235 -0
- package/dist/{chunk-RV5G7QQU.js → chunk-DQTXXHD2.js} +3 -3
- package/dist/{chunk-MYNNMV75.js → chunk-DYIDDGMN.js} +54 -36
- package/dist/{chunk-DABWCAXS.js → chunk-EUOWCVU6.js} +19 -6
- package/dist/{chunk-7RIEI2TE.js → chunk-EVVWDRM5.js} +45 -16
- package/dist/{chunk-ATWOXI52.js → chunk-HCYSGLY2.js} +1 -1
- package/dist/{chunk-KBESUA3W.js → chunk-JHA2SPCU.js} +2 -2
- package/dist/{chunk-ZIYETXOW.js → chunk-JKRMMNUR.js} +4 -4
- package/dist/{chunk-H6YIVK67.js → chunk-JSONBGSY.js} +24 -4
- package/dist/{chunk-HO7A7TMF.js → chunk-KHKRHGA6.js} +15 -5
- package/dist/{chunk-K2QKX4ZJ.js → chunk-OA2FURC3.js} +8 -2
- package/dist/{chunk-ZFNBATE3.js → chunk-OXMOKQPW.js} +3 -2
- package/dist/{chunk-567L5OJ6.js → chunk-P57IBMK4.js} +2 -2
- package/dist/{session-status-6Q5B5PEN.js → chunk-T3S5MTMD.js} +2 -3
- package/dist/{chunk-7ZMOP5LS.js → chunk-TS5WKTFB.js} +18 -1
- package/dist/{chunk-PBFGJFGC.js → chunk-UV6IH6HK.js} +32 -10
- package/dist/{chunk-26WS7AH6.js → chunk-VJNA5AOB.js} +39 -7
- package/dist/{chunk-IJFKJ5D6.js → chunk-VUIXQ6X4.js} +4 -4
- package/dist/{chunk-L24A6GZ7.js → chunk-X24XN2M2.js} +84 -56
- package/dist/{chunk-AQBRI7TM.js → chunk-X3FHIDLT.js} +2 -2
- package/dist/chunk-YNMP647F.js +24 -0
- package/dist/{chunk-7YP4O4XE.js → chunk-ZRCRGPGT.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/client-26RSMUAX.js +16 -0
- package/dist/{client-pure-GU2SV3DD.js → client-pure-FLKP6PTI.js} +2 -2
- package/dist/{compactor-WKFNTUXL.js → compactor-HYBSSFKP.js} +14 -14
- package/dist/dynamic-context-2VLACYK4.js +50 -0
- package/dist/{events-GMHRX4LF.js → events-D33QXGSX.js} +7 -7
- package/dist/{folding-7K2GRPF4.js → folding-QOKBKUU6.js} +5 -5
- package/dist/{http-client-ROVNSHF6.js → http-client-MGAJTGPR.js} +3 -3
- package/dist/launch-KFENN5GS.js +53 -0
- package/dist/{manager-NOKJQTTF.js → manager-VRHX7BVI.js} +4 -4
- package/dist/mcp-YU7AM3UV.js +120 -0
- package/dist/{model-catalog-ZLOWTQA7.js → model-catalog-2PCKTYGW.js} +2 -2
- package/dist/{oauth-provider-DGBC2YM6.js → oauth-provider-VHUS2KEG.js} +8 -2
- package/dist/{orchestrator-E6GIZGEN.js → orchestrator-PLTAEOMR.js} +30 -30
- package/dist/package.json +1 -1
- package/dist/{path-security-UDZ7UVWK.js → path-security-4WQJGU3Z.js} +11 -11
- package/dist/{platform-EMKWQTZX.js → platform-MWWJ6OKV.js} +3 -3
- package/dist/plugins-registry.json +12 -0
- package/dist/{processor-7RDR675X.js → processor-K4WHZKE6.js} +31 -31
- package/dist/{profiles-HXGJIPF2.js → profiles-EBCVFYG7.js} +2 -2
- package/dist/{protocol-DMneA8mx.d.ts → protocol-BMUoqwYH.d.ts} +2 -1
- package/dist/{protocol-TS3GVTT3.js → protocol-Y7MRKRUO.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-DXEICEIE.js → provider-CVM33XHW.js} +10 -10
- package/dist/{provider-manager-PU7RS2TK.js → provider-manager-7NL5EQLG.js} +10 -10
- package/dist/{registry-Z4GVYFTV.js → registry-KFFZFIZT.js} +3 -3
- package/dist/{serve-Z5ITDPCQ.js → serve-KQAPXO5X.js} +42 -40
- package/dist/server/index.d.ts +18 -3
- package/dist/server/index.js +39 -37
- package/dist/server-RPKVKMDD.js +56 -0
- package/dist/{service-INQWTYY2.js → service-7TLOSFAO.js} +12 -12
- package/dist/{session-overrides-4WAD3X5Q.js → session-overrides-U573CU2V.js} +5 -5
- package/dist/session-status-UFO5IFI7.js +10 -0
- package/dist/{sessions-D7VRCHQY.js → sessions-LUVWWRFO.js} +4 -4
- package/dist/{settings-VOWWO4VG.js → settings-LMAMF2X7.js} +2 -2
- package/dist/shared/index.d.ts +3 -3
- package/dist/shared/index.js +1 -1
- package/dist/skill-defaults/browser/SKILL.md +20 -1
- package/dist/{tasks-SE3DOPVP.js → tasks-FA6Z52H2.js} +12 -12
- package/dist/{tools-6XUSIJN2.js → tools-SSPC3UQZ.js} +34 -34
- package/dist/{types-PAKlAzp9.d.ts → types-BIkpxjaj.d.ts} +11 -2
- package/dist/{types-BWuVnaBw.d.ts → types-CoY8Ka1C.d.ts} +1 -1
- package/dist/{update-EJUI6PSV.js → update-QRGK67DB.js} +2 -2
- package/dist/web/assets/{index-CGKd7WLQ.js → index-0PVQNOfW.js} +88 -88
- package/dist/web/assets/{index-CbX8veVW.css → index-Ds94aclE.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/plugins-registry.json +12 -0
- package/dist/chunk-HIRDDCPD.js +0 -7
- package/dist/chunk-PHP7PLFX.js +0 -151
- package/dist/chunk-RSB4AR2A.js +0 -108
- package/dist/client-RZGGDGUA.js +0 -16
- package/dist/dynamic-context-ZVE733UI.js +0 -28
- package/dist/launch-5ARSU7EM.js +0 -53
- package/dist/server-MUJ7EHEI.js +0 -56
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
getGitBranch,
|
|
3
|
+
isGitRepository,
|
|
4
|
+
listWorkspaces
|
|
5
|
+
} from "./chunk-Y3BSBKHY.js";
|
|
6
|
+
import {
|
|
7
|
+
getGateConfig,
|
|
8
|
+
isTaskConflictError,
|
|
9
|
+
isTaskGateError
|
|
10
|
+
} from "./chunk-JSONBGSY.js";
|
|
11
|
+
import {
|
|
12
|
+
getSessionDisabledServers
|
|
13
|
+
} from "./chunk-ZRCRGPGT.js";
|
|
8
14
|
import {
|
|
9
15
|
TurnMetrics,
|
|
10
16
|
clearLLMFailure,
|
|
@@ -18,12 +24,7 @@ import {
|
|
|
18
24
|
recordLLMFailure,
|
|
19
25
|
sleepThroughRetryBackoff,
|
|
20
26
|
streamLLMPure
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import {
|
|
23
|
-
COMPACTION_PROMPT,
|
|
24
|
-
buildBasePrompt,
|
|
25
|
-
computeEffectiveTools
|
|
26
|
-
} from "./chunk-GIJUWPRQ.js";
|
|
27
|
+
} from "./chunk-7ET46SNE.js";
|
|
27
28
|
import {
|
|
28
29
|
startInspectProxy
|
|
29
30
|
} from "./chunk-EHFIUXWZ.js";
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
spawnShellProcess,
|
|
41
42
|
startProcessCommand,
|
|
42
43
|
stopProcess
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-DQTXXHD2.js";
|
|
44
45
|
import {
|
|
45
46
|
getMaxPerSession,
|
|
46
47
|
getSessionProcessCount,
|
|
@@ -53,18 +54,21 @@ import {
|
|
|
53
54
|
applyMcpServerUpdate
|
|
54
55
|
} from "./chunk-OAN4BXEW.js";
|
|
55
56
|
import {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
findSkillById,
|
|
58
|
+
getAllInstructions,
|
|
59
|
+
getEnabledSkillMetadata,
|
|
60
|
+
isSkillEnabled,
|
|
61
|
+
loadAllSkills
|
|
62
|
+
} from "./chunk-64N4CZFT.js";
|
|
60
63
|
import {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
COMPACTION_PROMPT,
|
|
65
|
+
buildBasePrompt,
|
|
66
|
+
computeEffectiveTools
|
|
67
|
+
} from "./chunk-CGCEAKG5.js";
|
|
65
68
|
import {
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
AskUserInterrupt,
|
|
70
|
+
askUserTool
|
|
71
|
+
} from "./chunk-JURM3RPZ.js";
|
|
68
72
|
import {
|
|
69
73
|
PathAccessDeniedError,
|
|
70
74
|
extractAbsolutePathsFromCommand,
|
|
@@ -72,12 +76,12 @@ import {
|
|
|
72
76
|
registerPathConfirmation,
|
|
73
77
|
requestPathAccess,
|
|
74
78
|
resolveRelativeTraversals
|
|
75
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-VJNA5AOB.js";
|
|
76
80
|
import {
|
|
77
81
|
getCurrentContextWindowId,
|
|
78
82
|
getCurrentWindowMessageOptions,
|
|
79
83
|
getEventStore
|
|
80
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-AYCB32NI.js";
|
|
81
85
|
import {
|
|
82
86
|
buildContextMessagesFromEventHistory,
|
|
83
87
|
foldContextState,
|
|
@@ -87,7 +91,13 @@ import {
|
|
|
87
91
|
handleToolResult,
|
|
88
92
|
reorderToolMessages,
|
|
89
93
|
stripOrphanedToolCalls
|
|
90
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-JKRMMNUR.js";
|
|
95
|
+
import {
|
|
96
|
+
findAgentById,
|
|
97
|
+
getRuntimeConfig,
|
|
98
|
+
getSubAgents,
|
|
99
|
+
loadAllAgentsDefault
|
|
100
|
+
} from "./chunk-JHA2SPCU.js";
|
|
91
101
|
import {
|
|
92
102
|
createChatDoneMessage,
|
|
93
103
|
createChatLLMRetryFailedMessage,
|
|
@@ -97,21 +107,11 @@ import {
|
|
|
97
107
|
createChatPathConfirmationMessage,
|
|
98
108
|
createChatStatsMessage,
|
|
99
109
|
createQueueStateMessage
|
|
100
|
-
} from "./chunk-
|
|
101
|
-
import {
|
|
102
|
-
AskUserInterrupt,
|
|
103
|
-
askUserTool
|
|
104
|
-
} from "./chunk-JURM3RPZ.js";
|
|
105
|
-
import {
|
|
106
|
-
findAgentById,
|
|
107
|
-
getRuntimeConfig,
|
|
108
|
-
getSubAgents,
|
|
109
|
-
loadAllAgentsDefault
|
|
110
|
-
} from "./chunk-KBESUA3W.js";
|
|
110
|
+
} from "./chunk-P57IBMK4.js";
|
|
111
111
|
import {
|
|
112
112
|
getModelProfile,
|
|
113
113
|
modelSupportsVision
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-TS5WKTFB.js";
|
|
115
115
|
import {
|
|
116
116
|
OUTPUT_LIMITS,
|
|
117
117
|
cacheSet,
|
|
@@ -122,12 +122,12 @@ import {
|
|
|
122
122
|
formatPdfErrorMessage,
|
|
123
123
|
isPdfBuffer,
|
|
124
124
|
processPdfContent
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-EUOWCVU6.js";
|
|
126
126
|
import {
|
|
127
127
|
SETTINGS_KEYS,
|
|
128
128
|
getSetting,
|
|
129
129
|
setSetting
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-3DZSHRXE.js";
|
|
131
131
|
import {
|
|
132
132
|
logger
|
|
133
133
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -151,7 +151,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
151
151
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
152
152
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
153
153
|
try {
|
|
154
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
154
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-LMAMF2X7.js");
|
|
155
155
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
156
156
|
return Promise.resolve(true);
|
|
157
157
|
}
|
|
@@ -2154,7 +2154,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2154
2154
|
currentMaxTokensOverride = void 0;
|
|
2155
2155
|
if (!compacting) {
|
|
2156
2156
|
const contextState = sessionManager.getContextState(sessionId);
|
|
2157
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2157
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-HYBSSFKP.js");
|
|
2158
2158
|
if (shouldCompact(
|
|
2159
2159
|
contextState.currentTokens,
|
|
2160
2160
|
contextState.maxTokens,
|
|
@@ -2326,6 +2326,14 @@ ${COMPACTION_PROMPT}`,
|
|
|
2326
2326
|
if (config.initialCompacting) break;
|
|
2327
2327
|
continue;
|
|
2328
2328
|
}
|
|
2329
|
+
try {
|
|
2330
|
+
await config.rebuildCachedContext?.();
|
|
2331
|
+
} catch (error) {
|
|
2332
|
+
logger.error("Failed to rebuild cached context after compaction", {
|
|
2333
|
+
sessionId,
|
|
2334
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2335
|
+
});
|
|
2336
|
+
}
|
|
2329
2337
|
const closedWindowId = getCurrentContextWindowId(sessionId) ?? "";
|
|
2330
2338
|
const newWindowId = crypto.randomUUID();
|
|
2331
2339
|
const tokenCountAtClose = result.usage.promptTokens;
|
|
@@ -3179,7 +3187,7 @@ var callSubAgentTool = {
|
|
|
3179
3187
|
};
|
|
3180
3188
|
}
|
|
3181
3189
|
try {
|
|
3182
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3190
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-SSPC3UQZ.js");
|
|
3183
3191
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3184
3192
|
const turnMetrics = new TurnMetrics();
|
|
3185
3193
|
const result = await executeSubAgent({
|
|
@@ -4102,6 +4110,7 @@ var mcpManagerForTools = null;
|
|
|
4102
4110
|
var mcpConfigMode = "production";
|
|
4103
4111
|
var mcpConfigPath;
|
|
4104
4112
|
var mcpNotifyChanged = null;
|
|
4113
|
+
var mcpBootstrapForTools = null;
|
|
4105
4114
|
function setMcpManagerForTools(manager) {
|
|
4106
4115
|
mcpManagerForTools = manager;
|
|
4107
4116
|
}
|
|
@@ -4114,20 +4123,23 @@ function setMcpConfigPath(path) {
|
|
|
4114
4123
|
function setNotifyMcpServersChanged(fn) {
|
|
4115
4124
|
mcpNotifyChanged = fn;
|
|
4116
4125
|
}
|
|
4126
|
+
function setMcpBootstrapForTools(fn) {
|
|
4127
|
+
mcpBootstrapForTools = fn;
|
|
4128
|
+
}
|
|
4117
4129
|
var mcpConfigTool = createTool(
|
|
4118
4130
|
"mcp_config",
|
|
4119
4131
|
{
|
|
4120
4132
|
type: "function",
|
|
4121
4133
|
function: {
|
|
4122
4134
|
name: "mcp_config",
|
|
4123
|
-
description: "Configure MCP servers (Model Context Protocol). Actions: list (show all servers and tools), add (add a server), update (modify an existing server \u2014 all fields are optional and merged with the current config, transport-incompatible fields are cleared on transport change), remove (delete a server), toggle-tool (enable/disable a tool). Use this when the user asks to add, remove, update, or configure MCP servers or tools.",
|
|
4135
|
+
description: "Configure MCP servers (Model Context Protocol). Actions: list (show all servers and tools), add (add a server), update (modify an existing server \u2014 all fields are optional and merged with the current config, transport-incompatible fields are cleared on transport change), remove (delete a server), toggle-tool (enable/disable a tool), bootstrap (get a ready-to-paste client config for this OpenFox server itself, so the session can connect to it as an MCP client). Use this when the user asks to add, remove, update, or configure MCP servers or tools.",
|
|
4124
4136
|
parameters: {
|
|
4125
4137
|
type: "object",
|
|
4126
4138
|
properties: {
|
|
4127
4139
|
action: {
|
|
4128
4140
|
type: "string",
|
|
4129
|
-
enum: ["list", "add", "update", "remove", "toggle-tool"],
|
|
4130
|
-
description: "Action: list (show servers), add (add new server), update (modify existing server), remove (delete a server), toggle-tool (enable/disable a tool)"
|
|
4141
|
+
enum: ["list", "add", "update", "remove", "toggle-tool", "bootstrap"],
|
|
4142
|
+
description: "Action: list (show servers), add (add new server), update (modify existing server), remove (delete a server), toggle-tool (enable/disable a tool), bootstrap (client config for this server)"
|
|
4131
4143
|
},
|
|
4132
4144
|
name: {
|
|
4133
4145
|
type: "string",
|
|
@@ -4181,11 +4193,18 @@ var mcpConfigTool = createTool(
|
|
|
4181
4193
|
async (args, context, helpers) => {
|
|
4182
4194
|
const actionError = validateActionWithPermission(
|
|
4183
4195
|
args.action,
|
|
4184
|
-
["list", "add", "update", "remove", "toggle-tool"],
|
|
4196
|
+
["list", "add", "update", "remove", "toggle-tool", "bootstrap"],
|
|
4185
4197
|
"mcp_config",
|
|
4186
4198
|
context.permittedActions
|
|
4187
4199
|
);
|
|
4188
4200
|
if (actionError) return actionError;
|
|
4201
|
+
if (args.action === "bootstrap") {
|
|
4202
|
+
if (!mcpBootstrapForTools) {
|
|
4203
|
+
return helpers.error("MCP bootstrap is not available for this server");
|
|
4204
|
+
}
|
|
4205
|
+
const config = await mcpBootstrapForTools();
|
|
4206
|
+
return helpers.success(JSON.stringify(config, null, 2));
|
|
4207
|
+
}
|
|
4189
4208
|
if (!mcpManagerForTools) {
|
|
4190
4209
|
return helpers.error("MCP manager not available");
|
|
4191
4210
|
}
|
|
@@ -4195,13 +4214,15 @@ var mcpConfigTool = createTool(
|
|
|
4195
4214
|
const updated = updater(mcpServers);
|
|
4196
4215
|
await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated }, mcpConfigPath);
|
|
4197
4216
|
}
|
|
4198
|
-
const APPLY_PROMPT_MESSAGE =
|
|
4199
|
-
function notifyContextChanged(sessionId) {
|
|
4217
|
+
const APPLY_PROMPT_MESSAGE = "Tool changes are announced automatically.";
|
|
4218
|
+
async function notifyContextChanged(sessionId) {
|
|
4200
4219
|
context.sessionManager.setDynamicContextChanged(sessionId, true);
|
|
4201
4220
|
mcpNotifyChanged?.(sessionId);
|
|
4221
|
+
const { injectContextDriftReminders } = await import("./dynamic-context-2VLACYK4.js");
|
|
4222
|
+
await injectContextDriftReminders(context.sessionManager, sessionId);
|
|
4202
4223
|
}
|
|
4203
4224
|
async function rebuildTools() {
|
|
4204
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4225
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-SSPC3UQZ.js");
|
|
4205
4226
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4206
4227
|
setMcpTools2(mcpTools);
|
|
4207
4228
|
}
|
|
@@ -4210,8 +4231,14 @@ var mcpConfigTool = createTool(
|
|
|
4210
4231
|
if (servers.length === 0) {
|
|
4211
4232
|
return helpers.success("No MCP servers configured.");
|
|
4212
4233
|
}
|
|
4234
|
+
const { getSessionDisabledServers: getSessionDisabledServers2 } = await import("./session-overrides-U573CU2V.js");
|
|
4235
|
+
const disabledForSession = new Set(context.sessionId ? getSessionDisabledServers2(context.sessionId) : []);
|
|
4236
|
+
const visibleServers = servers.filter((server) => !disabledForSession.has(server.name));
|
|
4237
|
+
if (visibleServers.length === 0) {
|
|
4238
|
+
return helpers.success("No MCP servers configured.");
|
|
4239
|
+
}
|
|
4213
4240
|
const lines = [];
|
|
4214
|
-
for (const server of
|
|
4241
|
+
for (const server of visibleServers) {
|
|
4215
4242
|
const connStr = server.status === "connected" ? "\u25CF" : server.status === "error" ? "\u2717" : "\u25CB";
|
|
4216
4243
|
const cmdStr = server.config.command ? `${server.config.command} ${(server.config.args ?? []).join(" ")}` : server.config.url ?? "";
|
|
4217
4244
|
const hasCachedTools = server.tools.length > 0;
|
|
@@ -4256,7 +4283,7 @@ var mcpConfigTool = createTool(
|
|
|
4256
4283
|
});
|
|
4257
4284
|
await mcpManagerForTools.addServer(args.name, serverCfg);
|
|
4258
4285
|
await rebuildTools();
|
|
4259
|
-
notifyContextChanged(context.sessionId);
|
|
4286
|
+
await notifyContextChanged(context.sessionId);
|
|
4260
4287
|
const server = mcpManagerForTools.getServer(args.name);
|
|
4261
4288
|
const toolCount = server?.tools.length ?? 0;
|
|
4262
4289
|
return helpers.success(`Added MCP server "${args.name}" (${toolCount} tools discovered). ${APPLY_PROMPT_MESSAGE}`);
|
|
@@ -4289,7 +4316,7 @@ var mcpConfigTool = createTool(
|
|
|
4289
4316
|
});
|
|
4290
4317
|
if (updateError) return helpers.error(updateError);
|
|
4291
4318
|
await rebuildTools();
|
|
4292
|
-
notifyContextChanged(context.sessionId);
|
|
4319
|
+
await notifyContextChanged(context.sessionId);
|
|
4293
4320
|
const server = mcpManagerForTools.getServer(args.name);
|
|
4294
4321
|
const toolCount = server?.tools.length ?? 0;
|
|
4295
4322
|
return helpers.success(
|
|
@@ -4304,7 +4331,7 @@ var mcpConfigTool = createTool(
|
|
|
4304
4331
|
});
|
|
4305
4332
|
mcpManagerForTools.removeServer(args.name);
|
|
4306
4333
|
await rebuildTools();
|
|
4307
|
-
notifyContextChanged(context.sessionId);
|
|
4334
|
+
await notifyContextChanged(context.sessionId);
|
|
4308
4335
|
return helpers.success(`Removed MCP server "${args.name}". ${APPLY_PROMPT_MESSAGE}`);
|
|
4309
4336
|
}
|
|
4310
4337
|
if (args.action === "toggle-tool") {
|
|
@@ -4329,7 +4356,7 @@ var mcpConfigTool = createTool(
|
|
|
4329
4356
|
});
|
|
4330
4357
|
await mcpManagerForTools.setToolEnabled(args.name, args.toolName, args.enabled);
|
|
4331
4358
|
await rebuildTools();
|
|
4332
|
-
notifyContextChanged(context.sessionId);
|
|
4359
|
+
await notifyContextChanged(context.sessionId);
|
|
4333
4360
|
return helpers.success(
|
|
4334
4361
|
`Tool "${args.toolName}" ${args.enabled ? "enabled" : "disabled"} on server "${args.name}". ${APPLY_PROMPT_MESSAGE}`
|
|
4335
4362
|
);
|
|
@@ -5119,6 +5146,7 @@ export {
|
|
|
5119
5146
|
setMcpConfigMode,
|
|
5120
5147
|
setMcpConfigPath,
|
|
5121
5148
|
setNotifyMcpServersChanged,
|
|
5149
|
+
setMcpBootstrapForTools,
|
|
5122
5150
|
setTasksService,
|
|
5123
5151
|
getBuiltInToolNames,
|
|
5124
5152
|
parseToolPermissions,
|
|
@@ -5130,4 +5158,4 @@ export {
|
|
|
5130
5158
|
getToolRegistryForAgent,
|
|
5131
5159
|
createToolRegistry
|
|
5132
5160
|
};
|
|
5133
|
-
//# sourceMappingURL=chunk-
|
|
5161
|
+
//# sourceMappingURL=chunk-X24XN2M2.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultAgentId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JHA2SPCU.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-OYBUJIC3.js";
|
|
@@ -466,4 +466,4 @@ export {
|
|
|
466
466
|
getLatestWorkflowExecution,
|
|
467
467
|
clearWorkflowExecution
|
|
468
468
|
};
|
|
469
|
-
//# sourceMappingURL=chunk-
|
|
469
|
+
//# sourceMappingURL=chunk-X3FHIDLT.js.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// src/server/mcp/server/bootstrap.ts
|
|
2
|
+
var WILDCARD_HOSTS = /* @__PURE__ */ new Set(["0.0.0.0", "::", "*"]);
|
|
3
|
+
function normalizeHost(host) {
|
|
4
|
+
return WILDCARD_HOSTS.has(host) ? "127.0.0.1" : host;
|
|
5
|
+
}
|
|
6
|
+
function buildOpenFoxMcpBootstrap(input) {
|
|
7
|
+
if (input.authRequired && !input.sessionToken) {
|
|
8
|
+
throw new Error("Session token could not be computed \u2014 cannot bootstrap an authenticated MCP endpoint");
|
|
9
|
+
}
|
|
10
|
+
const config = {
|
|
11
|
+
name: "openfox",
|
|
12
|
+
transport: "http",
|
|
13
|
+
url: `http://${normalizeHost(input.host)}:${input.port}/mcp`
|
|
14
|
+
};
|
|
15
|
+
if (input.authRequired && input.sessionToken) {
|
|
16
|
+
config.headers = { Authorization: `Bearer ${input.sessionToken}` };
|
|
17
|
+
}
|
|
18
|
+
return config;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
buildOpenFoxMcpBootstrap
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=chunk-YNMP647F.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X3FHIDLT.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-OYBUJIC3.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-ZRCRGPGT.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLLMClient
|
|
3
|
+
} from "./chunk-DHDIKVRT.js";
|
|
4
|
+
import "./chunk-TS5WKTFB.js";
|
|
5
|
+
import "./chunk-UV6IH6HK.js";
|
|
6
|
+
import "./chunk-HNCM3D7Y.js";
|
|
7
|
+
import "./chunk-EUOWCVU6.js";
|
|
8
|
+
import "./chunk-OXMOKQPW.js";
|
|
9
|
+
import "./chunk-3DZSHRXE.js";
|
|
10
|
+
import "./chunk-OYBUJIC3.js";
|
|
11
|
+
import "./chunk-K44MW7JJ.js";
|
|
12
|
+
import "./chunk-YLJ4XMA6.js";
|
|
13
|
+
export {
|
|
14
|
+
createLLMClient
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=client-26RSMUAX.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
mapFinishReason,
|
|
9
9
|
parseToolArguments,
|
|
10
10
|
resolveAttachmentsInMessages
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-EUOWCVU6.js";
|
|
12
12
|
import "./chunk-YLJ4XMA6.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-FLKP6PTI.js.map
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
COMPACTION_MAX_RATIO,
|
|
4
4
|
appendCompactionPrompt,
|
|
5
5
|
shouldCompact
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-VUIXQ6X4.js";
|
|
7
|
+
import "./chunk-7ET46SNE.js";
|
|
8
|
+
import "./chunk-CGCEAKG5.js";
|
|
9
|
+
import "./chunk-AYCB32NI.js";
|
|
10
|
+
import "./chunk-JKRMMNUR.js";
|
|
11
|
+
import "./chunk-X3FHIDLT.js";
|
|
12
|
+
import "./chunk-JHA2SPCU.js";
|
|
13
|
+
import "./chunk-OSXPQSLW.js";
|
|
13
14
|
import "./chunk-LCLH6ZUL.js";
|
|
15
|
+
import "./chunk-6QZVAOSA.js";
|
|
14
16
|
import "./chunk-J2GP3J3X.js";
|
|
15
|
-
import "./chunk-KBESUA3W.js";
|
|
16
|
-
import "./chunk-OSXPQSLW.js";
|
|
17
17
|
import "./chunk-3B232XG4.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TS5WKTFB.js";
|
|
19
|
+
import "./chunk-UV6IH6HK.js";
|
|
20
|
+
import "./chunk-EUOWCVU6.js";
|
|
21
|
+
import "./chunk-3DZSHRXE.js";
|
|
22
22
|
import "./chunk-OYBUJIC3.js";
|
|
23
23
|
import "./chunk-K44MW7JJ.js";
|
|
24
24
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
appendCompactionPrompt,
|
|
30
30
|
shouldCompact
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=compactor-
|
|
32
|
+
//# sourceMappingURL=compactor-HYBSSFKP.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyDynamicContext,
|
|
3
|
+
buildCachedPrompt,
|
|
4
|
+
checkToolChangesAndInject,
|
|
5
|
+
computeDynamicContextHash,
|
|
6
|
+
computePreviewToolDiff,
|
|
7
|
+
computeSessionHash,
|
|
8
|
+
computeToolDiff,
|
|
9
|
+
computeUnifiedDiff,
|
|
10
|
+
detectToolChanges,
|
|
11
|
+
getToolFingerprint,
|
|
12
|
+
getToolSignature,
|
|
13
|
+
injectContextDriftReminders,
|
|
14
|
+
injectContextDriftRemindersForSessions,
|
|
15
|
+
renderSystemPromptDiff,
|
|
16
|
+
renderToolChangeReminder
|
|
17
|
+
} from "./chunk-25DAVVTP.js";
|
|
18
|
+
import "./chunk-64N4CZFT.js";
|
|
19
|
+
import "./chunk-CGCEAKG5.js";
|
|
20
|
+
import "./chunk-AYCB32NI.js";
|
|
21
|
+
import "./chunk-JKRMMNUR.js";
|
|
22
|
+
import "./chunk-X3FHIDLT.js";
|
|
23
|
+
import "./chunk-JHA2SPCU.js";
|
|
24
|
+
import "./chunk-OSXPQSLW.js";
|
|
25
|
+
import "./chunk-LCLH6ZUL.js";
|
|
26
|
+
import "./chunk-6QZVAOSA.js";
|
|
27
|
+
import "./chunk-3B232XG4.js";
|
|
28
|
+
import "./chunk-3DZSHRXE.js";
|
|
29
|
+
import "./chunk-OYBUJIC3.js";
|
|
30
|
+
import "./chunk-K44MW7JJ.js";
|
|
31
|
+
import "./chunk-CQGTEGKL.js";
|
|
32
|
+
import "./chunk-YLJ4XMA6.js";
|
|
33
|
+
export {
|
|
34
|
+
applyDynamicContext,
|
|
35
|
+
buildCachedPrompt,
|
|
36
|
+
checkToolChangesAndInject,
|
|
37
|
+
computeDynamicContextHash,
|
|
38
|
+
computePreviewToolDiff,
|
|
39
|
+
computeSessionHash,
|
|
40
|
+
computeToolDiff,
|
|
41
|
+
computeUnifiedDiff,
|
|
42
|
+
detectToolChanges,
|
|
43
|
+
getToolFingerprint,
|
|
44
|
+
getToolSignature,
|
|
45
|
+
injectContextDriftReminders,
|
|
46
|
+
injectContextDriftRemindersForSessions,
|
|
47
|
+
renderSystemPromptDiff,
|
|
48
|
+
renderToolChangeReminder
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=dynamic-context-2VLACYK4.js.map
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
isStoredEvent,
|
|
41
41
|
isTurnEvent,
|
|
42
42
|
truncateSessionMessages
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-AYCB32NI.js";
|
|
44
44
|
import {
|
|
45
45
|
buildContextMessagesFromEventHistory,
|
|
46
46
|
buildContextMessagesFromMessages,
|
|
@@ -57,13 +57,13 @@ import {
|
|
|
57
57
|
foldTodos,
|
|
58
58
|
foldTurnEventsToSnapshotMessages,
|
|
59
59
|
getMessagesForWindow
|
|
60
|
-
} from "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-KBESUA3W.js";
|
|
60
|
+
} from "./chunk-JKRMMNUR.js";
|
|
61
|
+
import "./chunk-X3FHIDLT.js";
|
|
62
|
+
import "./chunk-JHA2SPCU.js";
|
|
64
63
|
import "./chunk-OSXPQSLW.js";
|
|
64
|
+
import "./chunk-LCLH6ZUL.js";
|
|
65
65
|
import "./chunk-3B232XG4.js";
|
|
66
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-3DZSHRXE.js";
|
|
67
67
|
import "./chunk-OYBUJIC3.js";
|
|
68
68
|
import "./chunk-K44MW7JJ.js";
|
|
69
69
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -126,4 +126,4 @@ export {
|
|
|
126
126
|
isTurnEvent,
|
|
127
127
|
truncateSessionMessages
|
|
128
128
|
};
|
|
129
|
-
//# sourceMappingURL=events-
|
|
129
|
+
//# sourceMappingURL=events-D33QXGSX.js.map
|
|
@@ -26,12 +26,12 @@ import {
|
|
|
26
26
|
spreadOptionalMessageFields,
|
|
27
27
|
stripOrphanedToolCalls,
|
|
28
28
|
trimSnapshotStreamingOutput
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-KBESUA3W.js";
|
|
29
|
+
} from "./chunk-JKRMMNUR.js";
|
|
30
|
+
import "./chunk-JHA2SPCU.js";
|
|
32
31
|
import "./chunk-OSXPQSLW.js";
|
|
32
|
+
import "./chunk-LCLH6ZUL.js";
|
|
33
33
|
import "./chunk-3B232XG4.js";
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-3DZSHRXE.js";
|
|
35
35
|
import "./chunk-OYBUJIC3.js";
|
|
36
36
|
import "./chunk-K44MW7JJ.js";
|
|
37
37
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
stripOrphanedToolCalls,
|
|
66
66
|
trimSnapshotStreamingOutput
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=folding-
|
|
68
|
+
//# sourceMappingURL=folding-QOKBKUU6.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OpenAIHttpClient
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-OXMOKQPW.js";
|
|
4
|
+
import "./chunk-3DZSHRXE.js";
|
|
5
5
|
import "./chunk-OYBUJIC3.js";
|
|
6
6
|
import "./chunk-K44MW7JJ.js";
|
|
7
7
|
import "./chunk-YLJ4XMA6.js";
|
|
8
8
|
export {
|
|
9
9
|
OpenAIHttpClient
|
|
10
10
|
};
|
|
11
|
-
//# sourceMappingURL=http-client-
|
|
11
|
+
//# sourceMappingURL=http-client-MGAJTGPR.js.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
abortRunnerRun,
|
|
3
|
+
launchWorkflowRun
|
|
4
|
+
} from "./chunk-2OMXXCJJ.js";
|
|
5
|
+
import "./chunk-EVVWDRM5.js";
|
|
6
|
+
import "./chunk-X24XN2M2.js";
|
|
7
|
+
import "./chunk-Y3BSBKHY.js";
|
|
8
|
+
import "./chunk-J7GAZGZT.js";
|
|
9
|
+
import "./chunk-JSONBGSY.js";
|
|
10
|
+
import "./chunk-ZRCRGPGT.js";
|
|
11
|
+
import "./chunk-7ET46SNE.js";
|
|
12
|
+
import "./chunk-EHFIUXWZ.js";
|
|
13
|
+
import "./chunk-DQTXXHD2.js";
|
|
14
|
+
import "./chunk-I72ACQ6R.js";
|
|
15
|
+
import "./chunk-JE7LW7Y6.js";
|
|
16
|
+
import "./chunk-OAN4BXEW.js";
|
|
17
|
+
import "./chunk-25DAVVTP.js";
|
|
18
|
+
import "./chunk-64N4CZFT.js";
|
|
19
|
+
import "./chunk-CGCEAKG5.js";
|
|
20
|
+
import "./chunk-JURM3RPZ.js";
|
|
21
|
+
import "./chunk-VJNA5AOB.js";
|
|
22
|
+
import "./chunk-AYCB32NI.js";
|
|
23
|
+
import "./chunk-JKRMMNUR.js";
|
|
24
|
+
import "./chunk-X3FHIDLT.js";
|
|
25
|
+
import "./chunk-JHA2SPCU.js";
|
|
26
|
+
import "./chunk-OSXPQSLW.js";
|
|
27
|
+
import "./chunk-P57IBMK4.js";
|
|
28
|
+
import "./chunk-LCLH6ZUL.js";
|
|
29
|
+
import "./chunk-6QZVAOSA.js";
|
|
30
|
+
import "./chunk-CYQUM42E.js";
|
|
31
|
+
import "./chunk-OA2FURC3.js";
|
|
32
|
+
import "./chunk-J2GP3J3X.js";
|
|
33
|
+
import "./chunk-3B232XG4.js";
|
|
34
|
+
import "./chunk-DHDIKVRT.js";
|
|
35
|
+
import "./chunk-TS5WKTFB.js";
|
|
36
|
+
import "./chunk-UV6IH6HK.js";
|
|
37
|
+
import "./chunk-HNCM3D7Y.js";
|
|
38
|
+
import "./chunk-EUOWCVU6.js";
|
|
39
|
+
import "./chunk-OXMOKQPW.js";
|
|
40
|
+
import "./chunk-3DZSHRXE.js";
|
|
41
|
+
import "./chunk-OYBUJIC3.js";
|
|
42
|
+
import "./chunk-2AI7VYPN.js";
|
|
43
|
+
import "./chunk-K44MW7JJ.js";
|
|
44
|
+
import "./chunk-7OHXF5GW.js";
|
|
45
|
+
import "./chunk-HCYSGLY2.js";
|
|
46
|
+
import "./chunk-R5FAEKXQ.js";
|
|
47
|
+
import "./chunk-CQGTEGKL.js";
|
|
48
|
+
import "./chunk-YLJ4XMA6.js";
|
|
49
|
+
export {
|
|
50
|
+
abortRunnerRun,
|
|
51
|
+
launchWorkflowRun
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=launch-KFENN5GS.js.map
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
onProcessEvent,
|
|
7
7
|
startProcessCommand,
|
|
8
8
|
stopProcess
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-DQTXXHD2.js";
|
|
10
10
|
import "./chunk-I72ACQ6R.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-6QZVAOSA.js";
|
|
12
|
+
import "./chunk-3DZSHRXE.js";
|
|
13
13
|
import "./chunk-OYBUJIC3.js";
|
|
14
14
|
import "./chunk-K44MW7JJ.js";
|
|
15
15
|
import "./chunk-YLJ4XMA6.js";
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
startProcessCommand,
|
|
23
23
|
stopProcess
|
|
24
24
|
};
|
|
25
|
-
//# sourceMappingURL=manager-
|
|
25
|
+
//# sourceMappingURL=manager-VRHX7BVI.js.map
|