openfox 1.6.81 → 1.6.83

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 (39) hide show
  1. package/dist/{auto-compaction-JSO3ZWSE.js → auto-compaction-YKNSXB3B.js} +8 -8
  2. package/dist/{chat-handler-RN662HKM.js → chat-handler-XORXAICJ.js} +11 -11
  3. package/dist/{chunk-2MHHSLNY.js → chunk-3Y3HDOT3.js} +41 -36
  4. package/dist/{chunk-NDJ6FKSP.js → chunk-4VT74LCD.js} +1 -1
  5. package/dist/{chunk-WR6QCJJO.js → chunk-6GGYIEBM.js} +10 -8
  6. package/dist/{chunk-A5W6JUYZ.js → chunk-6GH2PJJC.js} +4 -4
  7. package/dist/{chunk-LHKXWUEK.js → chunk-6THJULLK.js} +17 -6
  8. package/dist/{chunk-6FOC2GAY.js → chunk-AET6LELP.js} +6 -6
  9. package/dist/{chunk-UF6D2IPO.js → chunk-GN7RB4Y4.js} +3 -3
  10. package/dist/{chunk-TGWEH2BC.js → chunk-JDDNBK6T.js} +5 -9
  11. package/dist/{chunk-42TLGPX4.js → chunk-NAONQLLT.js} +104 -47
  12. package/dist/{chunk-UKMRZDWM.js → chunk-TLOL4I7K.js} +3 -3
  13. package/dist/{chunk-BSTVRSV6.js → chunk-WSRF5L3S.js} +2 -2
  14. package/dist/{chunk-TS5XFQ2D.js → chunk-XVWVAWSG.js} +1 -1
  15. package/dist/{chunk-CUDAT6SS.js → chunk-YNIAFX24.js} +5 -5
  16. package/dist/{chunk-SJHWJAJA.js → chunk-ZSTL3GO6.js} +4 -4
  17. package/dist/cli/dev.js +1 -1
  18. package/dist/cli/index.js +1 -1
  19. package/dist/{config-5CONAOL7.js → config-HMMPXQ46.js} +5 -5
  20. package/dist/{events-QDUOJQML.js → events-H563T5M5.js} +3 -3
  21. package/dist/{folding-XIKR6AFM.js → folding-4VHGQE6Y.js} +2 -2
  22. package/dist/{orchestrator-NJHSRHZI.js → orchestrator-4YKFENVV.js} +9 -9
  23. package/dist/package.json +1 -1
  24. package/dist/{processor-3A32D5MI.js → processor-I2NXOFPC.js} +7 -7
  25. package/dist/{protocol-4xbfAlGO.d.ts → protocol-DEXfLRbe.d.ts} +3 -1
  26. package/dist/{protocol-IXFNYZEX.js → protocol-NEBXAMJ3.js} +3 -3
  27. package/dist/{provider-ESEBV3LL.js → provider-LDZFYLK6.js} +7 -7
  28. package/dist/{serve-D4NO4GJF.js → serve-IED7B4A5.js} +13 -13
  29. package/dist/server/index.d.ts +2 -1
  30. package/dist/server/index.js +11 -11
  31. package/dist/shared/index.d.ts +2 -2
  32. package/dist/shared/index.js +1 -1
  33. package/dist/{tools-Y3S6BHBZ.js → tools-RGERQUMC.js} +8 -8
  34. package/dist/{vision-fallback-ED27LH6C.js → vision-fallback-WT66NURB.js} +2 -2
  35. package/dist/web/assets/{index-D4Si0Pmc.css → index-CA0bz_5H.css} +1 -1
  36. package/dist/web/assets/{index-DuIE79t4.js → index-DmpkTC-2.js} +50 -47
  37. package/dist/web/index.html +2 -2
  38. package/dist/web/sw.js +1 -1
  39. package/package.json +1 -1
