openfox 2.0.128 → 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 +43 -0
- package/README.md +2 -0
- package/dist/CHANGELOG.md +43 -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-3O6AIOID.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-VHMZBKWY.js → chunk-2OMXXCJJ.js} +24 -24
- package/dist/{chunk-JEMPUHAA.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-VJRLIKLE.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-B2RPFZ3U.js → chunk-CYQUM42E.js} +76 -32
- package/dist/{chunk-D5QVV3LT.js → chunk-DHDIKVRT.js} +278 -16
- package/dist/{chunk-4MXY7ELN.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-OWCJRSOU.js → chunk-DYIDDGMN.js} +54 -36
- package/dist/{chunk-KAZWU73N.js → chunk-EUOWCVU6.js} +20 -7
- package/dist/{chunk-CQW4QASE.js → chunk-EVVWDRM5.js} +45 -16
- package/dist/{chunk-KSDWQ6IZ.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-FYXZRVOL.js → chunk-JSONBGSY.js} +24 -4
- package/dist/{chunk-LWDL7HWL.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-XAAEP5XM.js → chunk-P57IBMK4.js} +6 -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-KD4W3I6C.js → chunk-VJNA5AOB.js} +39 -7
- package/dist/{chunk-S6ATKIT2.js → chunk-VUIXQ6X4.js} +4 -4
- package/dist/{chunk-53R7QNZG.js → chunk-X24XN2M2.js} +97 -57
- 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-CJKM3ACP.js → client-pure-FLKP6PTI.js} +2 -2
- package/dist/{compactor-B6IVMDES.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-WLNW7TS7.js → orchestrator-PLTAEOMR.js} +30 -30
- package/dist/package.json +1 -1
- package/dist/{path-security-YTPZ35SL.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-ZMXU5MOT.js → processor-K4WHZKE6.js} +31 -31
- package/dist/{profiles-HXGJIPF2.js → profiles-EBCVFYG7.js} +2 -2
- package/dist/{protocol-DCMH9Ufp.d.ts → protocol-BMUoqwYH.d.ts} +8 -3
- package/dist/{protocol-TLODRZSB.js → protocol-Y7MRKRUO.js} +5 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-QIOTESLB.js → provider-CVM33XHW.js} +10 -10
- package/dist/{provider-manager-FVI22EWM.js → provider-manager-7NL5EQLG.js} +10 -10
- package/dist/{registry-Z4GVYFTV.js → registry-KFFZFIZT.js} +3 -3
- package/dist/{serve-7M4HCERR.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-F4TWYTKE.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-36WHYN3H.js → tasks-FA6Z52H2.js} +12 -12
- package/dist/{tools-WAUWG4PE.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-AIVWCRXR.js → update-QRGK67DB.js} +2 -2
- package/dist/web/assets/{index-DtQsFnyQ.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-BQNQJE57.js +0 -151
- package/dist/chunk-ES5635OP.js +0 -7
- package/dist/chunk-RSB4AR2A.js +0 -108
- package/dist/client-VDXO7IIV.js +0 -16
- package/dist/dynamic-context-4WVMNJTZ.js +0 -28
- package/dist/launch-AKIMGAGC.js +0 -53
- package/dist/server-RX5JM7IT.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,
|
|
@@ -95,22 +105,13 @@ import {
|
|
|
95
105
|
createChatMessageMessage,
|
|
96
106
|
createChatMessageUpdatedMessage,
|
|
97
107
|
createChatPathConfirmationMessage,
|
|
108
|
+
createChatStatsMessage,
|
|
98
109
|
createQueueStateMessage
|
|
99
|
-
} from "./chunk-
|
|
100
|
-
import {
|
|
101
|
-
AskUserInterrupt,
|
|
102
|
-
askUserTool
|
|
103
|
-
} from "./chunk-JURM3RPZ.js";
|
|
104
|
-
import {
|
|
105
|
-
findAgentById,
|
|
106
|
-
getRuntimeConfig,
|
|
107
|
-
getSubAgents,
|
|
108
|
-
loadAllAgentsDefault
|
|
109
|
-
} from "./chunk-KBESUA3W.js";
|
|
110
|
+
} from "./chunk-P57IBMK4.js";
|
|
110
111
|
import {
|
|
111
112
|
getModelProfile,
|
|
112
113
|
modelSupportsVision
|
|
113
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-TS5WKTFB.js";
|
|
114
115
|
import {
|
|
115
116
|
OUTPUT_LIMITS,
|
|
116
117
|
cacheSet,
|
|
@@ -121,12 +122,12 @@ import {
|
|
|
121
122
|
formatPdfErrorMessage,
|
|
122
123
|
isPdfBuffer,
|
|
123
124
|
processPdfContent
|
|
124
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-EUOWCVU6.js";
|
|
125
126
|
import {
|
|
126
127
|
SETTINGS_KEYS,
|
|
127
128
|
getSetting,
|
|
128
129
|
setSetting
|
|
129
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-3DZSHRXE.js";
|
|
130
131
|
import {
|
|
131
132
|
logger
|
|
132
133
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -150,7 +151,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
150
151
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
151
152
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
152
153
|
try {
|
|
153
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
154
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-LMAMF2X7.js");
|
|
154
155
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
155
156
|
return Promise.resolve(true);
|
|
156
157
|
}
|
|
@@ -1891,6 +1892,10 @@ function emitDoneAndBreak(assistantMsgId, segments, statsIdentity, mode, turnMet
|
|
|
1891
1892
|
onMessage(createChatDoneMessage(assistantMsgId, reason, stats, agentType));
|
|
1892
1893
|
}
|
|
1893
1894
|
}
|
|
1895
|
+
function emitLiveTurnStats(turnMetrics, statsIdentity, mode, onMessage) {
|
|
1896
|
+
if (!onMessage) return;
|
|
1897
|
+
onMessage(createChatStatsMessage(turnMetrics.buildStats(statsIdentity, mode)));
|
|
1898
|
+
}
|
|
1894
1899
|
var MAX_TRUNCATION_RETRIES = 3;
|
|
1895
1900
|
var MAX_CONTEXT_LENGTH_RETRIES = 3;
|
|
1896
1901
|
var OUTPUT_RESERVE_TOKENS = 2048;
|
|
@@ -2136,6 +2141,9 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2136
2141
|
previousContextTokens,
|
|
2137
2142
|
result.modelParams
|
|
2138
2143
|
);
|
|
2144
|
+
if (!config.subAgentMetadata) {
|
|
2145
|
+
emitLiveTurnStats(turnMetrics, statsIdentity, mode, config.onMessage);
|
|
2146
|
+
}
|
|
2139
2147
|
sessionManager.setCurrentContextSize(
|
|
2140
2148
|
sessionId,
|
|
2141
2149
|
result.usage.promptTokens,
|
|
@@ -2146,7 +2154,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
2146
2154
|
currentMaxTokensOverride = void 0;
|
|
2147
2155
|
if (!compacting) {
|
|
2148
2156
|
const contextState = sessionManager.getContextState(sessionId);
|
|
2149
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
2157
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-HYBSSFKP.js");
|
|
2150
2158
|
if (shouldCompact(
|
|
2151
2159
|
contextState.currentTokens,
|
|
2152
2160
|
contextState.maxTokens,
|
|
@@ -2318,6 +2326,14 @@ ${COMPACTION_PROMPT}`,
|
|
|
2318
2326
|
if (config.initialCompacting) break;
|
|
2319
2327
|
continue;
|
|
2320
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
|
+
}
|
|
2321
2337
|
const closedWindowId = getCurrentContextWindowId(sessionId) ?? "";
|
|
2322
2338
|
const newWindowId = crypto.randomUUID();
|
|
2323
2339
|
const tokenCountAtClose = result.usage.promptTokens;
|
|
@@ -3171,7 +3187,7 @@ var callSubAgentTool = {
|
|
|
3171
3187
|
};
|
|
3172
3188
|
}
|
|
3173
3189
|
try {
|
|
3174
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
3190
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-SSPC3UQZ.js");
|
|
3175
3191
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
3176
3192
|
const turnMetrics = new TurnMetrics();
|
|
3177
3193
|
const result = await executeSubAgent({
|
|
@@ -4094,6 +4110,7 @@ var mcpManagerForTools = null;
|
|
|
4094
4110
|
var mcpConfigMode = "production";
|
|
4095
4111
|
var mcpConfigPath;
|
|
4096
4112
|
var mcpNotifyChanged = null;
|
|
4113
|
+
var mcpBootstrapForTools = null;
|
|
4097
4114
|
function setMcpManagerForTools(manager) {
|
|
4098
4115
|
mcpManagerForTools = manager;
|
|
4099
4116
|
}
|
|
@@ -4106,20 +4123,23 @@ function setMcpConfigPath(path) {
|
|
|
4106
4123
|
function setNotifyMcpServersChanged(fn) {
|
|
4107
4124
|
mcpNotifyChanged = fn;
|
|
4108
4125
|
}
|
|
4126
|
+
function setMcpBootstrapForTools(fn) {
|
|
4127
|
+
mcpBootstrapForTools = fn;
|
|
4128
|
+
}
|
|
4109
4129
|
var mcpConfigTool = createTool(
|
|
4110
4130
|
"mcp_config",
|
|
4111
4131
|
{
|
|
4112
4132
|
type: "function",
|
|
4113
4133
|
function: {
|
|
4114
4134
|
name: "mcp_config",
|
|
4115
|
-
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.",
|
|
4116
4136
|
parameters: {
|
|
4117
4137
|
type: "object",
|
|
4118
4138
|
properties: {
|
|
4119
4139
|
action: {
|
|
4120
4140
|
type: "string",
|
|
4121
|
-
enum: ["list", "add", "update", "remove", "toggle-tool"],
|
|
4122
|
-
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)"
|
|
4123
4143
|
},
|
|
4124
4144
|
name: {
|
|
4125
4145
|
type: "string",
|
|
@@ -4173,11 +4193,18 @@ var mcpConfigTool = createTool(
|
|
|
4173
4193
|
async (args, context, helpers) => {
|
|
4174
4194
|
const actionError = validateActionWithPermission(
|
|
4175
4195
|
args.action,
|
|
4176
|
-
["list", "add", "update", "remove", "toggle-tool"],
|
|
4196
|
+
["list", "add", "update", "remove", "toggle-tool", "bootstrap"],
|
|
4177
4197
|
"mcp_config",
|
|
4178
4198
|
context.permittedActions
|
|
4179
4199
|
);
|
|
4180
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
|
+
}
|
|
4181
4208
|
if (!mcpManagerForTools) {
|
|
4182
4209
|
return helpers.error("MCP manager not available");
|
|
4183
4210
|
}
|
|
@@ -4187,13 +4214,15 @@ var mcpConfigTool = createTool(
|
|
|
4187
4214
|
const updated = updater(mcpServers);
|
|
4188
4215
|
await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated }, mcpConfigPath);
|
|
4189
4216
|
}
|
|
4190
|
-
const APPLY_PROMPT_MESSAGE =
|
|
4191
|
-
function notifyContextChanged(sessionId) {
|
|
4217
|
+
const APPLY_PROMPT_MESSAGE = "Tool changes are announced automatically.";
|
|
4218
|
+
async function notifyContextChanged(sessionId) {
|
|
4192
4219
|
context.sessionManager.setDynamicContextChanged(sessionId, true);
|
|
4193
4220
|
mcpNotifyChanged?.(sessionId);
|
|
4221
|
+
const { injectContextDriftReminders } = await import("./dynamic-context-2VLACYK4.js");
|
|
4222
|
+
await injectContextDriftReminders(context.sessionManager, sessionId);
|
|
4194
4223
|
}
|
|
4195
4224
|
async function rebuildTools() {
|
|
4196
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
4225
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-SSPC3UQZ.js");
|
|
4197
4226
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
4198
4227
|
setMcpTools2(mcpTools);
|
|
4199
4228
|
}
|
|
@@ -4202,8 +4231,14 @@ var mcpConfigTool = createTool(
|
|
|
4202
4231
|
if (servers.length === 0) {
|
|
4203
4232
|
return helpers.success("No MCP servers configured.");
|
|
4204
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
|
+
}
|
|
4205
4240
|
const lines = [];
|
|
4206
|
-
for (const server of
|
|
4241
|
+
for (const server of visibleServers) {
|
|
4207
4242
|
const connStr = server.status === "connected" ? "\u25CF" : server.status === "error" ? "\u2717" : "\u25CB";
|
|
4208
4243
|
const cmdStr = server.config.command ? `${server.config.command} ${(server.config.args ?? []).join(" ")}` : server.config.url ?? "";
|
|
4209
4244
|
const hasCachedTools = server.tools.length > 0;
|
|
@@ -4248,7 +4283,7 @@ var mcpConfigTool = createTool(
|
|
|
4248
4283
|
});
|
|
4249
4284
|
await mcpManagerForTools.addServer(args.name, serverCfg);
|
|
4250
4285
|
await rebuildTools();
|
|
4251
|
-
notifyContextChanged(context.sessionId);
|
|
4286
|
+
await notifyContextChanged(context.sessionId);
|
|
4252
4287
|
const server = mcpManagerForTools.getServer(args.name);
|
|
4253
4288
|
const toolCount = server?.tools.length ?? 0;
|
|
4254
4289
|
return helpers.success(`Added MCP server "${args.name}" (${toolCount} tools discovered). ${APPLY_PROMPT_MESSAGE}`);
|
|
@@ -4281,7 +4316,7 @@ var mcpConfigTool = createTool(
|
|
|
4281
4316
|
});
|
|
4282
4317
|
if (updateError) return helpers.error(updateError);
|
|
4283
4318
|
await rebuildTools();
|
|
4284
|
-
notifyContextChanged(context.sessionId);
|
|
4319
|
+
await notifyContextChanged(context.sessionId);
|
|
4285
4320
|
const server = mcpManagerForTools.getServer(args.name);
|
|
4286
4321
|
const toolCount = server?.tools.length ?? 0;
|
|
4287
4322
|
return helpers.success(
|
|
@@ -4296,7 +4331,7 @@ var mcpConfigTool = createTool(
|
|
|
4296
4331
|
});
|
|
4297
4332
|
mcpManagerForTools.removeServer(args.name);
|
|
4298
4333
|
await rebuildTools();
|
|
4299
|
-
notifyContextChanged(context.sessionId);
|
|
4334
|
+
await notifyContextChanged(context.sessionId);
|
|
4300
4335
|
return helpers.success(`Removed MCP server "${args.name}". ${APPLY_PROMPT_MESSAGE}`);
|
|
4301
4336
|
}
|
|
4302
4337
|
if (args.action === "toggle-tool") {
|
|
@@ -4321,7 +4356,7 @@ var mcpConfigTool = createTool(
|
|
|
4321
4356
|
});
|
|
4322
4357
|
await mcpManagerForTools.setToolEnabled(args.name, args.toolName, args.enabled);
|
|
4323
4358
|
await rebuildTools();
|
|
4324
|
-
notifyContextChanged(context.sessionId);
|
|
4359
|
+
await notifyContextChanged(context.sessionId);
|
|
4325
4360
|
return helpers.success(
|
|
4326
4361
|
`Tool "${args.toolName}" ${args.enabled ? "enabled" : "disabled"} on server "${args.name}". ${APPLY_PROMPT_MESSAGE}`
|
|
4327
4362
|
);
|
|
@@ -4635,7 +4670,11 @@ var projectTasksTool = createTool(
|
|
|
4635
4670
|
action: { type: "string", enum: VALID_ACTIONS, description: "The action to perform" },
|
|
4636
4671
|
taskId: { type: "string", description: "Target task id (edit, move, set_gate_value, delete)" },
|
|
4637
4672
|
prompt: { type: "string", description: "The prompt/instruction executed when the task launches" },
|
|
4638
|
-
attachments: {
|
|
4673
|
+
attachments: {
|
|
4674
|
+
type: "array",
|
|
4675
|
+
description: "Optional attachments (same shape as chat attachments)",
|
|
4676
|
+
items: {}
|
|
4677
|
+
},
|
|
4639
4678
|
agentId: { type: "string", description: "Selected agent id" },
|
|
4640
4679
|
providerId: { type: "string", description: "Provider id used when a session is spawned" },
|
|
4641
4680
|
model: { type: "string", description: "Model label used when a session is spawned" },
|
|
@@ -5107,6 +5146,7 @@ export {
|
|
|
5107
5146
|
setMcpConfigMode,
|
|
5108
5147
|
setMcpConfigPath,
|
|
5109
5148
|
setNotifyMcpServersChanged,
|
|
5149
|
+
setMcpBootstrapForTools,
|
|
5110
5150
|
setTasksService,
|
|
5111
5151
|
getBuiltInToolNames,
|
|
5112
5152
|
parseToolPermissions,
|
|
@@ -5118,4 +5158,4 @@ export {
|
|
|
5118
5158
|
getToolRegistryForAgent,
|
|
5119
5159
|
createToolRegistry
|
|
5120
5160
|
};
|
|
5121
|
-
//# 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
|