openfox 2.0.106 → 2.0.108
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 +27 -0
- package/dist/CHANGELOG.md +27 -0
- package/dist/{chat-handler-A22X22VZ.js → chat-handler-UZ2A75DG.js} +21 -21
- package/dist/{chunk-46KNPXY6.js → chunk-3GJFZQNV.js} +3 -3
- package/dist/{chunk-HU22EVEM.js → chunk-3MYD6Y4W.js} +6 -6
- package/dist/{chunk-SUTJJWUK.js → chunk-63ZAFYQ7.js} +8 -8
- package/dist/{chunk-AYUUGKZU.js → chunk-7FKSDR7H.js} +11 -11
- package/dist/{chunk-27SDWNKL.js → chunk-B5MH4HQ6.js} +12 -2
- package/dist/{chunk-QBKAW5H4.js → chunk-CF2HEP3M.js} +4 -4
- package/dist/{chunk-TB7TTPYQ.js → chunk-EYMGV4YA.js} +2 -2
- package/dist/{chunk-RRTKVJMF.js → chunk-FR5LUTLQ.js} +12 -2
- package/dist/{chunk-LOHVZGCM.js → chunk-GWMNR3LC.js} +3 -3
- package/dist/{chunk-6VNB4L4V.js → chunk-HGOEHSVC.js} +3 -3
- package/dist/{chunk-G2VLGZ3Y.js → chunk-I4M6SCMY.js} +97 -146
- package/dist/{chunk-UXQN7FGB.js → chunk-ID4N6PM6.js} +2 -2
- package/dist/{chunk-V6Y6OLB4.js → chunk-IRWZJPPA.js} +2 -2
- package/dist/{chunk-6M44ZHQA.js → chunk-JBZW5BZX.js} +40 -20
- package/dist/{chunk-3C73IUUL.js → chunk-JH6SOEQW.js} +32 -4
- package/dist/{chunk-5M45NHQ2.js → chunk-JR54MDZI.js} +2 -2
- package/dist/{chunk-26DEYDYV.js → chunk-KYY5PAGE.js} +4 -4
- package/dist/{chunk-WDJOSRIB.js → chunk-L737Y63F.js} +5 -2
- package/dist/{chunk-KIAKWUZ3.js → chunk-MPWLBKSK.js} +9 -1
- package/dist/{chunk-X3USQHHK.js → chunk-P7HT6IJW.js} +3 -3
- package/dist/{chunk-OEPRHAIO.js → chunk-P7WCFUPJ.js} +2 -2
- package/dist/{chunk-P4APMCTX.js → chunk-PSAWMCD6.js} +16 -52
- package/dist/{chunk-UCIZV76E.js → chunk-Q4P4CWWV.js} +3 -3
- package/dist/{chunk-GXW4CRR5.js → chunk-QDKLJZO4.js} +130 -57
- package/dist/{chunk-IA4Y3CKA.js → chunk-TMVXOLBS.js} +2 -2
- package/dist/chunk-UWF4L4CK.js +7 -0
- package/dist/{chunk-2GM6SUIQ.js → chunk-WFWFRUBU.js} +2 -2
- package/dist/{chunk-SGJ3LSVA.js → chunk-YBIJI53N.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-MP3FSNN7.js → client-R4TZCZTO.js} +5 -5
- package/dist/{client-pure-USVHN4WG.js → client-pure-VFZIIK4S.js} +2 -2
- package/dist/{compactor-KK2BVJK5.js → compactor-U3MAROGM.js} +11 -11
- package/dist/{dynamic-context-ZUXI5UTW.js → dynamic-context-H7AVSAXQ.js} +7 -7
- package/dist/{events-OJ2R6OEM.js → events-7WAOX35W.js} +6 -6
- package/dist/{folding-DUZSKCZF.js → folding-MJDFKOHT.js} +4 -4
- package/dist/{http-client-KJXFSK7A.js → http-client-NHVT6E5C.js} +3 -3
- package/dist/{manager-N27WNW5B.js → manager-ZVHBUECR.js} +4 -4
- package/dist/{model-overrides-36SQR3JR.js → model-overrides-47LYCLFO.js} +3 -3
- package/dist/{orchestrator-VZORJ7KF.js → orchestrator-X7H5JRM5.js} +20 -20
- package/dist/package.json +4 -2
- package/dist/{path-security-QCIA6YFV.js → path-security-26J53LD4.js} +8 -8
- package/dist/{platform-Q6T3AUHA.js → platform-JOAXLXYQ.js} +3 -3
- package/dist/{processor-QYVHKRIV.js → processor-33OESYXP.js} +20 -20
- package/dist/{protocol-YDNGGADL.js → protocol-SPIJPOEN.js} +2 -2
- package/dist/{protocol-zRSsysOe.d.ts → protocol-_Gphic7p.d.ts} +1 -1
- package/dist/provider/index.d.ts +4 -4
- package/dist/{provider-RQQ5JN34.js → provider-U4X7BDDL.js} +6 -6
- package/dist/{provider-manager-RUC5QQ75.js → provider-manager-ON3V54DS.js} +6 -6
- package/dist/{registry-BDSTPV65.js → registry-2PP4PUCL.js} +3 -3
- package/dist/{serve-2O7G2WZF.js → serve-LK3LQEWW.js} +28 -28
- package/dist/server/index.d.ts +3 -39
- package/dist/server/index.js +27 -27
- package/dist/server-7Q5RPZKY.js +47 -0
- package/dist/{session-overrides-SFWPS5CT.js → session-overrides-FVX6374M.js} +5 -5
- package/dist/{sessions-TZNUQJ2I.js → sessions-7XOOISCY.js} +4 -4
- package/dist/{settings-5LG7IB3K.js → settings-H2W3SNFE.js} +2 -2
- package/dist/shared/index.d.ts +3 -3
- package/dist/{tools-Y4F4HJPO.js → tools-5C2VIQ7B.js} +18 -18
- package/dist/{types-CTl70hba.d.ts → types-BMEOlLT0.d.ts} +1 -0
- package/dist/{types-_uF_PRaD.d.ts → types-D0TgGL3t.d.ts} +1 -1
- package/dist/{update-QEZIUJHR.js → update-5R3HZD6U.js} +2 -2
- package/dist/web/assets/index-C0OFVoFt.js +323 -0
- package/dist/web/assets/{index-B7wjVPjL.css → index-CyWbbpRP.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/dist/{workspace-2OG5VQG6.js → workspace-YDUQZ3HC.js} +4 -2
- package/package.json +4 -2
- package/dist/chunk-C5YV3EA4.js +0 -7
- package/dist/server-CYE6XY7J.js +0 -47
- package/dist/web/assets/index-BxI3Y9C7.js +0 -323
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MPWLBKSK.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-ID4N6PM6.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
SETTINGS_KEYS,
|
|
3
3
|
getSetting,
|
|
4
4
|
setSetting
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MPWLBKSK.js";
|
|
6
6
|
|
|
7
7
|
// src/server/agents/model-overrides.ts
|
|
8
8
|
import { z } from "zod";
|
|
@@ -69,4 +69,4 @@ export {
|
|
|
69
69
|
setAgentModelOverride,
|
|
70
70
|
resolveLLMClientForAgent
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=chunk-
|
|
72
|
+
//# sourceMappingURL=chunk-IRWZJPPA.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getEnabledSkillMetadata,
|
|
5
5
|
isSkillEnabled,
|
|
6
6
|
loadAllSkills
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GWMNR3LC.js";
|
|
8
8
|
import {
|
|
9
9
|
TurnMetrics,
|
|
10
10
|
consumeStreamGenerator,
|
|
@@ -14,12 +14,12 @@ import {
|
|
|
14
14
|
createToolCallEvent,
|
|
15
15
|
createToolResultEvent,
|
|
16
16
|
streamLLMPure
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-JR54MDZI.js";
|
|
18
18
|
import {
|
|
19
19
|
COMPACTION_PROMPT,
|
|
20
20
|
buildBasePrompt,
|
|
21
21
|
computeEffectiveTools
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-YBIJI53N.js";
|
|
23
23
|
import {
|
|
24
24
|
startInspectProxy
|
|
25
25
|
} from "./chunk-33Q7LCVD.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
spawnShellProcess,
|
|
34
34
|
startProcessCommand,
|
|
35
35
|
stopProcess
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-HGOEHSVC.js";
|
|
37
37
|
import {
|
|
38
38
|
getMaxPerSession,
|
|
39
39
|
getSessionProcessCount,
|
|
@@ -49,36 +49,36 @@ import {
|
|
|
49
49
|
getGitBranch,
|
|
50
50
|
isGitRepository,
|
|
51
51
|
listWorkspaces
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-FR5LUTLQ.js";
|
|
53
53
|
import {
|
|
54
54
|
getSessionDisabledServers
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-P7WCFUPJ.js";
|
|
56
56
|
import {
|
|
57
57
|
PathAccessDeniedError,
|
|
58
58
|
extractAbsolutePathsFromCommand,
|
|
59
59
|
extractSensitivePathsFromCommand,
|
|
60
60
|
registerPathConfirmation,
|
|
61
61
|
requestPathAccess
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-P7HT6IJW.js";
|
|
63
63
|
import {
|
|
64
64
|
getCurrentContextWindowId,
|
|
65
65
|
getCurrentWindowMessageOptions,
|
|
66
66
|
getEventStore
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-QDKLJZO4.js";
|
|
68
68
|
import {
|
|
69
69
|
createChatDoneMessage,
|
|
70
70
|
createChatMessageMessage,
|
|
71
71
|
createChatMessageUpdatedMessage,
|
|
72
72
|
createChatPathConfirmationMessage,
|
|
73
73
|
createQueueStateMessage
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-B5MH4HQ6.js";
|
|
75
75
|
import {
|
|
76
76
|
AskUserInterrupt,
|
|
77
77
|
askUserTool
|
|
78
78
|
} from "./chunk-JAX5OEMM.js";
|
|
79
79
|
import {
|
|
80
80
|
resolveLLMClientForAgent
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-IRWZJPPA.js";
|
|
82
82
|
import {
|
|
83
83
|
buildContextMessagesFromEventHistory,
|
|
84
84
|
foldContextState,
|
|
@@ -88,13 +88,13 @@ import {
|
|
|
88
88
|
handleToolResult,
|
|
89
89
|
reorderToolMessages,
|
|
90
90
|
stripOrphanedToolCalls
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-JH6SOEQW.js";
|
|
92
92
|
import {
|
|
93
93
|
findAgentById,
|
|
94
94
|
getRuntimeConfig,
|
|
95
95
|
getSubAgents,
|
|
96
96
|
loadAllAgentsDefault
|
|
97
|
-
} from "./chunk-
|
|
97
|
+
} from "./chunk-WFWFRUBU.js";
|
|
98
98
|
import {
|
|
99
99
|
modelSupportsVision
|
|
100
100
|
} from "./chunk-V4IE7HJY.js";
|
|
@@ -108,11 +108,11 @@ import {
|
|
|
108
108
|
formatPdfErrorMessage,
|
|
109
109
|
isPdfBuffer,
|
|
110
110
|
processPdfContent
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-L737Y63F.js";
|
|
112
112
|
import {
|
|
113
113
|
SETTINGS_KEYS,
|
|
114
114
|
getSetting
|
|
115
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-MPWLBKSK.js";
|
|
116
116
|
import {
|
|
117
117
|
logger
|
|
118
118
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -136,7 +136,7 @@ async function requestUserConfirmation(context, toolLabel, desc) {
|
|
|
136
136
|
if (context.dangerLevel === "dangerous") return Promise.resolve(true);
|
|
137
137
|
if (toolLabel === "workspace" || toolLabel === "command") {
|
|
138
138
|
try {
|
|
139
|
-
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-
|
|
139
|
+
const { getSetting: getSetting2, SETTINGS_KEYS: SETTINGS_KEYS2 } = await import("./settings-H2W3SNFE.js");
|
|
140
140
|
if (getSetting2(SETTINGS_KEYS2.CONFIRM_ON_WORKSPACE_ACTIONS) !== "true") {
|
|
141
141
|
return Promise.resolve(true);
|
|
142
142
|
}
|
|
@@ -1919,7 +1919,7 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
|
|
|
1919
1919
|
sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens, config.subAgentMetadata?.subAgentId);
|
|
1920
1920
|
if (!compacting) {
|
|
1921
1921
|
const contextState2 = sessionManager.getContextState(sessionId);
|
|
1922
|
-
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-
|
|
1922
|
+
const { shouldCompact, appendCompactionPrompt } = await import("./compactor-U3MAROGM.js");
|
|
1923
1923
|
if (shouldCompact(
|
|
1924
1924
|
contextState2.currentTokens,
|
|
1925
1925
|
contextState2.maxTokens,
|
|
@@ -2907,7 +2907,7 @@ var callSubAgentTool = {
|
|
|
2907
2907
|
};
|
|
2908
2908
|
}
|
|
2909
2909
|
try {
|
|
2910
|
-
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-
|
|
2910
|
+
const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-5C2VIQ7B.js");
|
|
2911
2911
|
const toolRegistry = getToolRegistryForAgent2(agentDef);
|
|
2912
2912
|
const turnMetrics = new TurnMetrics();
|
|
2913
2913
|
const result = await executeSubAgent({
|
|
@@ -3929,7 +3929,7 @@ var mcpConfigTool = createTool(
|
|
|
3929
3929
|
mcpNotifyChanged?.(sessionId);
|
|
3930
3930
|
}
|
|
3931
3931
|
async function rebuildTools() {
|
|
3932
|
-
const { setMcpTools: setMcpTools2 } = await import("./tools-
|
|
3932
|
+
const { setMcpTools: setMcpTools2 } = await import("./tools-5C2VIQ7B.js");
|
|
3933
3933
|
const mcpTools = createMcpTools(mcpManagerForTools);
|
|
3934
3934
|
setMcpTools2(mcpTools);
|
|
3935
3935
|
}
|
|
@@ -4208,7 +4208,27 @@ var workspaceTool = createTool(
|
|
|
4208
4208
|
type: "function",
|
|
4209
4209
|
function: {
|
|
4210
4210
|
name: "workspace",
|
|
4211
|
-
description:
|
|
4211
|
+
description: `Manage workspaces for the current session. A workspace is a cloned copy of the project.
|
|
4212
|
+
|
|
4213
|
+
Use "switch" to move between workspaces. Target "original" for the project root, or a workspace name.
|
|
4214
|
+
If the workspace does not exist yet, it is created automatically, inheriting the session's current branch.
|
|
4215
|
+
|
|
4216
|
+
You can also change the branch of the current workspace by calling switch with the current
|
|
4217
|
+
workspace name and a branch parameter. The branch will be checked out without recreating
|
|
4218
|
+
the workspace and without losing uncommitted changes.
|
|
4219
|
+
|
|
4220
|
+
If the requested branch does not exist, it will be created. By default it is based on the
|
|
4221
|
+
default branch of the project (origin/HEAD). You can specify sourceBranch to base the new
|
|
4222
|
+
branch on a different existing branch.
|
|
4223
|
+
|
|
4224
|
+
Actions that change the workspace (switch, delete) require explicit user approval via a confirmation dialog.
|
|
4225
|
+
|
|
4226
|
+
Setup commands (e.g. npm install) are configured via .openfox/workspace.json.
|
|
4227
|
+
|
|
4228
|
+
Actions:
|
|
4229
|
+
- switch: Switch to a workspace (target: "original" or a name, optional branch for new workspaces)
|
|
4230
|
+
- list: List all workspaces with their current branch and active status
|
|
4231
|
+
- delete: Delete a workspace by name (cannot delete "original"). Use force=true to auto-switch other sessions that reference this workspace.`,
|
|
4212
4232
|
parameters: {
|
|
4213
4233
|
type: "object",
|
|
4214
4234
|
properties: {
|
|
@@ -4604,4 +4624,4 @@ export {
|
|
|
4604
4624
|
getToolRegistryForAgent,
|
|
4605
4625
|
createToolRegistry
|
|
4606
4626
|
};
|
|
4607
|
-
//# sourceMappingURL=chunk-
|
|
4627
|
+
//# sourceMappingURL=chunk-JBZW5BZX.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveDefaultAgentId
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WFWFRUBU.js";
|
|
4
4
|
|
|
5
5
|
// src/server/events/apply-events.ts
|
|
6
6
|
function markComplete(msg, reason) {
|
|
@@ -828,12 +828,39 @@ function foldWaitingWorkflow(events) {
|
|
|
828
828
|
}
|
|
829
829
|
return waitingWorkflow;
|
|
830
830
|
}
|
|
831
|
+
var SNAPSHOT_STREAMING_TAIL_BYTES = 1024 * 1024;
|
|
832
|
+
function truncateSnapshotStreamingOutput(messages) {
|
|
833
|
+
return messages.map((message) => {
|
|
834
|
+
const toolCalls = message.toolCalls;
|
|
835
|
+
if (!toolCalls) return message;
|
|
836
|
+
let changed = false;
|
|
837
|
+
const newToolCalls = toolCalls.map((tc) => {
|
|
838
|
+
if (!tc.streamingOutput || tc.streamingOutput.length === 0) return tc;
|
|
839
|
+
if (tc.result === void 0) return tc;
|
|
840
|
+
let total = 0;
|
|
841
|
+
for (const chunk of tc.streamingOutput) total += chunk.content.length;
|
|
842
|
+
if (total <= SNAPSHOT_STREAMING_TAIL_BYTES) return tc;
|
|
843
|
+
const kept = [];
|
|
844
|
+
let keptBytes = 0;
|
|
845
|
+
for (let i = tc.streamingOutput.length - 1; i >= 0 && keptBytes < SNAPSHOT_STREAMING_TAIL_BYTES; i--) {
|
|
846
|
+
const chunk = tc.streamingOutput[i];
|
|
847
|
+
kept.unshift(chunk);
|
|
848
|
+
keptBytes += chunk.content.length;
|
|
849
|
+
}
|
|
850
|
+
changed = true;
|
|
851
|
+
return { ...tc, streamingOutput: kept, streamingOutputTruncated: true };
|
|
852
|
+
});
|
|
853
|
+
if (!changed) return message;
|
|
854
|
+
return { ...message, toolCalls: newToolCalls };
|
|
855
|
+
});
|
|
856
|
+
}
|
|
831
857
|
function buildSnapshot(foldedState, latestSeq, snapshotAt = Date.now()) {
|
|
858
|
+
const messages = truncateSnapshotStreamingOutput(foldedState.messages);
|
|
832
859
|
return {
|
|
833
860
|
mode: foldedState.mode,
|
|
834
861
|
phase: foldedState.phase,
|
|
835
862
|
isRunning: foldedState.isRunning,
|
|
836
|
-
messages
|
|
863
|
+
messages,
|
|
837
864
|
criteria: foldedState.criteria,
|
|
838
865
|
metadataEntries: foldedState.metadataEntries,
|
|
839
866
|
contextState: foldedState.contextState,
|
|
@@ -874,11 +901,12 @@ function buildSnapshotFromSessionState(input) {
|
|
|
874
901
|
latestSnapshotEvent.data.messages,
|
|
875
902
|
events.slice(latestSnapshotIndex + 1)
|
|
876
903
|
) : foldedState.messages;
|
|
904
|
+
const trimmedMessages = truncateSnapshotStreamingOutput(messages);
|
|
877
905
|
return {
|
|
878
906
|
mode: session.mode,
|
|
879
907
|
phase: session.phase,
|
|
880
908
|
isRunning: session.isRunning,
|
|
881
|
-
messages,
|
|
909
|
+
messages: trimmedMessages,
|
|
882
910
|
criteria: session.criteria,
|
|
883
911
|
metadataEntries: foldedState.metadataEntries,
|
|
884
912
|
contextState: {
|
|
@@ -929,4 +957,4 @@ export {
|
|
|
929
957
|
buildSnapshot,
|
|
930
958
|
buildSnapshotFromSessionState
|
|
931
959
|
};
|
|
932
|
-
//# sourceMappingURL=chunk-
|
|
960
|
+
//# sourceMappingURL=chunk-JH6SOEQW.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-YHEQTVFV.js";
|
|
10
10
|
import {
|
|
11
11
|
buildModelParams
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-L737Y63F.js";
|
|
13
13
|
import {
|
|
14
14
|
logger
|
|
15
15
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -438,4 +438,4 @@ export {
|
|
|
438
438
|
createChatDoneEvent,
|
|
439
439
|
consumeStreamGenerator
|
|
440
440
|
};
|
|
441
|
-
//# sourceMappingURL=chunk-
|
|
441
|
+
//# sourceMappingURL=chunk-JR54MDZI.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createMessageStartEvent
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JR54MDZI.js";
|
|
4
4
|
import {
|
|
5
5
|
COMPACTION_PROMPT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YBIJI53N.js";
|
|
7
7
|
import {
|
|
8
8
|
getCurrentWindowMessageOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QDKLJZO4.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-KYY5PAGE.js.map
|
|
@@ -537,7 +537,10 @@ ${attachment.data}` }];
|
|
|
537
537
|
}
|
|
538
538
|
async function convertMessages(messages, modelSupportsVision, thinkingField, sendReasoningInMessages) {
|
|
539
539
|
const filtered = messages.filter((msg) => {
|
|
540
|
-
|
|
540
|
+
if (msg.role !== "assistant") return true;
|
|
541
|
+
const isEmpty = !msg.content?.trim() && (!msg.toolCalls || msg.toolCalls.length === 0);
|
|
542
|
+
if (!isEmpty) return true;
|
|
543
|
+
return Boolean(msg.thinkingContent && sendReasoningInMessages !== false);
|
|
541
544
|
});
|
|
542
545
|
const result = [];
|
|
543
546
|
for (const msg of filtered) {
|
|
@@ -694,4 +697,4 @@ export {
|
|
|
694
697
|
buildStreamingCreateParams,
|
|
695
698
|
mapFinishReason
|
|
696
699
|
};
|
|
697
|
-
//# sourceMappingURL=chunk-
|
|
700
|
+
//# sourceMappingURL=chunk-L737Y63F.js.map
|
|
@@ -19,6 +19,10 @@ var SETTINGS_KEYS = {
|
|
|
19
19
|
DISPLAY_MAX_VISIBLE_ITEMS: "display.maxVisibleItems",
|
|
20
20
|
DISPLAY_CUSTOM_CSS: "display.customCss",
|
|
21
21
|
DISPLAY_TERMINAL_FONT: "display.terminalFont",
|
|
22
|
+
DISPLAY_USE_NATIVE_SCROLLBARS: "display.useNativeScrollbars",
|
|
23
|
+
DISPLAY_USE_NATIVE_SCROLLBARS_CODE_BLOCKS: "display.useNativeScrollbarsCodeBlocks",
|
|
24
|
+
DISPLAY_COLLAPSE_LARGE_TOOL_CALLS: "display.collapseLargeToolCalls",
|
|
25
|
+
DISPLAY_DEFER_CODE_HIGHLIGHT_WHILE_STREAMING: "display.deferCodeHighlightWhileStreaming",
|
|
22
26
|
LLM_DYNAMIC_SYSTEM_PROMPT: "llm.dynamicSystemPrompt",
|
|
23
27
|
CACHE_WARMING: "cache.warming",
|
|
24
28
|
KEYBINDINGS: "keybindings",
|
|
@@ -50,6 +54,10 @@ var SETTINGS_DEFAULTS = {
|
|
|
50
54
|
[SETTINGS_KEYS.DISPLAY_MAX_VISIBLE_ITEMS]: "300",
|
|
51
55
|
[SETTINGS_KEYS.DISPLAY_CUSTOM_CSS]: "",
|
|
52
56
|
[SETTINGS_KEYS.DISPLAY_TERMINAL_FONT]: '"JetBrains Mono", "Cascadia Mono", "Menlo", "Consolas", "DejaVu Sans Mono", "Liberation Mono", monospace',
|
|
57
|
+
[SETTINGS_KEYS.DISPLAY_USE_NATIVE_SCROLLBARS]: "false",
|
|
58
|
+
[SETTINGS_KEYS.DISPLAY_USE_NATIVE_SCROLLBARS_CODE_BLOCKS]: "false",
|
|
59
|
+
[SETTINGS_KEYS.DISPLAY_COLLAPSE_LARGE_TOOL_CALLS]: "false",
|
|
60
|
+
[SETTINGS_KEYS.DISPLAY_DEFER_CODE_HIGHLIGHT_WHILE_STREAMING]: "false",
|
|
53
61
|
[SETTINGS_KEYS.LLM_DYNAMIC_SYSTEM_PROMPT]: "false",
|
|
54
62
|
[SETTINGS_KEYS.CACHE_WARMING]: "false",
|
|
55
63
|
[SETTINGS_KEYS.RETRY_PATTERNS]: JSON.stringify({ patterns: [], maxRetriesPerTurn: 10 }),
|
|
@@ -119,4 +127,4 @@ export {
|
|
|
119
127
|
getAllSettings,
|
|
120
128
|
getMaxVisibleItems
|
|
121
129
|
};
|
|
122
|
-
//# sourceMappingURL=chunk-
|
|
130
|
+
//# sourceMappingURL=chunk-MPWLBKSK.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getEventStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QDKLJZO4.js";
|
|
4
4
|
import {
|
|
5
5
|
createChatPathConfirmationMessage
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-B5MH4HQ6.js";
|
|
7
7
|
|
|
8
8
|
// src/server/tools/path-security.ts
|
|
9
9
|
import { realpath } from "fs/promises";
|
|
@@ -498,4 +498,4 @@ export {
|
|
|
498
498
|
getConfirmationSessionId,
|
|
499
499
|
getPendingConfirmationsBySession
|
|
500
500
|
};
|
|
501
|
-
//# sourceMappingURL=chunk-
|
|
501
|
+
//# sourceMappingURL=chunk-P7HT6IJW.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateSessionMcpDisabledServers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TMVXOLBS.js";
|
|
4
4
|
import {
|
|
5
5
|
getDatabase
|
|
6
6
|
} from "./chunk-LCQ5AN6Y.js";
|
|
@@ -62,4 +62,4 @@ export {
|
|
|
62
62
|
clearSessionOverrides,
|
|
63
63
|
getAllSessionOverrides
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=chunk-
|
|
65
|
+
//# sourceMappingURL=chunk-P7WCFUPJ.js.map
|
|
@@ -2,33 +2,33 @@ import {
|
|
|
2
2
|
generateSessionNameForSession,
|
|
3
3
|
getSessionMessageCount,
|
|
4
4
|
needsNameGeneration
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-63ZAFYQ7.js";
|
|
6
6
|
import {
|
|
7
7
|
runAgentTurn,
|
|
8
8
|
runChatTurn
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-7FKSDR7H.js";
|
|
10
10
|
import {
|
|
11
11
|
applyDynamicContext,
|
|
12
12
|
computeSessionHash,
|
|
13
13
|
computeUnifiedDiff
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3MYD6Y4W.js";
|
|
15
15
|
import {
|
|
16
16
|
appendCompactionPrompt
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KYY5PAGE.js";
|
|
18
18
|
import {
|
|
19
19
|
devServerManager,
|
|
20
20
|
executeSubAgent,
|
|
21
21
|
getToolRegistryForAgent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JBZW5BZX.js";
|
|
23
23
|
import {
|
|
24
24
|
TurnMetrics,
|
|
25
25
|
createMessageStartEvent
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-JR54MDZI.js";
|
|
27
27
|
import {
|
|
28
28
|
checkAborted,
|
|
29
29
|
onProcessEvent,
|
|
30
30
|
spawnShellProcess
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HGOEHSVC.js";
|
|
32
32
|
import {
|
|
33
33
|
killProcessTree,
|
|
34
34
|
terminateProcessTree
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
combineEventsWithSnapshot,
|
|
41
41
|
getCurrentContextWindowId,
|
|
42
42
|
getEventStore
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-QDKLJZO4.js";
|
|
44
44
|
import {
|
|
45
45
|
createChatErrorMessage,
|
|
46
46
|
createChatMessageMessage,
|
|
@@ -55,18 +55,18 @@ import {
|
|
|
55
55
|
parseClientMessage,
|
|
56
56
|
serializeServerMessage,
|
|
57
57
|
storedEventToServerMessage
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-B5MH4HQ6.js";
|
|
59
59
|
import {
|
|
60
60
|
getPendingQuestionsForSession,
|
|
61
61
|
provideAnswer
|
|
62
62
|
} from "./chunk-JAX5OEMM.js";
|
|
63
63
|
import {
|
|
64
64
|
getPlatformShell
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-ID4N6PM6.js";
|
|
66
66
|
import {
|
|
67
67
|
buildMessagesFromStoredEvents,
|
|
68
68
|
foldPendingConfirmations
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-JH6SOEQW.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-WFWFRUBU.js";
|
|
79
79
|
import {
|
|
80
80
|
getMaxVisibleItems
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-MPWLBKSK.js";
|
|
82
82
|
import {
|
|
83
83
|
logger
|
|
84
84
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -796,42 +796,6 @@ async function executeWorkflow(workflow, options, subGroup) {
|
|
|
796
796
|
executionId = activeExec.id;
|
|
797
797
|
}
|
|
798
798
|
}
|
|
799
|
-
const ctxCheck = await sessionManager.assertExecutionGitContext(sessionId);
|
|
800
|
-
if (!ctxCheck.ok) {
|
|
801
|
-
logger.warn("Workflow blocked: git context drift detected", {
|
|
802
|
-
sessionId,
|
|
803
|
-
workflow: workflow.metadata.id,
|
|
804
|
-
workdir: ctxCheck.workdir,
|
|
805
|
-
expectedBranch: ctxCheck.expectedBranch,
|
|
806
|
-
actualBranch: ctxCheck.actualBranch
|
|
807
|
-
});
|
|
808
|
-
emitWorkflowMessage(
|
|
809
|
-
eventStore,
|
|
810
|
-
sessionId,
|
|
811
|
-
`Runner blocked: ${ctxCheck.reason}`,
|
|
812
|
-
getCurrentWindowMessageOptions(sessionId),
|
|
813
|
-
onMessage
|
|
814
|
-
);
|
|
815
|
-
if (executionId) {
|
|
816
|
-
sessionManager.blockWorkflow(
|
|
817
|
-
sessionId,
|
|
818
|
-
executionId,
|
|
819
|
-
workflow.metadata.id,
|
|
820
|
-
workflow.metadata.name,
|
|
821
|
-
workflow.metadata.color
|
|
822
|
-
);
|
|
823
|
-
}
|
|
824
|
-
sessionManager.setPhase(sessionId, "blocked");
|
|
825
|
-
return {
|
|
826
|
-
finalAction: {
|
|
827
|
-
type: "BLOCKED",
|
|
828
|
-
reason: ctxCheck.reason,
|
|
829
|
-
blockedCriteria: []
|
|
830
|
-
},
|
|
831
|
-
iterations: 0,
|
|
832
|
-
totalTime: (performance.now() - startTime) / 1e3
|
|
833
|
-
};
|
|
834
|
-
}
|
|
835
799
|
if (workflow.startCondition && workflow.startCondition.type !== "always") {
|
|
836
800
|
const session = sessionManager.requireSession(sessionId);
|
|
837
801
|
const conditionMet = evaluateCondition(
|
|
@@ -2225,8 +2189,8 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
|
|
|
2225
2189
|
const sessionId = client.activeSessionId;
|
|
2226
2190
|
const session = sessionManager.requireSession(sessionId);
|
|
2227
2191
|
try {
|
|
2228
|
-
const { buildCachedPrompt } = await import("./dynamic-context-
|
|
2229
|
-
const allAgents = await import("./registry-
|
|
2192
|
+
const { buildCachedPrompt } = await import("./dynamic-context-H7AVSAXQ.js");
|
|
2193
|
+
const allAgents = await import("./registry-2PP4PUCL.js");
|
|
2230
2194
|
const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
|
|
2231
2195
|
const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
|
|
2232
2196
|
const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
|
|
@@ -2549,4 +2513,4 @@ export {
|
|
|
2549
2513
|
signalMcpReady,
|
|
2550
2514
|
createWebSocketServer
|
|
2551
2515
|
};
|
|
2552
|
-
//# sourceMappingURL=chunk-
|
|
2516
|
+
//# sourceMappingURL=chunk-PSAWMCD6.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createLLMClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3GJFZQNV.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-L737Y63F.js";
|
|
18
18
|
import {
|
|
19
19
|
logger
|
|
20
20
|
} from "./chunk-K44MW7JJ.js";
|
|
@@ -804,4 +804,4 @@ export {
|
|
|
804
804
|
parseDefaultModelSelection,
|
|
805
805
|
createProviderManager
|
|
806
806
|
};
|
|
807
|
-
//# sourceMappingURL=chunk-
|
|
807
|
+
//# sourceMappingURL=chunk-Q4P4CWWV.js.map
|