@@ -28,11 +28,11 @@ import {
28
28
  getBackendCapabilities,
29
29
  getModelProfile,
30
30
  streamWithSegments
31
- } from "./chunk-CUDAT6SS.js";
31
+ } from "./chunk-YNIAFX24.js";
32
32
  import {
33
33
  getCurrentContextWindowId,
34
34
  getEventStore
35
- } from "./chunk-LHKXWUEK.js";
35
+ } from "./chunk-6THJULLK.js";
36
36
  import {
37
37
  buildContextMessagesFromEventHistory,
38
38
  foldContextState,
@@ -41,16 +41,15 @@ import {
41
41
  handleToolCall,
42
42
  handleToolResult,
43
43
  stripOrphanedToolCalls
44
- } from "./chunk-TS5XFQ2D.js";
44
+ } from "./chunk-XVWVAWSG.js";
45
45
  import {
46
46
  createChatDoneMessage,
47
47
  createChatMessageMessage,
48
48
  createChatMessageUpdatedMessage,
49
49
  createChatPathConfirmationMessage,
50
- createChatToolOutputMessage,
51
50
  createChatVisionFallbackMessage,
52
51
  createQueueStateMessage
53
- } from "./chunk-UF6D2IPO.js";
52
+ } from "./chunk-GN7RB4Y4.js";
54
53
  import {
55
54
  AskUserInterrupt,
56
55
  askUserTool
@@ -570,7 +569,8 @@ function createEmptyStreamResult(aborted, xmlFormatError, modelParams) {
570
569
  timing: { ttft: 0, completionTime: 0, tps: 0, prefillTps: 0 },
571
570
  aborted,
572
571
  xmlFormatError,
573
- modelParams
572
+ modelParams,
573
+ finishReason: "stop"
574
574
  };
575
575
  }
576
576
  async function* streamLLMPure(options) {
@@ -710,7 +710,7 @@ async function* streamLLMPure(options) {
710
710
  const unescaped = delta.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\"/g, '"').replace(/\\\\/g, "\\");
711
711
  yield {
712
712
  type: "tool.output",
713
- data: { toolCallId, stream: "stdout", content: unescaped }
713
+ data: { messageId, toolCallId, stream: "stdout", content: unescaped }
714
714
  };
715
715
  }
716
716
  }
@@ -755,7 +755,8 @@ async function* streamLLMPure(options) {
755
755
  timing: result.timing,
756
756
  aborted,
757
757
  xmlFormatError,
758
- modelParams
758
+ modelParams,
759
+ finishReason: result.response.finishReason
759
760
  };
760
761
  if (result.thinkingContent) {
761
762
  baseResult.thinkingContent = result.thinkingContent;
@@ -2651,11 +2652,14 @@ function parseProgressMessage(message) {
2651
2652
  content: match[2]
2652
2653
  };
2653
2654
  }
