openfox 2.0.79 → 2.0.80

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.
Files changed (41) hide show
  1. package/dist/{chat-handler-5ZHPYU24.js → chat-handler-2ZEI2WBE.js} +8 -8
  2. package/dist/{chunk-NZIYELSQ.js → chunk-4GMRZU7A.js} +2 -2
  3. package/dist/{chunk-TSVFRWSG.js → chunk-A2IZ4PWQ.js} +8 -5
  4. package/dist/{chunk-M7EFXRDS.js → chunk-BUXIESO5.js} +5 -5
  5. package/dist/{chunk-ANDWLNG4.js → chunk-F56O4B67.js} +7 -7
  6. package/dist/{chunk-UIU7OGHP.js → chunk-GBVS4LCP.js} +3 -3
  7. package/dist/{chunk-WUSWNLTV.js → chunk-LYZ3LQRX.js} +11 -8
  8. package/dist/{chunk-SGBXBP3S.js → chunk-MAGDRXHW.js} +48 -15
  9. package/dist/{chunk-YFVSSMA3.js → chunk-NH2PVB6R.js} +19 -20
  10. package/dist/{chunk-DI4SIPFT.js → chunk-PXF4KHAP.js} +6 -6
  11. package/dist/chunk-RJWYZ6KK.js +7 -0
  12. package/dist/{chunk-VGWJFXPR.js → chunk-V77VNKN6.js} +7 -7
  13. package/dist/{chunk-TO66LKWD.js → chunk-YZUZHWXM.js} +57 -49
  14. package/dist/cli/dev.js +1 -1
  15. package/dist/cli/index.js +1 -1
  16. package/dist/{compactor-G7B3V24F.js → compactor-LJFUIKWB.js} +8 -6
  17. package/dist/{config-MD74ETY5.js → config-EN3WEH4A.js} +2 -2
  18. package/dist/{events-KNOZX7YG.js → events-GF2WNELM.js} +3 -3
  19. package/dist/{folding-OPP2BVUB.js → folding-UACKBHUZ.js} +2 -2
  20. package/dist/{orchestrator-L6LX5BV7.js → orchestrator-SSTGBBOU.js} +7 -7
  21. package/dist/package.json +1 -1
  22. package/dist/{path-security-HUXQHEQ5.js → path-security-EKTUMDJW.js} +4 -4
  23. package/dist/{processor-UQX5KL56.js → processor-YLPZJMXH.js} +8 -8
  24. package/dist/{protocol-BXxJmsOW.d.ts → protocol-9WP7lLec.d.ts} +1 -1
  25. package/dist/provider/index.d.ts +4 -4
  26. package/dist/{provider-PI3RDDE4.js → provider-TIZV4IFE.js} +3 -3
  27. package/dist/{serve-QLVPUEB7.js → serve-U53R54PO.js} +11 -11
  28. package/dist/server/index.d.ts +4 -3
  29. package/dist/server/index.js +10 -10
  30. package/dist/{server-3XUD2NB7.js → server-2TQ3DFYA.js} +9 -9
  31. package/dist/shared/index.d.ts +3 -3
  32. package/dist/{tools-HGKUD327.js → tools-APH5FLYT.js} +6 -6
  33. package/dist/{types-o07LJcLI.d.ts → types-BtY5XChg.d.ts} +1 -1
  34. package/dist/{types-C308SU4B.d.ts → types-ulRvCqQX.d.ts} +1 -0
  35. package/dist/{update-NUDIMJ4Q.js → update-6OFFUWZN.js} +2 -2
  36. package/dist/web/assets/{index-CiC9LOc0.css → index-CO9RvnPX.css} +1 -1
  37. package/dist/web/assets/{index-BbJqmNad.js → index-DHsXL2KP.js} +47 -47
  38. package/dist/web/index.html +2 -2
  39. package/dist/web/sw.js +1 -1
  40. package/package.json +1 -1
  41. package/dist/chunk-BRRABRLV.js +0 -7
@@ -2,17 +2,17 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-UIU7OGHP.js";
5
+ } from "./chunk-GBVS4LCP.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-VGWJFXPR.js";
9
- import "./chunk-SGBXBP3S.js";
8
+ } from "./chunk-V77VNKN6.js";
9
+ import "./chunk-MAGDRXHW.js";
10
10
  import "./chunk-5CQRB7AD.js";
