openfox 2.0.101 → 2.0.102
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 +18 -0
- package/dist/CHANGELOG.md +18 -0
- package/dist/{chat-handler-YPWT4MAQ.js → chat-handler-IBFSBSGV.js} +22 -21
- package/dist/{chunk-O2PLNJIU.js → chunk-2EYTYXWN.js} +2 -2
- package/dist/{chunk-MRWR3SIT.js → chunk-4Z2ARCY3.js} +2 -2
- package/dist/{chunk-AY37NB76.js → chunk-5ZJYEINJ.js} +2 -2
- package/dist/{chunk-7GBFQ2PE.js → chunk-6ZV3NYEE.js} +201 -103
- package/dist/{chunk-XTKLA4AK.js → chunk-73EV6QYX.js} +4 -4
- package/dist/{chunk-XLI6PDJG.js → chunk-7HIJP4PC.js} +2 -2
- package/dist/{chunk-W77HIJGH.js → chunk-AI27N57J.js} +3 -3
- package/dist/{chunk-VJILJ22N.js → chunk-BJDQPILB.js} +3 -3
- package/dist/{chunk-MO3GJIT3.js → chunk-DPRJYQ5U.js} +132 -43
- package/dist/{chunk-3LRYZ7R3.js → chunk-FQS7A5M4.js} +2 -2
- package/dist/{chunk-NWO6GRYE.js → chunk-JE7LW7Y6.js} +2 -1
- package/dist/{chunk-C6QW2IDH.js → chunk-K6VVTE6C.js} +30 -28
- package/dist/{chunk-UIK6GA3P.js → chunk-KCED2X4H.js} +2 -2
- package/dist/{chunk-NLN5LPQ4.js → chunk-KKEBXFB3.js} +2 -2
- package/dist/{chunk-HAFRPV7I.js → chunk-KLK5N4OX.js} +3 -3
- package/dist/{chunk-KQPDU65K.js → chunk-MGKS2NG2.js} +3 -3
- package/dist/{chunk-TDHDLDGQ.js → chunk-MR7ZEGOF.js} +2 -2
- package/dist/{chunk-MBYXZ5V5.js → chunk-QGWS2EBU.js} +5 -5
- package/dist/{chunk-CFTT46KH.js → chunk-QL2G5UWE.js} +26 -24
- package/dist/{chunk-ZIMGU5ZH.js → chunk-RZC6DAT2.js} +2 -2
- package/dist/chunk-SV3I2YNO.js +7 -0
- package/dist/chunk-W5FTCTGY.js +72 -0
- package/dist/{chunk-E2CSSHSI.js → chunk-W5RC44R6.js} +10 -10
- package/dist/{chunk-KNYPBXPW.js → chunk-WPCYFH6X.js} +4 -4
- package/dist/{chunk-UEOEA6BB.js → chunk-YZSBJUGC.js} +3 -2
- package/dist/{chunk-IXFEXEUL.js → chunk-Z753S3X7.js} +6 -6
- package/dist/{chunk-G5JFKTSR.js → chunk-ZLCPNTRT.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-CFTJH6BY.js → client-Q7BHKOCD.js} +5 -5
- package/dist/{client-pure-DCEZBFKW.js → client-pure-ONSVWEG5.js} +2 -2
- package/dist/{compactor-B4V75Q3A.js → compactor-43P3LGDU.js} +11 -11
- package/dist/{dynamic-context-MA5BIJ52.js → dynamic-context-AMPVZXUU.js} +7 -7
- package/dist/{events-4THEZWVL.js → events-RCC32JOA.js} +6 -6
- package/dist/{folding-OYBO2NTH.js → folding-ZNUXPQUD.js} +4 -4
- package/dist/{http-client-U6DVFL7F.js → http-client-WGNBG7PC.js} +3 -3
- package/dist/{manager-53J5P4EZ.js → manager-HFGJLW7Q.js} +4 -4
- package/dist/model-overrides-DQDT5Y7R.js +21 -0
- package/dist/{orchestrator-DHBU7LRB.js → orchestrator-QDXKDLOW.js} +26 -25
- package/dist/package.json +1 -1
- package/dist/{path-security-6GYETPWN.js → path-security-SUFEIBTC.js} +7 -7
- package/dist/{platform-7KXP3VVA.js → platform-2RLL7RAE.js} +3 -3
- package/dist/{processor-RC3IBY2J.js → processor-YWNLWAZW.js} +21 -20
- package/dist/{provider-PEJ27FBM.js → provider-FX3QCGAF.js} +6 -6
- package/dist/{provider-manager-EJGPSLOZ.js → provider-manager-GLG6BA32.js} +6 -6
- package/dist/{registry-QEOTM3IG.js → registry-GBNLVWYQ.js} +3 -3
- package/dist/{serve-KM2RVX2U.js → serve-RKHLNGEV.js} +27 -26
- package/dist/server/index.d.ts +15 -0
- package/dist/server/index.js +26 -25
- package/dist/server-QGQGSHW6.js +47 -0
- package/dist/{service-2PW2V25M.js → service-CXWJQFOZ.js} +62 -20
- package/dist/{session-overrides-BQSE3V3F.js → session-overrides-MBGBX6TM.js} +5 -5
- package/dist/{sessions-AUDWMF55.js → sessions-FEIFYGH7.js} +4 -4
- package/dist/{settings-2WVGUPYV.js → settings-FT7HF7ZB.js} +2 -2
- package/dist/skill-defaults/browser/SKILL.md +8 -1
- package/dist/{tool-adapter-MOGEI6TP.js → tool-adapter-FEAHWU5C.js} +2 -2
- package/dist/{tools-X5FONL4Q.js → tools-M5DKWCJJ.js} +19 -16
- package/dist/{update-GHS75L7T.js → update-N4GD5IUX.js} +2 -2
- package/dist/web/assets/{index-BG5sD2ez.css → index-B0CNNl1k.css} +1 -1
- package/dist/web/assets/{index-CCBacuE6.js → index-FWViKQkM.js} +83 -83
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-UCNMVJXD.js +0 -7
- package/dist/server-ORYMG5HD.js +0 -46
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMessageStartEvent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5ZJYEINJ.js";
|
|
4
4
|
import {
|
|
5
5
|
COMPACTION_PROMPT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-4Z2ARCY3.js";
|
|
7
7
|
import {
|
|
8
8
|
getCurrentWindowMessageOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WPCYFH6X.js";
|
|
10
10
|
|
|
11
11
|
// src/server/context/compactor.ts
|
|
12
12
|
function appendCompactionPrompt(sessionId, append) {
|
|
@@ -36,4 +36,4 @@ export {
|
|
|
36
36
|
COMPACTION_MAX_RATIO,
|
|
37
37
|
shouldCompact
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-73EV6QYX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RZC6DAT2.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-GLF65XDS.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-7HIJP4PC.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BJDQPILB.js";
|
|
4
4
|
import {
|
|
5
5
|
getModelProfile
|
|
6
6
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "./chunk-HNCM3D7Y.js";
|
|
15
15
|
import {
|
|
16
16
|
resolveAttachmentsInMessages
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KCED2X4H.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -808,4 +808,4 @@ export {
|
|
|
808
808
|
parseDefaultModelSelection,
|
|
809
809
|
createProviderManager
|
|
810
810
|
};
|
|
811
|
-
//# sourceMappingURL=chunk-
|
|
811
|
+
//# sourceMappingURL=chunk-AI27N57J.js.map
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
getThinking,
|
|
14
14
|
mapFinishReason,
|
|
15
15
|
parseToolArguments
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KCED2X4H.js";
|
|
17
17
|
import {
|
|
18
18
|
LLMError,
|
|
19
19
|
OpenAIHttpClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-MR7ZEGOF.js";
|
|
21
21
|
import {
|
|
22
22
|
logger
|
|
23
23
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -310,4 +310,4 @@ function createLLMClient(config, initialBackend = "unknown") {
|
|
|
310
310
|
export {
|
|
311
311
|
createLLMClient
|
|
312
312
|
};
|
|
313
|
-
//# sourceMappingURL=chunk-
|
|
313
|
+
//# sourceMappingURL=chunk-BJDQPILB.js.map
|
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findSkillById,
|
|
3
|
+
getAllInstructions,
|
|
4
|
+
getEnabledSkillMetadata,
|
|
5
|
+
isSkillEnabled,
|
|
6
|
+
loadAllSkills
|
|
7
|
+
} from "./chunk-MGKS2NG2.js";
|
|
8
|
+
import {
|
|
9
|
+
TurnMetrics,
|
|
10
|
+
consumeStreamGenerator,
|
|
11
|
+
createChatDoneEvent,
|
|
12
|
+
createMessageDoneEvent,
|
|
13
|
+
createMessageStartEvent,
|
|
14
|
+
createToolCallEvent,
|
|
15
|
+
createToolResultEvent,
|
|
16
|
+
streamLLMPure
|
|
17
|
+
} from "./chunk-5ZJYEINJ.js";
|
|
18
|
+
import {
|
|
19
|
+
COMPACTION_PROMPT,
|
|
20
|
+
buildBasePrompt,
|
|
21
|
+
computeEffectiveTools
|
|
22
|
+
} from "./chunk-4Z2ARCY3.js";
|
|
1
23
|
import {
|
|
2
24
|
startInspectProxy
|
|
3
25
|
} from "./chunk-ZASSAZ73.js";
|
|
@@ -11,7 +33,7 @@ import {
|
|
|
11
33
|
spawnShellProcess,
|
|
12
34
|
startProcessCommand,
|
|
13
35
|
stopProcess
|
|
14
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-KLK5N4OX.js";
|
|
15
37
|
import {
|
|
16
38
|
getMaxPerSession,
|
|
17
39
|
getSessionProcessCount,
|
|
@@ -19,7 +41,7 @@ import {
|
|
|
19
41
|
} from "./chunk-I72ACQ6R.js";
|
|
20
42
|
import {
|
|
21
43
|
createMcpTools
|
|
22
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-JE7LW7Y6.js";
|
|
23
45
|
import {
|
|
24
46
|
applyMcpServerUpdate
|
|
25
47
|
} from "./chunk-VKWVPQJ5.js";
|
|
@@ -28,23 +50,21 @@ import {
|
|
|
28
50
|
isGitRepository,
|
|
29
51
|
listWorkspaces
|
|
30
52
|
} from "./chunk-D3SXT3BL.js";
|
|
31
|
-
import {
|
|
32
|
-
findSkillById,
|
|
33
|
-
getAllInstructions,
|
|
34
|
-
getEnabledSkillMetadata,
|
|
35
|
-
isSkillEnabled,
|
|
36
|
-
loadAllSkills
|
|
37
|
-
} from "./chunk-KQPDU65K.js";
|
|
38
53
|
import {
|
|
39
54
|
getSessionDisabledServers
|
|
40
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-7HIJP4PC.js";
|
|
41
56
|
import {
|
|
42
57
|
PathAccessDeniedError,
|
|
43
58
|
extractAbsolutePathsFromCommand,
|
|
44
59
|
extractSensitivePathsFromCommand,
|
|
45
60
|
registerPathConfirmation,
|
|
46
61
|
requestPathAccess
|
|
47
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-ZLCPNTRT.js";
|
|
63
|
+
import {
|
|
64
|
+
getCurrentContextWindowId,
|
|
65
|
+
getCurrentWindowMessageOptions,
|
|
66
|
+
getEventStore
|
|
67
|
+
} from "./chunk-WPCYFH6X.js";
|
|
48
68
|
import {
|
|
49
69
|
createChatDoneMessage,
|
|
50
70
|
createChatMessageMessage,
|
|
@@ -57,25 +77,8 @@ import {
|
|
|
57
77
|
askUserTool
|
|
58
78
|
} from "./chunk-EU3WWTFH.js";
|
|
59
79
|
import {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
createChatDoneEvent,
|
|
63
|
-
createMessageDoneEvent,
|
|
64
|
-
createMessageStartEvent,
|
|
65
|
-
createToolCallEvent,
|
|
66
|
-
createToolResultEvent,
|
|
67
|
-
streamLLMPure
|
|
68
|
-
} from "./chunk-AY37NB76.js";
|
|
69
|
-
import {
|
|
70
|
-
COMPACTION_PROMPT,
|
|
71
|
-
buildBasePrompt,
|
|
72
|
-
computeEffectiveTools
|
|
73
|
-
} from "./chunk-MRWR3SIT.js";
|
|
74
|
-
import {
|
|
75
|
-
getCurrentContextWindowId,
|
|
76
|
-
getCurrentWindowMessageOptions,
|
|
77
|
-
getEventStore
|
|
78
|
-
} from "./chunk-KNYPBXPW.js";
|
|
80
|
+
resolveLLMClientForAgent
|
|
81
|
+
} from "./chunk-W5FTCTGY.js";
|
|
79
82
|
import {
|
|
80
83
|
buildContextMessagesFromEventHistory,
|
|
81
84
|
foldContextState,
|
|
@@ -85,13 +88,13 @@ import {
|
|
|
85
88
|
handleToolResult,
|
|
86
89
|
reorderToolMessages,
|
|
87
90
|
stripOrphanedToolCalls
|
|
88
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-2EYTYXWN.js";
|
|
89
92
|
import {
|
|
90
93
|
findAgentById,
|
|
91
94
|
getRuntimeConfig,
|
|
92
95
|
getSubAgents,
|
|
93
96
|
loadAllAgentsDefault
|
|
94
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-FQS7A5M4.js";
|
|
95
98
|
import {
|
|
96
99
|
modelSupportsVision
|
|
97
100
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -105,11 +108,11 @@ import {
|
|
|
105
108
|
formatPdfErrorMessage,
|
|
106
109
|
isPdfBuffer,
|
|
107
110
|
processPdfContent
|
|
108
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-KCED2X4H.js";
|
|
109
112
|
import {
|
|
110
113
|
SETTINGS_KEYS,
|
|
111
114
|
getSetting
|
|
112
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-YZSBJUGC.js";
|
|
113
116
|
import {
|
|
114
117
|
logger
|
|
115
118
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -133,7 +136,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
133
136
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
134
137
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
135
138
|
try {
|
|
136
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
139
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-FT7HF7ZB.js");
|
|
137
140
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
138
141
|
return Promise.resolve(true);
|
|
139
142
|
}
|
|
@@ -1624,6 +1627,9 @@ async function executeTools(assistantMsgId, toolCalls, ctx, append) {
|
|
|
1624
1627
|
if (ctx.isSubAgent) {
|
|
1625
1628
|
toolContext.isSubAgent = true;
|
|
1626
1629
|
}
|
|
1630
|
+
if (ctx.providerManager) {
|
|
1631
|
+
toolContext.providerManager = ctx.providerManager;
|
|
1632
|
+
}
|
|
1627
1633
|
const startTime = Date.now();
|
|
1628
1634
|
let toolResult;
|
|
1629
1635
|
try {
|
|
@@ -1839,7 +1845,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1839
1845
|
const previousContextTokens = contextState.currentTokens;
|
|
1840
1846
|
const contextWindow = sessionManager.getCurrentModelContext();
|
|
1841
1847
|
const availableForOutput = Math.max(256, contextWindow - contextState.currentTokens);
|
|
1842
|
-
let modelSettings = currentMaxTokensOverride !== void 0 ? { ...sessionManager.getCurrentModelSettings(sessionId), maxTokens: currentMaxTokensOverride } : sessionManager.getCurrentModelSettings(sessionId);
|
|
1848
|
+
let modelSettings = config.modelSettings ?? (currentMaxTokensOverride !== void 0 ? { ...sessionManager.getCurrentModelSettings(sessionId), maxTokens: currentMaxTokensOverride } : sessionManager.getCurrentModelSettings(sessionId));
|
|
1843
1849
|
if (modelSettings) {
|
|
1844
1850
|
const requestedMaxTokens = modelSettings.maxTokens ?? 16384;
|
|
1845
1851
|
modelSettings = { ...modelSettings, maxTokens: Math.min(requestedMaxTokens, availableForOutput) };
|
|
@@ -1913,7 +1919,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1913
1919
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens, config.subAgentMetadata?.subAgentId);
|
|
1914
1920
|
if (!compacting) {
|
|
1915
1921
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
1916
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
1922
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-43P3LGDU.js");
|
|
1917
1923
|
if (shouldCompact(
|
|
1918
1924
|
contextState2.currentTokens,
|
|
1919
1925
|
contextState2.maxTokens,
|
|
@@ -2012,6 +2018,9 @@ ${COMPACTION_PROMPT}`,
|
|
|
2012
2018
|
if (config.subAgentMetadata) {
|
|
2013
2019
|
batchContext.isSubAgent = true;
|
|
2014
2020
|
}
|
|
2021
|
+
if (config.providerManager) {
|
|
2022
|
+
batchContext.providerManager = config.providerManager;
|
|
2023
|
+
}
|
|
2015
2024
|
batchContext.agentTimeout = getRuntimeConfig().agent.toolTimeout;
|
|
2016
2025
|
const batchResult = await executeTools(assistantMsgId, result.toolCalls, batchContext, append);
|
|
2017
2026
|
if (batchResult.stepDoneCalled) {
|
|
@@ -2672,10 +2681,11 @@ async function executeSubAgent(options) {
|
|
|
2672
2681
|
prompt,
|
|
2673
2682
|
sessionManager,
|
|
2674
2683
|
sessionId,
|
|
2675
|
-
llmClient,
|
|
2684
|
+
llmClient: parentLlmClient,
|
|
2676
2685
|
toolRegistry,
|
|
2677
2686
|
turnMetrics,
|
|
2678
|
-
statsIdentity,
|
|
2687
|
+
statsIdentity: parentStatsIdentity,
|
|
2688
|
+
providerManager,
|
|
2679
2689
|
signal,
|
|
2680
2690
|
onMessage
|
|
2681
2691
|
} = options;
|
|
@@ -2684,6 +2694,52 @@ async function executeSubAgent(options) {
|
|
|
2684
2694
|
const subAgentId = crypto.randomUUID();
|
|
2685
2695
|
const session = sessionManager.requireSession(sessionId);
|
|
2686
2696
|
const windowOptions = getWindowOptions(sessionId);
|
|
2697
|
+
let llmClient = parentLlmClient;
|
|
2698
|
+
let statsIdentity = parentStatsIdentity;
|
|
2699
|
+
let hasOverride = false;
|
|
2700
|
+
let overrideModelSettings;
|
|
2701
|
+
if (providerManager) {
|
|
2702
|
+
const resolved = resolveLLMClientForAgent(subAgentType, parentLlmClient, providerManager);
|
|
2703
|
+
if (resolved.usedOverride && resolved.override) {
|
|
2704
|
+
hasOverride = true;
|
|
2705
|
+
llmClient = resolved.client;
|
|
2706
|
+
const provider = providerManager.getProviders().find((p) => p.id === resolved.override.providerId);
|
|
2707
|
+
statsIdentity = {
|
|
2708
|
+
providerId: resolved.override.providerId,
|
|
2709
|
+
providerName: provider?.name ?? resolved.override.providerId,
|
|
2710
|
+
backend: provider?.backend ?? resolved.client.getBackend(),
|
|
2711
|
+
model: resolved.override.model
|
|
2712
|
+
};
|
|
2713
|
+
overrideModelSettings = providerManager.getModelSettings(resolved.override.providerId, resolved.override.model);
|
|
2714
|
+
logger.info("Sub-agent using model override", { subAgentType, ...resolved.override });
|
|
2715
|
+
} else if (resolved.warning) {
|
|
2716
|
+
logger.warn("Sub-agent model override unavailable, falling back", { subAgentType, warning: resolved.warning });
|
|
2717
|
+
const warningMsgId = crypto.randomUUID();
|
|
2718
|
+
eventStore.append(
|
|
2719
|
+
sessionId,
|
|
2720
|
+
createMessageStartEvent(warningMsgId, "system", resolved.warning, {
|
|
2721
|
+
...windowOptions ?? {},
|
|
2722
|
+
isSystemGenerated: true,
|
|
2723
|
+
subAgentId,
|
|
2724
|
+
subAgentType
|
|
2725
|
+
})
|
|
2726
|
+
);
|
|
2727
|
+
eventStore.append(sessionId, { type: "message.done", data: { messageId: warningMsgId } });
|
|
2728
|
+
if (onMessage) {
|
|
2729
|
+
onMessage(
|
|
2730
|
+
createChatMessageMessage({
|
|
2731
|
+
id: warningMsgId,
|
|
2732
|
+
role: "system",
|
|
2733
|
+
content: resolved.warning,
|
|
2734
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2735
|
+
isSystemGenerated: true,
|
|
2736
|
+
subAgentId,
|
|
2737
|
+
subAgentType
|
|
2738
|
+
})
|
|
2739
|
+
);
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2687
2743
|
logger.debug("Sub-agent starting", { subAgentType, subAgentId, sessionId });
|
|
2688
2744
|
const resetMsgId = crypto.randomUUID();
|
|
2689
2745
|
eventStore.append(
|
|
@@ -2750,6 +2806,9 @@ async function executeSubAgent(options) {
|
|
|
2750
2806
|
sessionId,
|
|
2751
2807
|
llmClient,
|
|
2752
2808
|
statsIdentity,
|
|
2809
|
+
providerManager,
|
|
2810
|
+
// When an override is active, use its model settings (or empty to avoid leaking session settings)
|
|
2811
|
+
...hasOverride ? { modelSettings: overrideModelSettings ?? {} } : {},
|
|
2753
2812
|
signal,
|
|
2754
2813
|
onMessage,
|
|
2755
2814
|
assembleRequest: async (input) => createAssemblyResult({
|
|
@@ -2838,7 +2897,7 @@ var callSubAgentTool = {
|
|
|
2838
2897
|
truncated: false
|
|
2839
2898
|
};
|
|
2840
2899
|
}
|
|
2841
|
-
const { sessionId, sessionManager, llmClient, statsIdentity } = context;
|
|
2900
|
+
const { sessionId, sessionManager, llmClient, statsIdentity, providerManager } = context;
|
|
2842
2901
|
if (!sessionId || !sessionManager || !llmClient) {
|
|
2843
2902
|
return {
|
|
2844
2903
|
success: false,
|
|
@@ -2848,7 +2907,7 @@ var callSubAgentTool = {
|
|
|
2848
2907
|
};
|
|
2849
2908
|
}
|
|
2850
2909
|
try {
|
|
2851
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
2910
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-M5DKWCJJ.js");
|
|
2852
2911
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
2853
2912
|
const turnMetrics = new TurnMetrics();
|
|
2854
2913
|
const result = await executeSubAgent({
|
|
@@ -2859,6 +2918,7 @@ var callSubAgentTool = {
|
|
|
2859
2918
|
llmClient,
|
|
2860
2919
|
toolRegistry,
|
|
2861
2920
|
turnMetrics,
|
|
2921
|
+
providerManager,
|
|
2862
2922
|
statsIdentity: statsIdentity ?? {
|
|
2863
2923
|
providerId: "unknown",
|
|
2864
2924
|
providerName: "Unknown",
|
|
@@ -3869,7 +3929,7 @@ var mcpConfigTool = createTool(
|
|
|
3869
3929
|
mcpNotifyChanged?.(sessionId);
|
|
3870
3930
|
}
|
|
3871
3931
|
async function rebuildTools() {
|
|
3872
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
3932
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-M5DKWCJJ.js");
|
|
3873
3933
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
3874
3934
|
setMcpTools2(mcpTools);
|
|
3875
3935
|
}
|
|
@@ -4344,6 +4404,34 @@ function createRegistryFromTools(tools, allowedTools, toolPermissions, agentId,
|
|
|
4344
4404
|
if (tool) {
|
|
4345
4405
|
const isMcpTool = !getBuiltInToolNames().has(name);
|
|
4346
4406
|
const hasRestrictions = allowedTools !== void 0;
|
|
4407
|
+
if (isMcpTool && hasRestrictions) {
|
|
4408
|
+
const hasMcpNone = allowedTools.includes("__mcp_none__");
|
|
4409
|
+
const hasMcpSpecific = allowedTools.some((t) => !getBuiltInToolNames().has(t) && t !== "__mcp_none__");
|
|
4410
|
+
if (hasMcpNone) {
|
|
4411
|
+
logger.debug("Permission denied: MCP tools disabled for this agent", {
|
|
4412
|
+
tool: name,
|
|
4413
|
+
allowedTools
|
|
4414
|
+
});
|
|
4415
|
+
return {
|
|
4416
|
+
success: false,
|
|
4417
|
+
error: createPermissionErrorMessage(name, allowedTools, agentId, isSubAgent),
|
|
4418
|
+
durationMs: 0,
|
|
4419
|
+
truncated: false
|
|
4420
|
+
};
|
|
4421
|
+
}
|
|
4422
|
+
if (hasMcpSpecific && !allowedTools.includes(name)) {
|
|
4423
|
+
logger.debug("Permission denied: MCP tool not in allowed list", {
|
|
4424
|
+
tool: name,
|
|
4425
|
+
allowedTools
|
|
4426
|
+
});
|
|
4427
|
+
return {
|
|
4428
|
+
success: false,
|
|
4429
|
+
error: createPermissionErrorMessage(name, allowedTools, agentId, isSubAgent),
|
|
4430
|
+
durationMs: 0,
|
|
4431
|
+
truncated: false
|
|
4432
|
+
};
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4347
4435
|
if (!isMcpTool && hasRestrictions) {
|
|
4348
4436
|
const effectiveTools = computeEffectiveTools(allowedTools, isSubAgent ? "sub-agent" : "agent");
|
|
4349
4437
|
if (!effectiveTools.has(name)) {
|
|
@@ -4506,6 +4594,7 @@ export {
|
|
|
4506
4594
|
setMcpConfigMode,
|
|
4507
4595
|
setMcpConfigPath,
|
|
4508
4596
|
setNotifyMcpServersChanged,
|
|
4597
|
+
getBuiltInToolNames,
|
|
4509
4598
|
parseToolPermissions,
|
|
4510
4599
|
getToolPermissions,
|
|
4511
4600
|
validateToolAction,
|
|
@@ -4515,4 +4604,4 @@ export {
|
|
|
4515
4604
|
getToolRegistryForAgent,
|
|
4516
4605
|
createToolRegistry
|
|
4517
4606
|
};
|
|
4518
|
-
//# sourceMappingURL=chunk-
|
|
4607
|
+
//# sourceMappingURL=chunk-DPRJYQ5U.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZSBJUGC.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -455,4 +455,4 @@ export {
|
|
|
455
455
|
getOverrideAgentIds,
|
|
456
456
|
resolveDefaultAgentId
|
|
457
457
|
};
|
|
458
|
-
//# sourceMappingURL=chunk-
|
|
458
|
+
//# sourceMappingURL=chunk-FQS7A5M4.js.map
|
|
@@ -16,6 +16,7 @@ function createMcpTools(mcpManager) {
|
|
|
16
16
|
tools.push({
|
|
17
17
|
name: prefixedName,
|
|
18
18
|
definition,
|
|
19
|
+
mcpServer: server.name,
|
|
19
20
|
execute: async (args, _context) => {
|
|
20
21
|
const start = Date.now();
|
|
21
22
|
const result = await mcpManager.callTool(server.name, mcpTool.name, args);
|
|
@@ -36,4 +37,4 @@ function createMcpTools(mcpManager) {
|
|
|
36
37
|
export {
|
|
37
38
|
createMcpTools
|
|
38
39
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
40
|
+
//# sourceMappingURL=chunk-JE7LW7Y6.js.map
|
|
@@ -2,21 +2,33 @@ import {
|
|
|
2
2
|
generateSessionNameForSession,
|
|
3
3
|
getSessionMessageCount,
|
|
4
4
|
needsNameGeneration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-W5RC44R6.js";
|
|
6
6
|
import {
|
|
7
7
|
runAgentTurn,
|
|
8
8
|
runChatTurn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QL2G5UWE.js";
|
|
10
|
+
import {
|
|
11
|
+
applyDynamicContext,
|
|
12
|
+
computeSessionHash,
|
|
13
|
+
computeUnifiedDiff
|
|
14
|
+
} from "./chunk-Z753S3X7.js";
|
|
15
|
+
import {
|
|
16
|
+
appendCompactionPrompt
|
|
17
|
+
} from "./chunk-73EV6QYX.js";
|
|
10
18
|
import {
|
|
11
19
|
devServerManager,
|
|
12
20
|
executeSubAgent,
|
|
13
21
|
getToolRegistryForAgent
|
|
14
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-DPRJYQ5U.js";
|
|
23
|
+
import {
|
|
24
|
+
TurnMetrics,
|
|
25
|
+
createMessageStartEvent
|
|
26
|
+
} from "./chunk-5ZJYEINJ.js";
|
|
15
27
|
import {
|
|
16
28
|
checkAborted,
|
|
17
29
|
onProcessEvent,
|
|
18
30
|
spawnShellProcess
|
|
19
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KLK5N4OX.js";
|
|
20
32
|
import {
|
|
21
33
|
killProcessTree,
|
|
22
34
|
terminateProcessTree
|
|
@@ -25,10 +37,10 @@ import {
|
|
|
25
37
|
gitSpawnEnv
|
|
26
38
|
} from "./chunk-J7GAZGZT.js";
|
|
27
39
|
import {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
40
|
+
combineEventsWithSnapshot,
|
|
41
|
+
getCurrentContextWindowId,
|
|
42
|
+
getEventStore
|
|
43
|
+
} from "./chunk-WPCYFH6X.js";
|
|
32
44
|
import {
|
|
33
45
|
createChatErrorMessage,
|
|
34
46
|
createChatMessageMessage,
|
|
@@ -48,25 +60,13 @@ import {
|
|
|
48
60
|
getPendingQuestionsForSession,
|
|
49
61
|
provideAnswer
|
|
50
62
|
} from "./chunk-EU3WWTFH.js";
|
|
51
|
-
import {
|
|
52
|
-
appendCompactionPrompt
|
|
53
|
-
} from "./chunk-XTKLA4AK.js";
|
|
54
|
-
import {
|
|
55
|
-
TurnMetrics,
|
|
56
|
-
createMessageStartEvent
|
|
57
|
-
} from "./chunk-AY37NB76.js";
|
|
58
|
-
import {
|
|
59
|
-
combineEventsWithSnapshot,
|
|
60
|
-
getCurrentContextWindowId,
|
|
61
|
-
getEventStore
|
|
62
|
-
} from "./chunk-KNYPBXPW.js";
|
|
63
63
|
import {
|
|
64
64
|
getPlatformShell
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-KKEBXFB3.js";
|
|
66
66
|
import {
|
|
67
67
|
buildMessagesFromStoredEvents,
|
|
68
68
|
foldPendingConfirmations
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-2EYTYXWN.js";
|
|
70
70
|
import {
|
|
71
71
|
deleteItemFromDir,
|
|
72
72
|
findAgentById,
|
|
@@ -75,10 +75,10 @@ import {
|
|
|
75
75
|
loadAllAgentsDefault,
|
|
76
76
|
resolveDefaultAgentId,
|
|
77
77
|
saveItemToDir
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-FQS7A5M4.js";
|
|
79
79
|
import {
|
|
80
80
|
getMaxVisibleItems
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-YZSBJUGC.js";
|
|
82
82
|
import {
|
|
83
83
|
logger
|
|
84
84
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -745,6 +745,7 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
745
745
|
const activeSteps = subGroup ? workflow.steps.filter((s) => s.subGroup === subGroup) : workflow.steps;
|
|
746
746
|
const resumeFromStep = options.resumeFromStep;
|
|
747
747
|
const isResume = !!resumeFromStep;
|
|
748
|
+
let resumeConsumed = false;
|
|
748
749
|
let currentStepId = isResume ? resumeFromStep : subGroup ? activeSteps[0]?.id ?? workflow.entryStep : workflow.entryStep;
|
|
749
750
|
let lastStepOutput = options.initialStepOutput ?? {};
|
|
750
751
|
const firstEntryForStep = /* @__PURE__ */ new Set();
|
|
@@ -888,7 +889,7 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
888
889
|
const STEP_DONE_NUDGE = "You haven't called step_done(). If you haven't finished the task, continue and when you're finished call step_done()";
|
|
889
890
|
let promptContent;
|
|
890
891
|
let nudgeContent;
|
|
891
|
-
const isResumingCurrentStep = isResume && step.id === resumeFromStep;
|
|
892
|
+
const isResumingCurrentStep = isResume && step.id === resumeFromStep && !resumeConsumed;
|
|
892
893
|
if (!firstEntryForStep.has(step.id) && agentStep.prompt && !isResumingCurrentStep) {
|
|
893
894
|
const resolvedPrompt = resolveTemplate(agentStep.prompt, templateCtx);
|
|
894
895
|
promptContent = resolvedPrompt + STEP_DONE_PROMPT;
|
|
@@ -953,6 +954,7 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
953
954
|
}
|
|
954
955
|
);
|
|
955
956
|
firstEntryForStep.add(step.id);
|
|
957
|
+
resumeConsumed = true;
|
|
956
958
|
const agentReturnValue = agentResult.returnValueResult ?? "completed";
|
|
957
959
|
lastStepOutput = {
|
|
958
960
|
...agentResult.returnValueContent ? { content: agentResult.returnValueContent } : {},
|
|
@@ -2161,8 +2163,8 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
2161
2163
|
const sessionId = client.activeSessionId;
|
|
2162
2164
|
const session = sessionManager.requireSession(sessionId);
|
|
2163
2165
|
try {
|
|
2164
|
-
const { buildCachedPrompt } = await import("./dynamic-context-
|
|
2165
|
-
const allAgents = await import("./registry-
|
|
2166
|
+
const { buildCachedPrompt } = await import("./dynamic-context-AMPVZXUU.js");
|
|
2167
|
+
const allAgents = await import("./registry-GBNLVWYQ.js");
|
|
2166
2168
|
const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
|
|
2167
2169
|
const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(sessionManager, sessionId, agentDef);
|
|
2168
2170
|
const oldCached = sessionManager.getCachedPrompt(sessionId);
|
|
@@ -2477,4 +2479,4 @@ export {
|
|
|
2477
2479
|
signalMcpReady,
|
|
2478
2480
|
createWebSocketServer
|
|
2479
2481
|
};
|
|
2480
|
-
//# sourceMappingURL=chunk-
|
|
2482
|
+
//# sourceMappingURL=chunk-K6VVTE6C.js.map
|
|
@@ -627,7 +627,7 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
|
|
|
627
627
|
;
|
|
628
628
|
params["reasoning_effort"] = resolvedEffort;
|
|
629
629
|
}
|
|
630
|
-
if (
|
|
630
|
+
if (request.reasoningEffort && capabilities.supportsChatTemplateKwargs) {
|
|
631
631
|
;
|
|
632
632
|
params["chat_template_kwargs"] = {
|
|
633
633
|
enable_thinking: true
|
|
@@ -687,4 +687,4 @@ export {
|
|
|
687
687
|
buildStreamingCreateParams,
|
|
688
688
|
mapFinishReason
|
|
689
689
|
};
|
|
690
|
-
//# sourceMappingURL=chunk-
|
|
690
|
+
//# sourceMappingURL=chunk-KCED2X4H.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZSBJUGC.js";
|
|
5
5
|
|
|
6
6
|
// src/server/utils/platform.ts
|
|
7
7
|
import os from "os";
|
|
@@ -63,4 +63,4 @@ export {
|
|
|
63
63
|
isWindowsPath,
|
|
64
64
|
isAbsolutePath
|
|
65
65
|
};
|
|
66
|
-
//# sourceMappingURL=chunk-
|
|
66
|
+
//# sourceMappingURL=chunk-KKEBXFB3.js.map
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./chunk-I72ACQ6R.js";
|
|
12
12
|
import {
|
|
13
13
|
getPlatformShell
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KKEBXFB3.js";
|
|
15
15
|
import {
|
|
16
16
|
SETTINGS_KEYS,
|
|
17
17
|
getSetting
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-YZSBJUGC.js";
|
|
19
19
|
|
|
20
20
|
// src/server/utils/shell.ts
|
|
21
21
|
import { spawn } from "child_process";
|
|
@@ -163,4 +163,4 @@ export {
|
|
|
163
163
|
getSessionProcesses2 as getSessionProcesses,
|
|
164
164
|
getProcessLogs
|
|
165
165
|
};
|
|
166
|
-
//# sourceMappingURL=chunk-
|
|
166
|
+
//# sourceMappingURL=chunk-KLK5N4OX.js.map
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
deleteItemFromDir,
|
|
6
6
|
loadItemsFromDir,
|
|
7
7
|
pathExists
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FQS7A5M4.js";
|
|
9
9
|
import {
|
|
10
10
|
SETTINGS_KEYS,
|
|
11
11
|
deleteSetting,
|
|
12
12
|
getSetting,
|
|
13
13
|
setSetting
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YZSBJUGC.js";
|
|
15
15
|
|
|
16
16
|
// src/server/context/instructions.ts
|
|
17
17
|
import { readFile, access } from "fs/promises";
|
|
@@ -440,4 +440,4 @@ export {
|
|
|
440
440
|
deleteSkill,
|
|
441
441
|
deleteProjectSkill
|
|
442
442
|
};
|
|
443
|
-
//# sourceMappingURL=chunk-
|
|
443
|
+
//# sourceMappingURL=chunk-MGKS2NG2.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YZSBJUGC.js";
|
|
5
5
|
import {
|
|
6
6
|
logger
|
|
7
7
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
WorkspaceInUseError,
|
|
162
162
|
OpenAIHttpClient
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-MR7ZEGOF.js.map
|