2654
- function createToolProgressHandler(messageId, callId, onMessage) {
2655
+ function createToolProgressHandler(eventStore, messageId, callId, sessionId) {
2655
2656
  return (message) => {
2656
2657
  const parsed = parseProgressMessage(message);
2657
2658
  if (!parsed) return;
2658
- onMessage(createChatToolOutputMessage(messageId, callId, parsed.content, parsed.stream));
2659
+ eventStore.append(sessionId, {
2660
+ type: "tool.output",
2661
+ data: { messageId, toolCallId: callId, stream: parsed.stream, content: parsed.content }
2662
+ });
2659
2663
  };
2660
2664
  }
2661
2665
 
@@ -2953,6 +2957,35 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
2953
2957
  for (const toolCall of toolCalls) {
2954
2958
  eventStore.append(ctx.sessionId, createToolCallEvent(assistantMsgId, toolCall));
2955
2959
  }
2960
+ const handleToolExecutionError = async (error, sessionId, startTime) => {
2961
+ if (error instanceof PathAccessDeniedError) {
2962
+ return {
2963
+ success: false,
2964
+ error: `User denied access to ${error.paths.join(", ")}. If you need this file, explain why and ask for permission.`,
2965
+ durationMs: Date.now() - startTime,
2966
+ truncated: false
2967
+ };
2968
+ } else if (error instanceof AskUserInterrupt) {
2969
+ eventStore.append(sessionId, {
2970
+ type: "chat.ask_user",
2971
+ data: { callId: error.callId, question: error.question }
2972
+ });
2973
+ const { awaitAnswer } = await import("./ask-5SSOA6SZ.js");
2974
+ const answerPromise = awaitAnswer(error.callId);
2975
+ if (!answerPromise) {
2976
+ throw new Error(`No pending question found for callId: ${error.callId}`);
2977
+ }
2978
+ const answer = await answerPromise;
2979
+ return {
2980
+ success: true,
2981
+ output: answer,
2982
+ durationMs: Date.now() - startTime,
2983
+ truncated: false
2984
+ };
2985
+ } else {
2986
+ throw error;
2987
+ }
2988
+ };
2956
2989
  const executeTool = async (toolCall, index) => {
2957
2990
  if (ctx.signal?.aborted) {
2958
2991
  throw new Error("Aborted");
@@ -2965,16 +2998,15 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
2965
2998
  truncated: false
2966
2999
  };
2967
3000
  ctx.turnMetrics.addToolTime(toolResult2.durationMs);
2968
- const event = createToolResultEvent(assistantMsgId, toolCall.id, toolResult2);
3001
+ eventStore.append(ctx.sessionId, createToolResultEvent(assistantMsgId, toolCall.id, toolResult2));
2969
3002
  return {
2970
3003
  toolCall,
2971
3004
  toolResult: toolResult2,
2972
3005
  content: `Error: ${toolResult2.error}`,
2973
- index,
2974
- event
3006
+ index
2975
3007
  };
2976
3008
  }
2977
- const onProgress = ctx.onMessage ? createToolProgressHandler(assistantMsgId, toolCall.id, ctx.onMessage) : void 0;
3009
+ const onProgress = ctx.onMessage ? createToolProgressHandler(eventStore, assistantMsgId, toolCall.id, ctx.sessionId) : void 0;
2978
3010
  const toolContext = {
2979
3011
  sessionManager: ctx.sessionManager,
2980
3012
  workdir: ctx.workdir,
@@ -2990,37 +3022,12 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
2990
3022
  if (ctx.dangerLevel) {
2991
3023
  toolContext.dangerLevel = ctx.dangerLevel;
2992
3024
  }
3025
+ const startTime = Date.now();
2993
3026
  let toolResult;
2994
3027
  try {
2995
3028
  toolResult = await ctx.toolRegistry.execute(toolCall.name, toolCall.arguments, toolContext);
2996
3029
  } catch (error) {
2997
- if (error instanceof PathAccessDeniedError) {
2998
- toolResult = {
2999
- success: false,
3000
- error: `User denied access to ${error.paths.join(", ")}. If you need this file, explain why and ask for permission.`,
3001
- durationMs: 0,
3002
- truncated: false
3003
- };
3004
- } else if (error instanceof AskUserInterrupt) {
3005
- eventStore.append(ctx.sessionId, {
3006
- type: "chat.ask_user",
3007
- data: { callId: error.callId, question: error.question }
3008
- });
3009
- const { awaitAnswer } = await import("./ask-5SSOA6SZ.js");
3010
- const answerPromise = awaitAnswer(error.callId);
3011
- if (!answerPromise) {
3012
- throw new Error(`No pending question found for callId: ${error.callId}`);
3013
- }
3014
- const answer = await answerPromise;
3015
- toolResult = {
3016
- success: true,
3017
- output: answer,
3018
- durationMs: 0,
3019
- truncated: false
3020
- };
3021
- } else {
3022
- throw error;
3023
- }
3030
+ toolResult = await handleToolExecutionError(error, ctx.sessionId, startTime);
3024
3031
  }
3025
3032
  ctx.turnMetrics.addToolTime(toolResult.durationMs);
3026
3033
  ctx.onToolExecuted?.(toolCall, toolResult);
@@ -3033,19 +3040,18 @@ async function executeToolBatch(assistantMsgId, toolCalls, ctx) {
3033
3040
 
3034
3041
  Error: ${toolResult.error}` : `Error: ${toolResult.error}`
3035
3042
  );
3043
+ eventStore.append(ctx.sessionId, createToolResultEvent(assistantMsgId, toolCall.id, toolResult));
3036
3044
  return {
3037
3045
  toolCall,
3038
3046
  toolResult,
3039
3047
  content,
3040
- index,
3041
- event: createToolResultEvent(assistantMsgId, toolCall.id, toolResult)
3048
+ index
3042
3049
  };
3043
3050
  };
3044
3051
  const executionPromises = toolCalls.map((toolCall, index) => executeTool(toolCall, index));
3045
3052
  const results = await Promise.all(executionPromises);
3046
3053
  results.sort((a, b) => a.index - b.index);
3047
3054
  for (const result of results) {
3048
- eventStore.append(ctx.sessionId, result.event);
3049
3055
  toolMessages.push({
3050
3056
  role: "tool",
3051
3057
  content: result.content,
@@ -3061,13 +3067,16 @@ Error: ${toolResult.error}` : `Error: ${toolResult.error}`
3061
3067
  return { toolMessages, criteriaChanged, returnValueContent, returnValueResult };
3062
3068
  }
3063
3069
  var MAX_FORMAT_RETRIES = 10;
3070
+ var MAX_TRUNCATION_RETRIES = 3;
3064
3071
  var FORMAT_CORRECTION_PROMPT2 = `IMPORTANT: You MUST use the JSON function calling API. Do NOT output XML tags like <function=>, <parameter=>, or <invoke=>. Your previous attempt was stopped because you used the wrong format. Use the proper tool_calls format.`;
3065
3072
  async function runTopLevelAgentLoop(config, turnMetrics) {
3066
3073
  const { mode, sessionManager, sessionId, llmClient, signal, onMessage, statsIdentity } = config;
3067
3074
  const eventStore = getEventStore();
3068
3075
  let formatRetryCount = 0;
3076
+ let truncationRetryCount = 0;
3069
3077
  let returnValueContent;
3070
3078
  let returnValueResult;
3079
+ let currentMaxTokensOverride;
3071
3080
  for (; ; ) {
3072
3081
  await maybeAutoCompactContext({
3073
3082
  sessionManager,
@@ -3155,7 +3164,7 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
3155
3164
  createChatVisionFallbackMessage({ type: "done", messageId: assistantMsgId, attachmentId, description })
3156
3165
  );
3157
3166
  };
3158
- const modelSettings = sessionManager.getCurrentModelSettings();
3167
+ const modelSettings = currentMaxTokensOverride !== void 0 ? { ...sessionManager.getCurrentModelSettings(), maxTokens: currentMaxTokensOverride } : sessionManager.getCurrentModelSettings();
3159
3168
  const streamGen = streamLLMPure({
3160
3169
  messageId: assistantMsgId,
3161
3170
  systemPrompt: assembledRequest.systemPrompt,
@@ -3198,6 +3207,54 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
3198
3207
  }
3199
3208
  turnMetrics.addLLMCall(result.timing, result.usage.promptTokens, result.usage.completionTokens, result.modelParams);
3200
3209
  sessionManager.setCurrentContextSize(sessionId, result.usage.promptTokens);
3210
+ if (result.finishReason === "length" && result.toolCalls.length === 0) {
3211
+ if (truncationRetryCount < MAX_TRUNCATION_RETRIES) {
3212
+ truncationRetryCount += 1;
3213
+ const currentMaxTokens = result.modelParams?.maxTokens ?? 16384;
3214
+ const promptTokens = result.usage.promptTokens;
3215
+ const contextWindow = sessionManager.getCurrentModelContext();
3216
+ const newMaxTokens = Math.min(Math.floor(currentMaxTokens * 1.5), contextWindow - promptTokens - 2048);
3217
+ currentMaxTokensOverride = newMaxTokens;
3218
+ const interimStats = turnMetrics.buildStats(statsIdentity, mode);
3219
+ eventStore.append(
3220
+ sessionId,
3221
+ createMessageDoneEvent(assistantMsgId, {
3222
+ segments: result.segments,
3223
+ stats: interimStats,
3224
+ promptContext: assembledRequest.promptContext
3225
+ })
3226
+ );
3227
+ onMessage?.(createChatMessageUpdatedMessage(assistantMsgId, { isStreaming: false }));
3228
+ const continueMsgId = crypto.randomUUID();
3229
+ eventStore.append(
3230
+ sessionId,
3231
+ createMessageStartEvent(
3232
+ continueMsgId,
3233
+ "user",
3234
+ "Continue your previous response exactly where you left off.",
3235
+ {
3236
+ ...currentWindowMessageOptions ?? {},
3237
+ isSystemGenerated: true
3238
+ }
3239
+ )
3240
+ );
3241
+ eventStore.append(sessionId, { type: "message.done", data: { messageId: continueMsgId } });
3242
+ continue;
3243
+ } else {
3244
+ const stats2 = turnMetrics.buildStats(statsIdentity, mode);
3245
+ eventStore.append(
3246
+ sessionId,
3247
+ createMessageDoneEvent(assistantMsgId, {
3248
+ segments: result.segments,
3249
+ stats: stats2,
3250
+ partial: true,
3251
+ promptContext: assembledRequest.promptContext
3252
+ })
3253
+ );
3254
+ eventStore.append(sessionId, createChatDoneEvent(assistantMsgId, "truncated", stats2));
3255
+ break;
3256
+ }
3257
+ }
3201
3258
  if (result.toolCalls.length > 0) {
3202
3259
  eventStore.append(
3203
3260
  sessionId,
@@ -3701,7 +3758,7 @@ var callSubAgentTool = {
3701
3758
  };
3702
3759
  }
3703
3760
  try {
3704
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-Y3S6BHBZ.js");
3761
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-RGERQUMC.js");
3705
3762
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3706
3763
  const turnMetrics = new TurnMetrics();
3707
3764
  const result = await executeSubAgent({
@@ -4890,4 +4947,4 @@ export {
4890
4947
  getToolRegistryForAgent,
4891
4948
  createToolRegistry
4892
4949
  };
4893
- //# sourceMappingURL=chunk-42TLGPX4.js.map
4950
+ //# sourceMappingURL=chunk-NAONQLLT.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  detectModel
3
- } from "./chunk-TGWEH2BC.js";
3
+ } from "./chunk-JDDNBK6T.js";
4
4
  import {
5
5
  detectBackend
6
- } from "./chunk-CUDAT6SS.js";
6
+ } from "./chunk-YNIAFX24.js";
7
7
  import {
8
8
  getGlobalConfigPath
9
9
  } from "./chunk-CQGTEGKL.js";
@@ -435,4 +435,4 @@ export {
435
435
  activateProvider,
436
436
  mergeConfigs
437
437
  };
438
- //# sourceMappingURL=chunk-UKMRZDWM.js.map
438
+ //# sourceMappingURL=chunk-TLOL4I7K.js.map
@@ -29,7 +29,7 @@ function isVisionFallbackEnabled() {
29
29
  async function ensureVisionFallbackConfigLoaded() {
30
30
  if (configLoaded) return;
31
31
  try {
32
- const { loadGlobalConfig, getVisionFallback } = await import("./config-5CONAOL7.js");
32
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-HMMPXQ46.js");
33
33
  const { getRuntimeConfig } = await import("./runtime-config-CBJJJGBD.js");
34
34
  const runtimeConfig = getRuntimeConfig();
35
35
  const mode = runtimeConfig.mode ?? "production";
@@ -137,4 +137,4 @@ export {
137
137
  describeImage,
138
138
  describeImageFromDataUrl
139
139
  };
140
- //# sourceMappingURL=chunk-BSTVRSV6.js.map
140
+ //# sourceMappingURL=chunk-WSRF5L3S.js.map
@@ -880,4 +880,4 @@ export {
880
880
  getMessagesForWindow,
881
881
  buildContextMessagesFromMessages
882
882
  };
883
- //# sourceMappingURL=chunk-TS5XFQ2D.js.map
883
+ //# sourceMappingURL=chunk-XVWVAWSG.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeImageFromDataUrl
3
- } from "./chunk-BSTVRSV6.js";
3
+ } from "./chunk-WSRF5L3S.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-K44MW7JJ.js";
@@ -595,9 +595,9 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
595
595
  onVisionFallbackStart,
596
596
  onVisionFallbackDone
597
597
  );
598
- const temperature = request.temperature ?? profile.temperature;
599
- const maxTokens = request.maxTokens ?? profile.defaultMaxTokens;
600
- const topP = profile.topP;
598
+ const temperature = request.modelSettings?.temperature ?? request.temperature ?? profile.temperature;
599
+ const maxTokens = request.modelSettings?.maxTokens ?? request.maxTokens ?? profile.defaultMaxTokens;
600
+ const topP = request.modelSettings?.topP ?? profile.topP;
601
601
  const topK = capabilities.supportsTopK ? profile.topK : void 0;
602
602
  const params = {
603
603
  model,
@@ -801,4 +801,4 @@ export {
801
801
  extractThinking,
802
802
  streamWithSegments
803
803
  };
804
- //# sourceMappingURL=chunk-CUDAT6SS.js.map
804
+ //# sourceMappingURL=chunk-YNIAFX24.js.map
@@ -13,14 +13,14 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-42TLGPX4.js";
16
+ } from "./chunk-NAONQLLT.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
20
- } from "./chunk-LHKXWUEK.js";
20
+ } from "./chunk-6THJULLK.js";
21
21
  import {
22
22
  buildSnapshotFromSessionState
23
- } from "./chunk-TS5XFQ2D.js";
23
+ } from "./chunk-XVWVAWSG.js";
24
24
  import {
25
25
  logger
26
26
  } from "./chunk-K44MW7JJ.js";
@@ -327,4 +327,4 @@ export {
327
327
  runBuilderTurn,
328
328
  runVerifierTurn
329
329
  };
330
- //# sourceMappingURL=chunk-SJHWJAJA.js.map
330
+ //# sourceMappingURL=chunk-ZSTL3GO6.js.map
package/dist/cli/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-6FOC2GAY.js";
4
+ } from "../chunk-AET6LELP.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-6FOC2GAY.js";
4
+ } from "../chunk-AET6LELP.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
@@ -13,11 +13,11 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  trySmartDefaults
16
- } from "./chunk-UKMRZDWM.js";
17
- import "./chunk-TGWEH2BC.js";
18
- import "./chunk-CUDAT6SS.js";
16
+ } from "./chunk-TLOL4I7K.js";
17
+ import "./chunk-JDDNBK6T.js";
18
+ import "./chunk-YNIAFX24.js";
19
19
  import "./chunk-CQGTEGKL.js";