11
11
  import "./chunk-NWO6GRYE.js";
12
12
  import "./chunk-VPFUXGMM.js";
13
13
  import "./chunk-37WF2Z3T.js";
14
14
  import "./chunk-WGMJCFCE.js";
15
- import "./chunk-NZIYELSQ.js";
15
+ import "./chunk-4GMRZU7A.js";
16
16
  import "./chunk-EU3WWTFH.js";
17
17
  import "./chunk-EHVDAVYG.js";
18
18
  import "./chunk-MTUYDBSL.js";
@@ -22,8 +22,8 @@ import "./chunk-6AE3JPDJ.js";
22
22
  import "./chunk-I72ACQ6R.js";
23
23
  import {
24
24
  getEventStore
25
- } from "./chunk-M7EFXRDS.js";
26
- import "./chunk-TSVFRWSG.js";
25
+ } from "./chunk-BUXIESO5.js";
26
+ import "./chunk-A2IZ4PWQ.js";
27
27
  import "./chunk-AANVMTYU.js";
28
28
  import "./chunk-RGUUZD5B.js";
29
29
  import {
@@ -37,7 +37,7 @@ import "./chunk-YHEQTVFV.js";
37
37
  import "./chunk-RMXPVQP4.js";
38
38
  import "./chunk-K44MW7JJ.js";
39
39
  import "./chunk-X6BXZFO7.js";
40
- import "./chunk-YFVSSMA3.js";
40
+ import "./chunk-NH2PVB6R.js";
41
41
  import "./chunk-CQGTEGKL.js";
42
42
  import "./chunk-5WRI5ZAA.js";
43
43
 
@@ -160,4 +160,4 @@ export {
160
160
  startChatSession,
161
161
  stopSessionExecution
162
162
  };
163
- //# sourceMappingURL=chat-handler-5ZHPYU24.js.map
163
+ //# sourceMappingURL=chat-handler-2ZEI2WBE.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getEventStore
3
- } from "./chunk-M7EFXRDS.js";
3
+ } from "./chunk-BUXIESO5.js";
4
4
  import {
5
5
  createChatPathConfirmationMessage
6
6
  } from "./chunk-SJTG56CH.js";
@@ -494,4 +494,4 @@ export {
494
494
  getConfirmationSessionId,
495
495
  getPendingConfirmationsBySession
496
496
  };
497
- //# sourceMappingURL=chunk-NZIYELSQ.js.map
497
+ //# sourceMappingURL=chunk-4GMRZU7A.js.map
@@ -613,12 +613,15 @@ function foldContextState(events, initialWindowId) {
613
613
  latestContextState
614
614
  };
615
615
  }