20
- import "./chunk-BSTVRSV6.js";
20
+ import "./chunk-WSRF5L3S.js";
21
21
  import "./chunk-K44MW7JJ.js";
22
22
  export {
23
23
  activateProvider,
@@ -35,4 +35,4 @@ export {
35
35
  setDefaultModelSelection,
36
36
  trySmartDefaults
37
37
  };
38
- //# sourceMappingURL=config-5CONAOL7.js.map
38
+ //# sourceMappingURL=config-HMMPXQ46.js.map
@@ -37,7 +37,7 @@ import {
37
37
  isStoredEvent,
38
38
  isTurnEvent,
39
39
  truncateSessionMessages
40
- } from "./chunk-LHKXWUEK.js";
40
+ } from "./chunk-6THJULLK.js";
41
41
  import "./chunk-KIOUKC3Z.js";
42
42
  import {
43
43
  buildContextMessagesFromEventHistory,
@@ -55,7 +55,7 @@ import {
55
55
  foldTodos,
56
56
  foldTurnEventsToSnapshotMessages,
57
57
  getMessagesForWindow
58
- } from "./chunk-TS5XFQ2D.js";
58
+ } from "./chunk-XVWVAWSG.js";
59
59
  import "./chunk-B5AP3RSV.js";
60
60
  import "./chunk-K44MW7JJ.js";
61
61
  export {
@@ -113,4 +113,4 @@ export {
113
113
  isTurnEvent,
114
114
  truncateSessionMessages
115
115
  };
116
- //# sourceMappingURL=events-QDUOJQML.js.map
116
+ //# sourceMappingURL=events-H563T5M5.js.map
@@ -22,7 +22,7 @@ import {
22
22
  handleToolResult,
23
23
  spreadOptionalMessageFields,
24
24
  stripOrphanedToolCalls
25
- } from "./chunk-TS5XFQ2D.js";
25
+ } from "./chunk-XVWVAWSG.js";
26
26
  export {
27
27
  buildContextMessagesFromEventHistory,
28
28
  buildContextMessagesFromMessages,
@@ -48,4 +48,4 @@ export {
48
48
  spreadOptionalMessageFields,
49
49
  stripOrphanedToolCalls
50
50
  };
51
- //# sourceMappingURL=folding-XIKR6AFM.js.map
51
+ //# sourceMappingURL=folding-4VHGQE6Y.js.map
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-SJHWJAJA.js";
6
+ } from "./chunk-ZSTL3GO6.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,22 +11,22 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-42TLGPX4.js";
14
+ } from "./chunk-NAONQLLT.js";
15
15
  import "./chunk-OXI26S7U.js";