616
- function foldMode(events) {
617
- let mode = "planner";
616
+ function foldMode(events, defaultMode = "planner") {
617
+ let mode = defaultMode;
618
618
  for (const event of events) {
619
619
  if (event.type === "mode.changed") {
620
620
  const data = event.data;
621
621
  mode = data.mode;
622
+ } else if (event.type === "turn.snapshot") {
623
+ const snapshot = event.data;
624
+ mode = snapshot.mode;
622
625
  }
623
626
  }
624
627
  return mode;
@@ -668,8 +671,8 @@ function foldPendingConfirmations(events) {
668
671
  }
669
672
  return pending;
670
673
  }
671
- function foldSessionState(events, initialWindowId, maxTokens, initialMessages) {
672
- const mode = foldMode(events);
674
+ function foldSessionState(events, initialWindowId, maxTokens, initialMessages, defaultMode) {
675
+ const mode = foldMode(events, defaultMode);
673
676
  const phase = foldPhase(events);
674
677
  const isRunning = foldIsRunning(events);
675
678
  const messages = initialMessages && initialMessages.length > 0 ? foldTurnEventsToSnapshotMessagesFromInitial(events, initialMessages) : foldTurnEventsToSnapshotMessages(events);
@@ -895,4 +898,4 @@ export {
895
898
  buildSnapshot,
896
899
  buildSnapshotFromSessionState
897
900
  };
898
- //# sourceMappingURL=chunk-TSVFRWSG.js.map
901
+ //# sourceMappingURL=chunk-A2IZ4PWQ.js.map
@@ -5,7 +5,7 @@ import {
5
5
  foldContextState,
6
6
  foldSessionState,
7
7
  spreadOptionalMessageFields
8
- } from "./chunk-TSVFRWSG.js";
8
+ } from "./chunk-A2IZ4PWQ.js";
9
9
  import {
10
10
  updateSessionMessageCount
11
11
  } from "./chunk-AANVMTYU.js";
@@ -793,7 +793,7 @@ function toSnapshotMessage(message) {
793
793
  ...spreadOptionalMessageFields(message)
794
794
  };
795
795
  }
796
- function getSessionState(sessionId, maxTokens) {
796
+ function getSessionState(sessionId, maxTokens, defaultMode) {
797
797
  const eventStore = getEventStore();
798
798
  const { snapshot: latestSnapshot, events: rawEvents } = eventStore.getEventsSinceSnapshot(sessionId);
799
799
  const events = combineEventsWithSnapshot(sessionId, latestSnapshot, rawEvents);
@@ -836,13 +836,13 @@ function getSessionState(sessionId, maxTokens) {
836
836
  const config = getRuntimeConfig();
837
837
  const effectiveMaxTokens = maxTokens ?? config.context.maxTokens;
838
838
  if (latestSnapshot) {
839
- const state = foldSessionState(events, initialWindowId, effectiveMaxTokens);
839
+ const state = foldSessionState(events, initialWindowId, effectiveMaxTokens, void 0, defaultMode);
840
840
  return {
841
841
  ...state,
842
842
  messages: buildMessagesFromStoredEvents(events).messages.map(toSnapshotMessage)
843
843
  };
844
844
  }
845
- return foldSessionState(events, initialWindowId, effectiveMaxTokens);
845
+ return foldSessionState(events, initialWindowId, effectiveMaxTokens, void 0, defaultMode);
846
846
  }
847
847
  function getCurrentWindowMessages(sessionId) {
848
848
  const currentWindowId = getCurrentContextWindowId(sessionId);
@@ -1227,4 +1227,4 @@ export {
1227
1227
  truncateSessionMessages,
1228
1228
  getRecentUserPromptsForSession
1229
1229
  };
1230
- //# sourceMappingURL=chunk-M7EFXRDS.js.map
1230
+ //# sourceMappingURL=chunk-BUXIESO5.js.map
@@ -37,7 +37,7 @@ Options:
37
37
  }
38
38
  async function runNetworkSetup(mode) {
39
39
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-YY5PJYSC.js");
40
- const { saveGlobalConfig } = await import("./config-MD74ETY5.js");
40
+ const { saveGlobalConfig } = await import("./config-EN3WEH4A.js");
41
41
  const { getAuthKeyPath } = await import("./paths-F27V3S4I.js");
42
42
  const existingAuth = await loadAuthConfig(mode);
43
43
  if (existingAuth) {
@@ -104,7 +104,7 @@ async function runNetworkSetup(mode) {
104
104
  console.log("\u2713 Configuration saved!\n");
105
105
  }
106
106
  async function runConfig(mode) {
107
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-MD74ETY5.js");
107
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-EN3WEH4A.js");
108
108
  const { getGlobalConfigPath } = await import("./paths-F27V3S4I.js");
109
109
  const config = await loadGlobalConfig(mode);
110
110
  const configPath = getGlobalConfigPath(mode);
@@ -163,7 +163,7 @@ async function runCli(options) {
163
163
  break;
164
164
  }
165
165
  case "provider": {
166
- const { runProviderCommand } = await import("./provider-PI3RDDE4.js");
166
+ const { runProviderCommand } = await import("./provider-TIZV4IFE.js");
167
167
  const [, subcommand] = positionals;
168
168
  await runProviderCommand(mode, subcommand);
169
169
  break;
@@ -200,7 +200,7 @@ async function runCli(options) {
200
200
  break;
201
201
  }
202
202
  case "update": {
203
- const { runUpdate } = await import("./update-NUDIMJ4Q.js");
203
+ const { runUpdate } = await import("./update-6OFFUWZN.js");
204
204
  const code = await runUpdate();
205
205
  if (code !== 0) {
206
206
  process.exit(code);
@@ -208,12 +208,12 @@ async function runCli(options) {
208
208
  break;
209
209
  }
210
210
  default: {
211
- const { configFileExists } = await import("./config-MD74ETY5.js");
211
+ const { configFileExists } = await import("./config-EN3WEH4A.js");
212
212
  const configExists = await configFileExists(mode);
213
213
  if (!configExists) {
214
214
  await runNetworkSetup(mode);
215
215
  }
216
- const { runServe } = await import("./serve-QLVPUEB7.js");
216
+ const { runServe } = await import("./serve-U53R54PO.js");
217
217
  const serveOptions = { mode };
218
218
  if (values.port) serveOptions.port = parseInt(values.port);
219
219
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -225,4 +225,4 @@ async function runCli(options) {
225
225
  export {
226
226
  runCli
227
227
  };
228
- //# sourceMappingURL=chunk-ANDWLNG4.js.map
228
+ //# sourceMappingURL=chunk-F56O4B67.js.map
@@ -8,11 +8,11 @@ import {
8
8
  combineEventsWithSnapshot,
9
9
  getEventStore,
10
10
  getRuntimeConfig
11
- } from "./chunk-M7EFXRDS.js";
11
+ } from "./chunk-BUXIESO5.js";
12
12
  import {
13
13
  buildMessagesFromStoredEvents,
14
14
  foldPendingConfirmations
15
- } from "./chunk-TSVFRWSG.js";
15
+ } from "./chunk-A2IZ4PWQ.js";
16
16
  import {
17
17
  updateSessionMetadata
18
18
  } from "./chunk-AANVMTYU.js";
@@ -200,4 +200,4 @@ export {
200
200
  buildRunChatTurnParams,
201
201
  generateSessionNameForSession
202
202
  };
203
- //# sourceMappingURL=chunk-UIU7OGHP.js.map
203
+ //# sourceMappingURL=chunk-GBVS4LCP.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-EHVDAVYG.js";
5
5
  import {
6
6
  getCurrentWindowMessageOptions
7
- } from "./chunk-M7EFXRDS.js";
7
+ } from "./chunk-BUXIESO5.js";
8
8
 
9
9
  // src/server/context/compactor.ts
10
10
  function appendCompactionPrompt(sessionId, append) {
@@ -19,16 +19,19 @@ function appendCompactionPrompt(sessionId, append) {
19
19
  );
20
20
  append({ type: "message.done", data: { messageId: compactPromptMsgId } });
21
21
  }
22
+ var COMPACTION_HEADROOM_TOKENS = 5e3;
23
+ var COMPACTION_MAX_RATIO = 0.85;
22
24
  function shouldCompact(currentTokens, maxTokens, threshold) {
23
- return currentTokens > maxTokens * threshold;
24
- }
25
- function getCompactionTarget(maxTokens, targetRatio) {
26
- return Math.floor(maxTokens * targetRatio);
25
+ if (threshold <= 0) return false;
26
+ const ceilingRatio = Math.min(1, Math.max(0, (maxTokens - COMPACTION_HEADROOM_TOKENS) / maxTokens));
27
+ const effectiveThreshold = Math.min(threshold, ceilingRatio, COMPACTION_MAX_RATIO);
28
+ return currentTokens > maxTokens * effectiveThreshold;
27
29
  }
28
30
 
29
31
  export {
30
32
  appendCompactionPrompt,
31
- shouldCompact,
32
- getCompactionTarget
33
+ COMPACTION_HEADROOM_TOKENS,
34
+ COMPACTION_MAX_RATIO,
35
+ shouldCompact
33
36
  };
34
- //# sourceMappingURL=chunk-WUSWNLTV.js.map
37
+ //# sourceMappingURL=chunk-LYZ3LQRX.js.map
@@ -25,7 +25,7 @@ import {
25
25
  extractSensitivePathsFromCommand,
26
26
  registerPathConfirmation,
27
27
  requestPathAccess
28
- } from "./chunk-NZIYELSQ.js";
28
+ } from "./chunk-4GMRZU7A.js";
29
29
  import {
30
30
  AskUserInterrupt,
31
31
  askUserTool
@@ -65,7 +65,7 @@ import {
65
65
  getCurrentWindowMessageOptions,
66
66
  getEventStore,
67
67
  getRuntimeConfig
68
- } from "./chunk-M7EFXRDS.js";
68
+ } from "./chunk-BUXIESO5.js";
69
69
  import {
70
70
  buildContextMessagesFromEventHistory,
71
71
  foldContextState,
@@ -75,7 +75,7 @@ import {
75
75
  handleToolResult,
76
76
  reorderToolMessages,
77
77
  stripOrphanedToolCalls
78
- } from "./chunk-TSVFRWSG.js";
78
+ } from "./chunk-A2IZ4PWQ.js";
79
79
  import {
80
80
  createChatDoneMessage,
81
81
  createChatMessageMessage,
@@ -103,7 +103,7 @@ import {
103
103
  import {
104
104
  loadGlobalConfig,
105
105
  saveGlobalConfig
106
- } from "./chunk-YFVSSMA3.js";
106
+ } from "./chunk-NH2PVB6R.js";
107
107
  import {
108
108
  getGlobalConfigDir
109
109
  } from "./chunk-CQGTEGKL.js";
@@ -115,11 +115,13 @@ import { extname, join } from "path";
115
115
  // src/server/tools/tool-helpers.ts
116
116
  import { randomUUID } from "crypto";
117
117
  import { resolve, isAbsolute } from "path";
118
+ var confirmationSeqCounter = 0;
118
119
  function requestUserConfirmation(context, toolLabel, desc) {
119
120
  if (context.dangerLevel === "dangerous") return Promise.resolve(true);
120
121
  if (context.isSubAgent) return Promise.resolve(false);
121
122
  if (typeof context.onEvent !== "function") return Promise.resolve(false);
122
- const callId = context.toolCallId ?? randomUUID();
123
+ const seq = ++confirmationSeqCounter;
124
+ const callId = context.toolCallId ? `${context.toolCallId}-${seq}` : randomUUID();
123
125
  try {
124
126
  const eventStore = getEventStore();
125
127
  eventStore.append(context.sessionId, {
@@ -1051,12 +1053,38 @@ var ESCAPE_PATTERNS = [
1051
1053
  /\bgit\s+--work-tree[\s=]/,
1052
1054
  /\bgit\s+--git-dir[\s=]/
1053
1055
  ];
1054
- function detectEscapePattern(command) {
1056
+ function extractCdTarget(segment) {
1057
+ const trimmed = segment.trim();
1058
+ const match = trimmed.match(/^cd\s+(.+)$/);
1059
+ if (!match) return null;
1060
+ return match[1].replace(/^['"]|['"]$/g, "").trim();
1061
+ }
1062
+ function isCdTargetWithinWorkdir(cdTarget, workdir) {
1063
+ if (!cdTarget.startsWith("/")) return false;
1064
+ const resolvedTarget = resolve3(cdTarget);
1065
+ const normalizedWorkdir = resolve3(workdir).replace(/\/+$/, "");
1066
+ return resolvedTarget === normalizedWorkdir || resolvedTarget.startsWith(normalizedWorkdir + "/");
1067
+ }
1068
+ function isCdToWithinWorkdir(segment, workdir) {
1069
+ const trimmed = segment.trim();
1070
+ if (!/^cd\s+['"]?\//.test(trimmed)) return false;
1071
+ const cdTarget = extractCdTarget(trimmed);
1072
+ return cdTarget !== null && isCdTargetWithinWorkdir(cdTarget, workdir);
1073
+ }
1074
+ function detectEscapePattern(command, workdir) {
1055
1075
  const normalized = command.replace(/'[^']*'/g, " ").replace(/"[^"]*"/g, " ");
1056
1076
  for (const pattern of ESCAPE_PATTERNS) {
1057
1077
  const match = normalized.match(pattern);
1058
1078
  if (match) {
1059
- return match[0].trim();
1079
+ const matched = match[0].trim();
1080
+ if (workdir && (matched.startsWith("cd /") || matched.startsWith('cd "'))) {
1081
+ const segments2 = command.split(/[;&|]|&&|\|\|/);
1082
+ const allCdsWithinWorkdir = segments2.every(
1083
+ (seg) => !/^cd\s+['"]?\//.test(seg.trim()) || isCdToWithinWorkdir(seg, workdir)
1084
+ );
1085
+ if (allCdsWithinWorkdir) continue;
1086
+ }
1087
+ return matched;
1060
1088
  }
1061
1089
  }
1062
1090
  const segments = command.split(/[;&|]|&&|\|\|/);
@@ -1065,6 +1093,7 @@ function detectEscapePattern(command) {
1065
1093
  if (/^cd\s+.+\.\./.test(trimmed) || /^cd\s+['"]?\//.test(trimmed) || /^cd\s+['"]?~/.test(trimmed) || /^cd\s+['"]?\.\./.test(trimmed) || /^cd\s+.*\$\(/.test(trimmed) || // cd with $(...) substitution
1066
1094
  /^cd\s+.*`/.test(trimmed) || // cd with backtick substitution
1067
1095
  /^cd\s+.*\$\{?[A-Za-z_]/.test(trimmed)) {
1096
+ if (workdir && isCdToWithinWorkdir(trimmed, workdir)) continue;
1068
1097
  return trimmed;
1069
1098
  }
1070
1099
  }
@@ -1122,7 +1151,7 @@ var runCommandTool = createTool(
1122
1151
  type: "function",
1123
1152
  function: {
1124
1153
  name: "run_command",
1125
- description: 'Execute a shell command. Returns stdout, stderr, and exit code. Does NOT support trailing "&" for backgrounding \u2014 use background_process tool instead.\nCommands run from your working directory automatically \u2014 do NOT prepend "cd /path/" to change to a directory you are already in. Doing so triggers unnecessary security confirmations.',
1154
+ description: 'Execute a shell command. Returns stdout, stderr, and exit code. Does NOT support trailing "&" for backgrounding \u2014 use background_process tool instead.\nCommands run from your working directory automatically, so prefer relative paths.',
1126
1155
  parameters: {
1127
1156
  type: "object",
1128
1157
  properties: {
@@ -1150,7 +1179,7 @@ var runCommandTool = createTool(
1150
1179
  `Use background_process tool (action: "start") for background/long-running commands instead of '&'. See the tool description for details.`
1151
1180
  );
1152
1181
  }
1153
- const escapeMatch = detectEscapePattern(args.command);
1182
+ const escapeMatch = detectEscapePattern(args.command, context.workdir);
1154
1183
  if (escapeMatch) {
1155
1184
  const desc = `Command "${args.command}" contains workspace escape pattern "${escapeMatch}". Allow this command?`;
1156
1185
  const approved = await requestUserConfirmation(context, "command", desc);
@@ -2607,8 +2636,12 @@ ${CONTINUE_PROMPT}` : CONTINUE_PROMPT;
2607
2636
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens, config.subAgentMetadata?.subAgentId);
2608
2637
  if (!compacting) {
2609
2638
  const contextState2 = sessionManager.getContextState(sessionId);
2610
- const { shouldCompact, appendCompactionPrompt } = await import("./compactor-G7B3V24F.js");
2611
- if (shouldCompact(contextState2.currentTokens, contextState2.maxTokens, runtimeConfig.context.compactionThreshold)) {
2639
+ const { shouldCompact, appendCompactionPrompt } = await import("./compactor-LJFUIKWB.js");
2640
+ if (shouldCompact(
2641
+ contextState2.currentTokens,
2642
+ contextState2.maxTokens,
2643
+ sessionManager.getModelCompactionThreshold(sessionId) ?? runtimeConfig.context.compactionThreshold
2644
+ )) {
2612
2645
  appendCompactionPrompt(sessionId, append);
2613
2646
  compacting = true;
2614
2647
  continue;
@@ -2966,7 +2999,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
2966
2999
  // src/server/context/image-processor.ts
2967
3000
  async function loadVisionModelFromGlobalConfig() {
2968
3001
  try {
2969
- const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-MD74ETY5.js");
3002
+ const { loadGlobalConfig: loadGlobalConfig2, getVisionFallback } = await import("./config-EN3WEH4A.js");
2970
3003
  const runtimeConfig = getRuntimeConfig();
2971
3004
  const mode = runtimeConfig.mode ?? "production";
2972
3005
  const globalConfig = await loadGlobalConfig2(mode);
@@ -3542,7 +3575,7 @@ var callSubAgentTool = {
3542
3575
  };
3543
3576
  }
3544
3577
  try {
3545
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-HGKUD327.js");
3578
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-APH5FLYT.js");
3546
3579
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3547
3580
  const turnMetrics = new TurnMetrics();
3548
3581
  const result = await executeSubAgent({
@@ -4545,7 +4578,7 @@ var mcpConfigTool = createTool(
4545
4578
  mcpNotifyChanged?.(sessionId);
4546
4579
  }
4547
4580
  async function rebuildTools() {
4548
- const { setMcpTools: setMcpTools2 } = await import("./tools-HGKUD327.js");
4581
+ const { setMcpTools: setMcpTools2 } = await import("./tools-APH5FLYT.js");
4549
4582
  const mcpTools = createMcpTools(mcpManagerForTools);
4550
4583
  setMcpTools2(mcpTools);
4551
4584
  }
@@ -5208,4 +5241,4 @@ export {
5208
5241
  getToolRegistryForAgent,
5209
5242
  createToolRegistry
5210
5243
  };
5211
- //# sourceMappingURL=chunk-SGBXBP3S.js.map
5244
+ //# sourceMappingURL=chunk-MAGDRXHW.js.map
@@ -34,7 +34,8 @@ var modelConfigSchema = z.object({
34
34
  temperature: z.number().optional(),
35
35
  topP: z.number().optional(),
36
36
  topK: z.number().optional(),
37
- maxTokens: z.number().optional()
37
+ maxTokens: z.number().optional(),
38
+ compactionThreshold: z.number().min(0).max(0.95).optional()
38
39
  }).passthrough();
39
40
  var providerSchema = z.object({
40
41
  id: z.string(),
@@ -51,24 +52,22 @@ var providerSchema = z.object({
51
52
  authAdapter: z.string().optional(),
52
53
  transportAdapter: z.string().optional(),
53
54
  credentialRef: z.string().optional()
54
- }).transform(
55
- (provider) => ({
56
- id: provider.id,
57
- ...provider.preset ? { preset: provider.preset } : {},
58
- name: provider.name ?? provider.id,
59
- url: provider.url ?? "",
60
- backend: provider.backend ?? "unknown",
61
- ...provider.apiKey ? { apiKey: provider.apiKey } : {},
62
- models: provider.models ?? [],
63
- isActive: provider.isActive ?? false,
64
- createdAt: provider.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
65
- ...provider.isLocal !== void 0 ? { isLocal: provider.isLocal } : {},
66
- ...provider.thinkingField ? { thinkingField: provider.thinkingField } : {},
67
- ...provider.authAdapter ? { authAdapter: provider.authAdapter } : {},
68
- ...provider.transportAdapter ? { transportAdapter: provider.transportAdapter } : {},
69
- ...provider.credentialRef ? { credentialRef: provider.credentialRef } : {}
70
- })
71
- );
55
+ }).transform((provider) => ({
56
+ id: provider.id,
57
+ ...provider.preset ? { preset: provider.preset } : {},
58
+ name: provider.name ?? provider.id,
59
+ url: provider.url ?? "",
60
+ backend: provider.backend ?? "unknown",
61
+ ...provider.apiKey ? { apiKey: provider.apiKey } : {},
62
+ models: provider.models ?? [],
63
+ isActive: provider.isActive ?? false,
64
+ createdAt: provider.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
65
+ ...provider.isLocal !== void 0 ? { isLocal: provider.isLocal } : {},
66
+ ...provider.thinkingField ? { thinkingField: provider.thinkingField } : {},
67
+ ...provider.authAdapter ? { authAdapter: provider.authAdapter } : {},
68
+ ...provider.transportAdapter ? { transportAdapter: provider.transportAdapter } : {},
69
+ ...provider.credentialRef ? { credentialRef: provider.credentialRef } : {}
70
+ }));
72
71
  var serverSchema = z.object({
73
72
  port: z.number().default(10369),
74
73
  host: z.string().default("127.0.0.1"),
@@ -314,4 +313,4 @@ export {
314
313
  removeProvider,
315
314
  activateProvider
316
315
  };
317
- //# sourceMappingURL=chunk-YFVSSMA3.js.map
316
+ //# sourceMappingURL=chunk-NH2PVB6R.js.map
@@ -3,7 +3,7 @@ import {
3
3
  computeSessionHash,
4
4
  runAgentTurn,
5
5
  runChatTurn
6
- } from "./chunk-VGWJFXPR.js";
6
+ } from "./chunk-V77VNKN6.js";
7
7
  import {
8
8
  deleteItemFromDir,
9
9
  devServerManager,
@@ -13,7 +13,7 @@ import {
13
13
  jsonSerializer,
14
14
  loadAllAgentsDefault,
15
15
  saveItemToDir
16
- } from "./chunk-SGBXBP3S.js";
16
+ } from "./chunk-MAGDRXHW.js";
17
17
  import {
18
18
  checkAborted,
19
19
  onProcessEvent,
@@ -28,7 +28,7 @@ import {
28
28
  } from "./chunk-EU3WWTFH.js";
29
29
  import {
30
30
  appendCompactionPrompt
31
- } from "./chunk-WUSWNLTV.js";
31
+ } from "./chunk-LYZ3LQRX.js";
32
32
  import {
33
33
  TurnMetrics,
34
34
  createMessageStartEvent
@@ -48,11 +48,11 @@ import {
48
48
  getCurrentContextWindowId,
49
49
  getEventStore,
50
50
  getRuntimeConfig
51
- } from "./chunk-M7EFXRDS.js";
51
+ } from "./chunk-BUXIESO5.js";
52
52
  import {
53
53
  buildMessagesFromStoredEvents,
54
54
  foldPendingConfirmations
55
- } from "./chunk-TSVFRWSG.js";
55
+ } from "./chunk-A2IZ4PWQ.js";
56
56
  import {
57
57
  createChatErrorMessage,
58
58
  createChatMessageMessage,
@@ -2213,4 +2213,4 @@ export {
2213
2213
  signalMcpReady,
2214
2214
  createWebSocketServer
2215
2215
  };
2216
- //# sourceMappingURL=chunk-DI4SIPFT.js.map
2216
+ //# sourceMappingURL=chunk-PXF4KHAP.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.80";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-RJWYZ6KK.js.map
@@ -9,10 +9,10 @@ import {
9
9
  loadAllAgentsDefault,
10
10
  processEventsForConversation,
11
11
  runTopLevelAgentLoop
12
- } from "./chunk-SGBXBP3S.js";
12
+ } from "./chunk-MAGDRXHW.js";
13
13
  import {
14
14
  PathAccessDeniedError
15
- } from "./chunk-NZIYELSQ.js";
15
+ } from "./chunk-4GMRZU7A.js";
16
16
  import {
17
17
  TurnMetrics,
18
18
  buildAgentReminder,
@@ -26,10 +26,10 @@ import {
26
26
  getCurrentWindowMessageOptions,
27
27
  getEventStore,
28
28
  getRuntimeConfig
29
- } from "./chunk-M7EFXRDS.js";
29
+ } from "./chunk-BUXIESO5.js";
30
30
  import {
31
31
  buildSnapshotFromSessionState
32
- } from "./chunk-TSVFRWSG.js";
32
+ } from "./chunk-A2IZ4PWQ.js";
33
33
  import {
34
34
  logger
35
35
  } from "./chunk-K44MW7JJ.js";
@@ -66,7 +66,7 @@ function resolveAgentDef(sessionManager, sessionId) {
66
66
  }
67
67
  async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
68
68
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
69
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-HGKUD327.js");
69
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-APH5FLYT.js");
70
70
  const tools = getToolRegistryForAgent2(agentDef).definitions;
71
71
  const toolFingerprint = getToolFingerprint(tools);
72
72
  const allAgents = await loadAllAgentsDefault();
@@ -79,7 +79,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
79
79
  async function computeSessionHash(sessionManager, sessionId) {
80
80
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
81
81
  const agentDef = await resolveAgentDef(sessionManager, sessionId);
82
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-HGKUD327.js");
82
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-APH5FLYT.js");
83
83
  const tools = getToolRegistryForAgent2(agentDef).definitions;
84
84
  const toolFingerprint = getToolFingerprint(tools);
85
85
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -371,4 +371,4 @@ export {
371
371
  runChatTurn,
372
372
  runAgentTurn
373
373
  };
374
- //# sourceMappingURL=chunk-VGWJFXPR.js.map
374
+ //# sourceMappingURL=chunk-V77VNKN6.js.map