16
16
  import "./chunk-CMQCO27Y.js";
17
17
  import "./chunk-DL6ZILAF.js";
18
18
  import "./chunk-PBGOZMVY.js";
19
19
  import "./chunk-VRGRAQDG.js";
20
- import "./chunk-CUDAT6SS.js";
21
- import "./chunk-LHKXWUEK.js";
20
+ import "./chunk-YNIAFX24.js";
21
+ import "./chunk-6THJULLK.js";
22
22
  import "./chunk-KIOUKC3Z.js";
23
- import "./chunk-TS5XFQ2D.js";
24
- import "./chunk-UF6D2IPO.js";
23
+ import "./chunk-XVWVAWSG.js";
24
+ import "./chunk-GN7RB4Y4.js";
25
25
  import "./chunk-BJYPTN5S.js";
26
- import "./chunk-NDJ6FKSP.js";
26
+ import "./chunk-4VT74LCD.js";
27
27
  import "./chunk-CQGTEGKL.js";
28
28
  import "./chunk-B5AP3RSV.js";
29
- import "./chunk-BSTVRSV6.js";
29
+ import "./chunk-WSRF5L3S.js";
30
30
  import "./chunk-K44MW7JJ.js";
31
31
  export {
32
32
  TurnMetrics,
@@ -40,4 +40,4 @@ export {
40
40
  runChatTurn,
41
41
  runVerifierTurn
42
42
  };
43
- //# sourceMappingURL=orchestrator-NJHSRHZI.js.map
43
+ //# sourceMappingURL=orchestrator-4YKFENVV.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.81",
3
+ "version": "1.6.83",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,17 +5,17 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-A5W6JUYZ.js";
8
+ } from "./chunk-6GH2PJJC.js";
9
9
  import {
10
10
  getEventStore
11
- } from "./chunk-LHKXWUEK.js";
11
+ } from "./chunk-6THJULLK.js";
12
12
  import "./chunk-KIOUKC3Z.js";
13
- import "./chunk-TS5XFQ2D.js";
13
+ import "./chunk-XVWVAWSG.js";
14
14
  import {
15
15
  createChatMessageMessage,
16
16
  createSessionRunningMessage
17
- } from "./chunk-UF6D2IPO.js";
18
- import "./chunk-NDJ6FKSP.js";
17
+ } from "./chunk-GN7RB4Y4.js";
18
+ import "./chunk-4VT74LCD.js";
19
19
  import "./chunk-B5AP3RSV.js";
20
20
  import {
21
21
  logger
@@ -177,7 +177,7 @@ var QueueProcessor = class {
177
177
  backend: provider?.backend ?? llmClient.getBackend(),
178
178
  model: llmClient.getModel()
179
179
  };
180
- const { runChatTurn } = await import("./orchestrator-NJHSRHZI.js");
180
+ const { runChatTurn } = await import("./orchestrator-4YKFENVV.js");
181
181
  const runChatTurnParams = buildRunChatTurnParams({
182
182
  sessionManager,
183
183
  sessionId,
@@ -221,4 +221,4 @@ var QueueProcessor = class {
221
221
  export {
222
222
  QueueProcessor
223
223
  };
224
- //# sourceMappingURL=processor-3A32D5MI.js.map
224
+ //# sourceMappingURL=processor-I2NXOFPC.js.map
@@ -256,6 +256,7 @@ interface Message {
256
256
  segments?: MessageSegment[];
257
257
  stats?: MessageStats;
258
258
  partial?: boolean;
259
+ completeReason?: 'complete' | 'stopped' | 'error' | 'waiting_for_user' | 'truncated';
259
260
  isSystemGenerated?: boolean;
260
261
  isStreaming?: boolean;
261
262
  messageKind?: 'correction' | 'auto-prompt' | 'context-reset' | 'task-completed' | 'workflow-started' | 'command';
@@ -436,6 +437,7 @@ interface Provider {
436
437
  models: ModelConfig[];
437
438
  isActive: boolean;
438
439
  createdAt: string;
440
+ status?: 'connected' | 'disconnected' | 'unknown';
439
441
  }
440
442
  interface Config {
441
443
  llm: {
@@ -622,7 +624,7 @@ interface ChatMessageUpdatedPayload {
622
624
  }
623
625
  interface ChatDonePayload {
624
626
  messageId: string;
625
- reason: 'complete' | 'stopped' | 'error' | 'waiting_for_user';
627
+ reason: 'complete' | 'stopped' | 'error' | 'waiting_for_user' | 'truncated';
626
628
  agentType?: 'sub-agent';
627
629
  stats?: {
628
630
  model: string;
@@ -35,8 +35,8 @@ import {
35
35
  parseClientMessage,
36
36
  serializeServerMessage,
37
37
  storedEventToServerMessage
38
- } from "./chunk-UF6D2IPO.js";
39
- import "./chunk-NDJ6FKSP.js";
38
+ } from "./chunk-GN7RB4Y4.js";
39
+ import "./chunk-4VT74LCD.js";
40
40
  export {
41
41
  createChatAskUserMessage,
42
42
  createChatDeltaMessage,
@@ -75,4 +75,4 @@ export {
75
75
  serializeServerMessage,
76
76
  storedEventToServerMessage
77
77
  };
78
- //# sourceMappingURL=protocol-IXFNYZEX.js.map
78
+ //# sourceMappingURL=protocol-NEBXAMJ3.js.map
@@ -5,18 +5,18 @@ import {
5
5
  loadGlobalConfig,
6
6
  removeProvider,
7
7
  saveGlobalConfig
8
- } from "./chunk-UKMRZDWM.js";
8
+ } from "./chunk-TLOL4I7K.js";
9
9
  import {
10
10
  fetchAvailableModelsFromBackend
11
- } from "./chunk-WR6QCJJO.js";
11
+ } from "./chunk-6GGYIEBM.js";
12
12
  import {
13
13
  detectModel
14
- } from "./chunk-TGWEH2BC.js";
14
+ } from "./chunk-JDDNBK6T.js";
15
15
  import {
16
16
  detectBackend
17
- } from "./chunk-CUDAT6SS.js";
17
+ } from "./chunk-YNIAFX24.js";
18
18
  import "./chunk-CQGTEGKL.js";
19
- import "./chunk-BSTVRSV6.js";
19
+ import "./chunk-WSRF5L3S.js";
20
20
  import "./chunk-K44MW7JJ.js";
21
21
 
22
22
  // src/cli/provider.ts
@@ -248,7 +248,7 @@ async function runProviderAdd(mode) {
248
248
  isActive: makeActive
249
249
  });
250
250
  if (makeActive) {
251
- const { setDefaultModelSelection } = await import("./config-5CONAOL7.js");
251
+ const { setDefaultModelSelection } = await import("./config-HMMPXQ46.js");
252
252
  newConfig = setDefaultModelSelection(
253
253
  newConfig,
254
254
  newConfig.providers[newConfig.providers.length - 1].id,
@@ -376,4 +376,4 @@ export {
376
376
  runProviderRemove,
377
377
  runProviderUse
378
378
  };
379
- //# sourceMappingURL=provider-ESEBV3LL.js.map
379
+ //# sourceMappingURL=provider-LDZFYLK6.js.map