openfox 2.0.0-beta.1 → 2.0.0-beta.11

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 (49) hide show
  1. package/dist/agent-defaults/code-reviewer.agent.md +2 -1
  2. package/dist/{chat-handler-IVIWOR3D.js → chat-handler-NMJCOCCB.js} +14 -27
  3. package/dist/{chunk-ZLUBZ4K4.js → chunk-4RLDN2LL.js} +222 -106
  4. package/dist/{chunk-CEZNMLOO.js → chunk-7TTEGAO6.js} +12 -13
  5. package/dist/chunk-BU56QFHW.js +315 -0
  6. package/dist/{chunk-FQLK5GL5.js → chunk-BVHFMAVN.js} +1 -1
  7. package/dist/{chunk-RF2JGDSS.js → chunk-DMH6JVPF.js} +13 -10
  8. package/dist/{chunk-ALH4KM2Y.js → chunk-EQQDA4D3.js} +2967 -3248
  9. package/dist/{chunk-QFSSKIQ3.js → chunk-EXYMWI7A.js} +4 -4
  10. package/dist/{chunk-NNEHZT3V.js → chunk-EZUR7OEP.js} +11 -3
  11. package/dist/{chunk-NONI4CRP.js → chunk-ITWVFGFV.js} +5 -61
  12. package/dist/{chunk-4U4CSRBE.js → chunk-LCRJWUW7.js} +6 -6
  13. package/dist/{chunk-XKR3HCAL.js → chunk-NSBYORD5.js} +177 -34
  14. package/dist/{chunk-PSJIT5LZ.js → chunk-RFNEDBVO.js} +4 -4
  15. package/dist/chunk-RI6GAMNP.js +13 -0
  16. package/dist/{chunk-HHAJ3QF6.js → chunk-UKTPL5ZG.js} +16 -28
  17. package/dist/{chunk-HGAMIPFO.js → chunk-VIIRNJDT.js} +39 -178
  18. package/dist/cli/dev.js +1 -1
  19. package/dist/cli/index.js +1 -1
  20. package/dist/compactor-TDNRM3A7.js +9 -0
  21. package/dist/{config-YU7NYZYG.js → config-TDVA7MQN.js} +9 -8
  22. package/dist/{events-OHJWCI3S.js → events-UGTGGFG3.js} +8 -7
  23. package/dist/{folding-U6UHQAS5.js → folding-YOCGTZYH.js} +2 -2
  24. package/dist/{orchestrator-7ZXM4J22.js → orchestrator-75L5UGDU.js} +18 -22
  25. package/dist/package.json +1 -1
  26. package/dist/{processor-TKBJLQ2N.js → processor-GHESQ2YV.js} +8 -9
  27. package/dist/{protocol-BQ12Aw5J.d.ts → protocol-B9R1CUvt.d.ts} +14 -39
  28. package/dist/{protocol-K62EPEGS.js → protocol-CN24IKQN.js} +3 -5
  29. package/dist/{provider-HTJEB3ON.js → provider-BGH4MBLH.js} +25 -10
  30. package/dist/{serve-5KA6SSSP.js → serve-I6T7V62Z.js} +25 -26
  31. package/dist/server/index.d.ts +1 -6
  32. package/dist/server/index.js +15 -16
  33. package/dist/{settings-VRAOAPLA.js → settings-6XX56F3F.js} +2 -2
  34. package/dist/shared/index.d.ts +2 -2
  35. package/dist/shared/index.js +1 -1
  36. package/dist/{tools-Z7X4HXZN.js → tools-D3WWIOQD.js} +11 -13
  37. package/dist/web/assets/{index-BY8EbT5Z.css → index-CSOB8dwI.css} +1 -1
  38. package/dist/web/assets/index-tJDr1ODC.js +299 -0
  39. package/dist/web/index.html +2 -2
  40. package/dist/web/sw.js +1 -1
  41. package/dist/workflow-defaults/default.workflow.json +9 -4
  42. package/package.json +1 -1
  43. package/dist/auto-compaction-UIWTO3H5.js +0 -27
  44. package/dist/chunk-CGZHLM3K.js +0 -70
  45. package/dist/chunk-SZKEGZIB.js +0 -140
  46. package/dist/chunk-UFY4I643.js +0 -332
  47. package/dist/runtime-config-NPSPMRDA.js +0 -9
  48. package/dist/vision-fallback-3MIZZ6NQ.js +0 -22
  49. package/dist/web/assets/index-CqOJgw7l.js +0 -299
@@ -1,14 +1,14 @@
1
1
  import {
2
+ buildModelsUrl,
2
3
  buildNonStreamingCreateParams,
3
4
  buildStreamingCreateParams,
5
+ ensureVersionPrefix,
4
6
  extractThinking,
5
7
  getBackendCapabilities,
6
8
  getModelProfile,
7
- mapFinishReason
8
- } from "./chunk-HGAMIPFO.js";
9
- import {
10
- ensureVisionFallbackConfigLoaded
11
- } from "./chunk-SZKEGZIB.js";
9
+ mapFinishReason,
10
+ stripVersionPrefix
11
+ } from "./chunk-VIIRNJDT.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-K44MW7JJ.js";
@@ -19,7 +19,7 @@ var llmStatus = "unknown";
19
19
  var lastActiveUrl = null;
20
20
  var CACHE_TTL_MS = 3e4;
21
21
  function getCacheKey(url) {
22
- return url.replace(/\/v1\/?$/, "");
22
+ return stripVersionPrefix(url);
23
23
  }
24
24
  async function detectModel(llmBaseUrl, retries = 3, silent = false) {
25
25
  const cacheKey = getCacheKey(llmBaseUrl);
@@ -30,7 +30,7 @@ async function detectModel(llmBaseUrl, retries = 3, silent = false) {
30
30
  llmStatus = "connected";
31
31
  return cached.model;
32
32
  }
33
- const url = llmBaseUrl.includes("/v1") ? `${llmBaseUrl}/models` : `${llmBaseUrl}/v1/models`;
33
+ const url = buildModelsUrl(llmBaseUrl);
34
34
  for (let attempt = 1; attempt <= retries; attempt++) {
35
35
  try {
36
36
  if (silent) {
@@ -140,7 +140,7 @@ var LLMError = class extends OpenFoxError {
140
140
 
141
141
  // src/server/llm/client.ts
142
142
  function createLLMClient(config, initialBackend = "unknown") {
143
- const baseURL = config.llm.baseUrl.includes("/v1") ? config.llm.baseUrl : `${config.llm.baseUrl}/v1`;
143
+ const baseURL = ensureVersionPrefix(config.llm.baseUrl);
144
144
  const openai = new OpenAI({
145
145
  baseURL,
146
146
  apiKey: config.llm.apiKey ?? "not-needed"
@@ -187,23 +187,13 @@ function createLLMClient(config, initialBackend = "unknown") {
187
187
  });
188
188
  try {
189
189
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
190
- await ensureVisionFallbackConfigLoaded();
191
- const { isVisionFallbackEnabled } = await import("./vision-fallback-3MIZZ6NQ.js");
192
- const paramsOptions = {
190
+ const { params: createParams } = await buildNonStreamingCreateParams({
193
191
  model,
194
192
  request,
195
193
  profile,
196
194
  capabilities,
197
- disableThinking: shouldDisableThinking,
198
- visionFallbackEnabled: isVisionFallbackEnabled()
199
- };
200
- if (request.onVisionFallbackStart) {
201
- paramsOptions.onVisionFallbackStart = request.onVisionFallbackStart;
202
- }
203
- if (request.onVisionFallbackDone) {
204
- paramsOptions.onVisionFallbackDone = request.onVisionFallbackDone;
205
- }
206
- const { params: createParams } = await buildNonStreamingCreateParams(paramsOptions);
195
+ disableThinking: shouldDisableThinking
196
+ });
207
197
  const response = await openai.chat.completions.create(createParams, {
208
198
  signal: request.signal
209
199
  });
@@ -264,18 +254,13 @@ function createLLMClient(config, initialBackend = "unknown") {
264
254
  idleTimeout
265
255
  });
266
256
  try {
267
- await ensureVisionFallbackConfigLoaded();
268
- const { isVisionFallbackEnabled } = await import("./vision-fallback-3MIZZ6NQ.js");
269
257
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
270
258
  const createParams = await buildStreamingCreateParams({
271
259
  model,
272
260
  request,
273
261
  profile,
274
262
  capabilities,
275
- disableThinking: shouldDisableThinking,
276
- visionFallbackEnabled: isVisionFallbackEnabled(),
277
- onVisionFallbackStart: request.onVisionFallbackStart,
278
- onVisionFallbackDone: request.onVisionFallbackDone
263
+ disableThinking: shouldDisableThinking
279
264
  });
280
265
  const { params: streamingParams } = createParams;
281
266
  const stream = await openai.chat.completions.create(streamingParams, {
@@ -298,6 +283,8 @@ function createLLMClient(config, initialBackend = "unknown") {
298
283
  idleTimeoutController.abort();
299
284
  }
300
285
  }, 100);
286
+ const onAbort = () => clearInterval(idleTimer);
287
+ request.signal?.addEventListener("abort", onAbort, { once: true });
301
288
  try {
302
289
  for await (const chunk of stream) {
303
290
  if (idleTimeoutController.signal.aborted) {
@@ -412,6 +399,7 @@ function createLLMClient(config, initialBackend = "unknown") {
412
399
  }
413
400
  } finally {
414
401
  clearInterval(idleTimer);
402
+ request.signal?.removeEventListener("abort", onAbort);
415
403
  }
416
404
  if (tagBuffer) {
417
405
  if (inThinking) {
@@ -478,4 +466,4 @@ export {
478
466
  getLlmStatus,
479
467
  clearModelCache
480
468
  };
481
- //# sourceMappingURL=chunk-HHAJ3QF6.js.map
469
+ //# sourceMappingURL=chunk-UKTPL5ZG.js.map
@@ -1,10 +1,23 @@
1
- import {
2
- describeImageFromDataUrl
3
- } from "./chunk-SZKEGZIB.js";
4
1
  import {
5
2
  logger
6
3
  } from "./chunk-K44MW7JJ.js";
7
4
 
5
+ // src/server/llm/url-utils.ts
6
+ var VERSION_PREFIX_REGEX = /\/v\d+(\/|$)/;
7
+ function hasVersionPrefix(url) {
8
+ return VERSION_PREFIX_REGEX.test(url);
9
+ }
10
+ function ensureVersionPrefix(url, defaultVersion = "/v1") {
11
+ if (hasVersionPrefix(url)) return url;
12
+ return `${url.replace(/\/+$/, "")}${defaultVersion}`;
13
+ }
14
+ function stripVersionPrefix(url) {
15
+ return url.replace(/\/v\d+\/?$/, "");
16
+ }
17
+ function buildModelsUrl(baseUrl) {
18
+ return `${ensureVersionPrefix(baseUrl)}/models`;
19
+ }
20
+
8
21
  // src/server/llm/backend.ts
9
22
  var BACKEND_CAPABILITIES = {
10
23
  vllm: {
@@ -51,7 +64,7 @@ async function detectBackend(baseUrl, explicitBackend, silent = false) {
51
64
  }
52
65
  return explicitBackend;
53
66
  }
54
- const probeUrl = baseUrl.replace(/\/v1\/?$/, "");
67
+ const probeUrl = stripVersionPrefix(baseUrl);
55
68
  try {
56
69
  if (await probeOllama(probeUrl)) {
57
70
  if (silent) {
@@ -140,7 +153,7 @@ async function probeSGLang(baseUrl) {
140
153
  }
141
154
  async function probeOpenAI(baseUrl) {
142
155
  try {
143
- const url = baseUrl.includes("/v1") ? baseUrl : `${baseUrl}/v1`;
156
+ const url = ensureVersionPrefix(baseUrl);
144
157
  const response = await fetch(`${url}/models`, {
145
158
  signal: AbortSignal.timeout(5e3)
146
159
  });
@@ -362,6 +375,9 @@ function getModelProfile(modelName) {
362
375
  }
363
376
  return DEFAULT_PROFILE;
364
377
  }
378
+ function modelSupportsVision(modelName) {
379
+ return getModelProfile(modelName).supportsVision;
380
+ }
365
381
 
366
382
  // src/server/llm/client-pure.ts
367
383
  function buildModelParams(params) {
@@ -372,27 +388,16 @@ function buildModelParams(params) {
372
388
  ...params.maxTokens !== void 0 && { maxTokens: params.maxTokens }
373
389
  };
374
390
  }
375
- function buildAttachmentContent(msgContent, attachments, modelSupportsVision) {
391
+ function buildAttachmentContent(msgContent, attachments, modelSupportsVision2) {
376
392
  const content = [];
377
393
  if (msgContent?.trim()) {
378
394
  content.push({ type: "text", text: msgContent });
379
395
  }
380
396
  for (const attachment of attachments) {
381
- content.push(convertAttachmentSync(attachment, modelSupportsVision));
397
+ content.push(convertAttachmentSync(attachment, modelSupportsVision2));
382
398
  }
383
399
  return content;
384
400
  }
385
- async function convertMessagesWithOptions(messages, profile, visionFallbackEnabled, userVisionOverride, signal, onVisionFallbackStart, onVisionFallbackDone) {
386
- const modelSupportsVision = userVisionOverride ?? profile.supportsVision ?? false;
387
- const options = {
388
- modelSupportsVision,
389
- visionFallbackEnabled,
390
- signal,
391
- onVisionFallbackStart,
392
- onVisionFallbackDone
393
- };
394
- return needsVisionFallback(messages, modelSupportsVision, visionFallbackEnabled) ? await convertMessagesWithFallback(messages, options) : convertMessages(messages, { modelSupportsVision, visionFallbackEnabled: false });
395
- }
396
401
  function convertToolCalls(toolCalls) {
397
402
  return toolCalls.map((toolCall) => ({
398
403
  id: toolCall.id,
@@ -416,8 +421,8 @@ function buildAssistantMessage(msg) {
416
421
  }
417
422
  return result;
418
423
  }
419
- function convertAttachmentSync(attachment, modelSupportsVision) {
420
- if (modelSupportsVision) {
424
+ function convertAttachmentSync(attachment, modelSupportsVision2) {
425
+ if (modelSupportsVision2) {
421
426
  return {
422
427
  type: "image_url",
423
428
  image_url: { url: attachment.data }
@@ -428,68 +433,14 @@ function convertAttachmentSync(attachment, modelSupportsVision) {
428
433
  text: `[Image: ${attachment.filename || "image"}] (vision not supported, cannot describe)`
429
434
  };
430
435
  }
431
- function createAttachmentForConversion(data, filename, id) {
432
- return {
433
- data,
434
- ...filename !== void 0 && { filename },
435
- ...id !== void 0 && { id }
436
- };
437
- }
438
- async function convertAttachmentWithFallback(attachment, options) {
439
- logger.debug("[VisionFallback] convertAttachmentWithFallback called", {
440
- filename: attachment.filename,
441
- id: attachment.id,
442
- hasCallbacks: !!options.onVisionFallbackStart
443
- });
444
- if (options.modelSupportsVision) {
445
- logger.debug("[VisionFallback] Model supports vision - passing image directly");
446
- return {
447
- type: "image_url",
448
- image_url: { url: attachment.data }
449
- };
450
- }
451
- if (!options.visionFallbackEnabled) {
452
- logger.debug("[VisionFallback] Fallback disabled - returning placeholder");
453
- return {
454
- type: "text",
455
- text: `[Image: ${attachment.filename || "image"}] (vision not supported)`
456
- };
457
- }
458
- const attachmentId = attachment.id ?? crypto.randomUUID();
459
- const filename = attachment.filename;
460
- logger.debug("[VisionFallback] Starting delegation for:", { attachmentId, filename });
461
- options.onVisionFallbackStart?.(attachmentId, filename);
462
- const context = filename ? `File: ${filename}` : void 0;
463
- const description = await describeImageFromDataUrl(attachment.data, { context, signal: options.signal });
464
- logger.debug("[VisionFallback] Delegation complete:", { attachmentId, descriptionLength: description.length });
465
- options.onVisionFallbackDone?.(attachmentId, description);
466
- return {
467
- type: "text",
468
- text: `[Image: ${attachment.filename || "image"}] ${description}`
469
- };
470
- }
471
- async function buildAttachmentContentWithFallback(msgContent, attachments, options) {
472
- const content = [];
473
- if (msgContent?.trim()) {
474
- content.push({ type: "text", text: msgContent });
475
- }
476
- for (const attachment of attachments) {
477
- const convertedContent = await convertAttachmentWithFallback(
478
- createAttachmentForConversion(attachment.data, attachment.filename, attachment.id),
479
- options
480
- );
481
- content.push(convertedContent);
482
- }
483
- return content;
484
- }
485
- function convertMessages(messages, options) {
436
+ function convertMessages(messages, modelSupportsVision2) {
486
437
  const filtered = messages.filter((msg) => {
487
438
  return !(msg.role === "assistant" && !msg.content?.trim() && (!msg.toolCalls || msg.toolCalls.length === 0));
488
439
  });
489
440
  return filtered.map((msg) => {
490
441
  if (msg.role === "tool") {
491
442
  if (msg.attachments && msg.attachments.length > 0) {
492
- const content = buildAttachmentContent(msg.content, msg.attachments, options.modelSupportsVision);
443
+ const content = buildAttachmentContent(msg.content, msg.attachments, modelSupportsVision2);
493
444
  return {
494
445
  role: "tool",
495
446
  content,
@@ -506,7 +457,7 @@ function convertMessages(messages, options) {
506
457
  return buildAssistantMessage(msg);
507
458
  }
508
459
  if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
509
- const content = buildAttachmentContent(msg.content, msg.attachments, options.modelSupportsVision);
460
+ const content = buildAttachmentContent(msg.content, msg.attachments, modelSupportsVision2);
510
461
  return {
511
462
  role: "user",
512
463
  content
@@ -518,49 +469,6 @@ function convertMessages(messages, options) {
518
469
  };
519
470
  });
520
471
  }
521
- async function convertMessagesWithFallback(messages, options) {
522
- logger.debug("[VisionFallback] convertMessagesWithFallback called", { messageCount: messages.length });
523
- const filtered = messages.filter((msg) => {
524
- return !(msg.role === "assistant" && !msg.content?.trim() && (!msg.toolCalls || msg.toolCalls.length === 0));
525
- });
526
- const converted = [];
527
- for (const msg of filtered) {
528
- if (msg.role === "tool") {
529
- if (msg.attachments && msg.attachments.length > 0) {
530
- const content = await buildAttachmentContentWithFallback(msg.content, msg.attachments, options);
531
- converted.push({
532
- role: "tool",
533
- content,
534
- tool_call_id: msg.toolCallId
535
- });
536
- } else {
537
- converted.push({
538
- role: "tool",
539
- content: msg.content,
540
- tool_call_id: msg.toolCallId
541
- });
542
- }
543
- continue;
544
- }
545
- if (msg.role === "assistant") {
546
- converted.push(buildAssistantMessage(msg));
547
- continue;
548
- }
549
- if (msg.role === "user" && msg.attachments && msg.attachments.length > 0) {
550
- const content = await buildAttachmentContentWithFallback(msg.content, msg.attachments, options);
551
- converted.push({
552
- role: "user",
553
- content
554
- });
555
- continue;
556
- }
557
- converted.push({
558
- role: msg.role,
559
- content: msg.content
560
- });
561
- }
562
- return converted;
563
- }
564
472
  function convertTools(tools) {
565
473
  return tools.map((tool) => ({
566
474
  type: "function",
@@ -571,30 +479,10 @@ function convertTools(tools) {
571
479
  }
572
480
  }));
573
481
  }
574
- function needsVisionFallback(messages, modelSupportsVision, visionFallbackEnabled) {
575
- const hasAttachments = messages.some(
576
- (msg) => msg.attachments && msg.attachments.length > 0 || msg.role === "tool" && msg.attachments && msg.attachments.length > 0
577
- );
578
- const result = hasAttachments && !modelSupportsVision && visionFallbackEnabled;
579
- logger.debug("[VisionFallback] needsVisionFallback check", {
580
- hasAttachments,
581
- modelSupportsVision,
582
- visionFallbackEnabled,
583
- result
584
- });
585
- return result;
586
- }
587
- async function buildChatCompletionCreateParams(model, request, profile, capabilities, disableThinking, visionFallbackEnabled, isStreaming, onVisionFallbackStart, onVisionFallbackDone) {
482
+ async function buildChatCompletionCreateParams(model, request, profile, capabilities, disableThinking, isStreaming) {
588
483
  const userVisionOverride = request.modelSettings?.supportsVision;
589
- const convertedMessages = await convertMessagesWithOptions(
590
- request.messages,
591
- profile,
592
- visionFallbackEnabled,
593
- userVisionOverride,
594
- request.signal,
595
- onVisionFallbackStart,
596
- onVisionFallbackDone
597
- );
484
+ const modelSupportsVision2 = userVisionOverride ?? profile.supportsVision ?? false;
485
+ const convertedMessages = convertMessages(request.messages, modelSupportsVision2);
598
486
  const temperature = request.modelSettings?.temperature ?? request.temperature ?? profile.temperature;
599
487
  const maxTokens = request.modelSettings?.maxTokens ?? request.maxTokens ?? profile.defaultMaxTokens;
600
488
  const topP = request.modelSettings?.topP ?? profile.topP;
@@ -623,26 +511,14 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
623
511
  return { params, modelParams };
624
512
  }
625
513
  async function buildCreateParamsFromInput(input, isStreaming) {
626
- const {
627
- model,
628
- request,
629
- profile,
630
- capabilities,
631
- disableThinking,
632
- visionFallbackEnabled = false,
633
- onVisionFallbackStart,
634
- onVisionFallbackDone
635
- } = input;
514
+ const { model, request, profile, capabilities, disableThinking } = input;
636
515
  return buildChatCompletionCreateParams(
637
516
  model,
638
517
  request,
639
518
  profile,
640
519
  capabilities,
641
520
  !!disableThinking,
642
- visionFallbackEnabled,
643
- isStreaming,
644
- onVisionFallbackStart,
645
- onVisionFallbackDone
521
+ isStreaming
646
522
  );
647
523
  }
648
524
  var buildNonStreamingCreateParams = (input) => buildCreateParamsFromInput(input, false);
@@ -677,13 +553,7 @@ function extractThinking(content) {
677
553
  }
678
554
 
679
555
  // src/server/llm/streaming.ts
680
- var XML_TOOL_PATTERNS = ["<tool_call>", "<function=", "</tool_call>", "<parameter="];
681
- function hasXmlToolPattern(text) {
682
- return XML_TOOL_PATTERNS.some((p) => text.includes(p));
683
- }
684
556
  async function* streamWithSegments(client, request) {
685
- const xmlAbortController = new AbortController();
686
- const combinedSignal = request.signal ? AbortSignal.any([request.signal, xmlAbortController.signal]) : xmlAbortController.signal;
687
557
  let content = "";
688
558
  let thinkingContent = "";
689
559
  let response = null;
@@ -705,7 +575,7 @@ async function* streamWithSegments(client, request) {
705
575
  currentThinkingSegment = "";
706
576
  };
707
577
  try {
708
- for await (const event of client.stream({ ...request, signal: combinedSignal })) {
578
+ for await (const event of client.stream(request)) {
709
579
  switch (event.type) {
710
580
  case "text_delta":
711
581
  if (firstTokenTime === null) {
@@ -714,11 +584,6 @@ async function* streamWithSegments(client, request) {
714
584
  flushThinking();
715
585
  content += event.content;
716
586
  currentTextSegment += event.content;
717
- if (!request.disableXmlProtection && hasXmlToolPattern(content)) {
718
- xmlAbortController.abort();
719
- yield { type: "xml_tool_abort" };
720
- return null;
721
- }
722
587
  yield { type: "text_delta", content: event.content };
723
588
  break;
724
589
  case "thinking_delta":
@@ -728,11 +593,6 @@ async function* streamWithSegments(client, request) {
728
593
  flushText();
729
594
  thinkingContent += event.content;
730
595
  currentThinkingSegment += event.content;
731
- if (!request.disableXmlProtection && hasXmlToolPattern(thinkingContent)) {
732
- xmlAbortController.abort();
733
- yield { type: "xml_tool_abort" };
734
- return null;
735
- }
736
596
  yield { type: "thinking_delta", content: event.content };
737
597
  break;
738
598
  case "tool_call_delta":
@@ -756,9 +616,6 @@ async function* streamWithSegments(client, request) {
756
616
  }
757
617
  }
758
618
  } catch (error) {
759
- if (error instanceof Error && error.name === "AbortError") {
760
- return null;
761
- }
762
619
  yield { type: "error", error: error instanceof Error ? error.message : "Unknown error" };
763
620
  return null;
764
621
  }
@@ -791,6 +648,10 @@ async function* streamWithSegments(client, request) {
791
648
 
792
649
  export {
793
650
  getModelProfile,
651
+ modelSupportsVision,
652
+ ensureVersionPrefix,
653
+ stripVersionPrefix,
654
+ buildModelsUrl,
794
655
  getBackendCapabilities,
795
656
  detectBackend,
796
657
  getBackendDisplayName,
@@ -801,4 +662,4 @@ export {
801
662
  extractThinking,
802
663
  streamWithSegments
803
664
  };
804
- //# sourceMappingURL=chunk-HGAMIPFO.js.map
665
+ //# sourceMappingURL=chunk-VIIRNJDT.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-4U4CSRBE.js";
4
+ } from "../chunk-LCRJWUW7.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-4U4CSRBE.js";
4
+ } from "../chunk-LCRJWUW7.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
@@ -0,0 +1,9 @@
1
+ import {
2
+ getCompactionTarget,
3
+ shouldCompact
4
+ } from "./chunk-RI6GAMNP.js";
5
+ export {
6
+ getCompactionTarget,
7
+ shouldCompact
8
+ };
9
+ //# sourceMappingURL=compactor-TDNRM3A7.js.map
@@ -12,13 +12,13 @@ import {
12
12
  removeProvider,
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
- trySmartDefaults
16
- } from "./chunk-NNEHZT3V.js";
17
- import "./chunk-HHAJ3QF6.js";
18
- import "./chunk-HGAMIPFO.js";
19
- import "./chunk-CQGTEGKL.js";
20
- import "./chunk-SZKEGZIB.js";
15
+ trySmartDefaults,
16
+ updateProvider
17
+ } from "./chunk-EZUR7OEP.js";
18
+ import "./chunk-UKTPL5ZG.js";
19
+ import "./chunk-VIIRNJDT.js";
21
20
  import "./chunk-K44MW7JJ.js";
21
+ import "./chunk-CQGTEGKL.js";
22
22
  export {
23
23
  activateProvider,
24
24
  addProvider,
@@ -33,6 +33,7 @@ export {
33
33
  removeProvider,
34
34
  saveGlobalConfig,
35
35
  setDefaultModelSelection,
36
- trySmartDefaults
36
+ trySmartDefaults,
37
+ updateProvider
37
38
  };
38
- //# sourceMappingURL=config-YU7NYZYG.js.map
39
+ //# sourceMappingURL=config-TDVA7MQN.js.map
@@ -10,12 +10,12 @@ import {
10
10
  emitCriteriaSet,
11
11
  emitCriterionUpdated,
12
12
  emitFileRead,
13
- emitFormatRetry,
14
13
  emitMessageDelta,
15
14
  emitMessageDone,
16
15
  emitMessageThinking,
17
16
  emitMetadataSet,
18
17
  emitModeChanged,
18
+ emitPatternRetry,
19
19
  emitPhaseChanged,
20
20
  emitRunningChanged,
21
21
  emitSessionInitialized,
@@ -28,6 +28,7 @@ import {
28
28
  emitUserMessage,
29
29
  getContextMessages,
30
30
  getCurrentContextWindowId,
31
+ getCurrentWindowMessageOptions,
31
32
  getCurrentWindowMessages,
32
33
  getEventStore,
33
34
  getReadFilesCache,
@@ -38,8 +39,7 @@ import {
38
39
  isStoredEvent,
39
40
  isTurnEvent,
40
41
  truncateSessionMessages
41
- } from "./chunk-XKR3HCAL.js";
42
- import "./chunk-FBGWG4N6.js";
42
+ } from "./chunk-NSBYORD5.js";
43
43
  import {
44
44
  buildContextMessagesFromEventHistory,
45
45
  buildContextMessagesFromMessages,
@@ -56,8 +56,8 @@ import {
56
56
  foldTodos,
57
57
  foldTurnEventsToSnapshotMessages,
58
58
  getMessagesForWindow
59
- } from "./chunk-NONI4CRP.js";
60
- import "./chunk-CGZHLM3K.js";
59
+ } from "./chunk-ITWVFGFV.js";
60
+ import "./chunk-FBGWG4N6.js";
61
61
  import "./chunk-K44MW7JJ.js";
62
62
  export {
63
63
  EventStore,
@@ -77,12 +77,12 @@ export {
77
77
  emitCriteriaSet,
78
78
  emitCriterionUpdated,
79
79
  emitFileRead,
80
- emitFormatRetry,
81
80
  emitMessageDelta,
82
81
  emitMessageDone,
83
82
  emitMessageThinking,
84
83
  emitMetadataSet,
85
84
  emitModeChanged,
85
+ emitPatternRetry,
86
86
  emitPhaseChanged,
87
87
  emitRunningChanged,
88
88
  emitSessionInitialized,
@@ -103,6 +103,7 @@ export {
103
103
  foldTurnEventsToSnapshotMessages,
104
104
  getContextMessages,
105
105
  getCurrentContextWindowId,
106
+ getCurrentWindowMessageOptions,
106
107
  getCurrentWindowMessages,
107
108
  getEventStore,
108
109
  getMessagesForWindow,
@@ -115,4 +116,4 @@ export {
115
116
  isTurnEvent,
116
117
  truncateSessionMessages
117
118
  };
118
- //# sourceMappingURL=events-OHJWCI3S.js.map
119
+ //# sourceMappingURL=events-UGTGGFG3.js.map
@@ -23,7 +23,7 @@ import {
23
23
  handleToolResult,
24
24
  spreadOptionalMessageFields,
25
25
  stripOrphanedToolCalls
26
- } from "./chunk-NONI4CRP.js";
26
+ } from "./chunk-ITWVFGFV.js";
27
27
  export {
28
28
  buildContextMessagesFromEventHistory,
29
29
  buildContextMessagesFromMessages,
@@ -50,4 +50,4 @@ export {
50
50
  spreadOptionalMessageFields,
51
51
  stripOrphanedToolCalls
52
52
  };
53
- //# sourceMappingURL=folding-U6UHQAS5.js.map
53
+ //# sourceMappingURL=folding-YOCGTZYH.js.map
@@ -1,9 +1,8 @@
1
1
  import {
2
- filterToolRegistryForStepDone,
3
- runBuilderTurn,
4
- runChatTurn,
5
- runVerifierTurn
6
- } from "./chunk-UFY4I643.js";
2
+ injectWorkflowKickoffIfNeeded,
3
+ runAgentTurn,
4
+ runChatTurn
5
+ } from "./chunk-BU56QFHW.js";
7
6
  import {
8
7
  TurnMetrics,
9
8
  createChatDoneEvent,
@@ -11,23 +10,21 @@ import {
11
10
  createMessageStartEvent,
12
11
  createToolCallEvent,
13
12
  createToolResultEvent
14
- } from "./chunk-ALH4KM2Y.js";
15
- import "./chunk-PSJIT5LZ.js";
16
- import "./chunk-XAMAYRDA.js";
13
+ } from "./chunk-EQQDA4D3.js";
17
14
  import "./chunk-DL6ZILAF.js";
18
15
  import "./chunk-PBGOZMVY.js";
19
16
  import "./chunk-VRGRAQDG.js";
20
- import "./chunk-HGAMIPFO.js";
21
- import "./chunk-XKR3HCAL.js";
22
- import "./chunk-FBGWG4N6.js";
23
- import "./chunk-NONI4CRP.js";
24
- import "./chunk-CEZNMLOO.js";
17
+ import "./chunk-NSBYORD5.js";
18
+ import "./chunk-ITWVFGFV.js";
19
+ import "./chunk-7TTEGAO6.js";
25
20
  import "./chunk-BJYPTN5S.js";
26
- import "./chunk-FQLK5GL5.js";
27
- import "./chunk-CQGTEGKL.js";
28
- import "./chunk-CGZHLM3K.js";
29
- import "./chunk-SZKEGZIB.js";
21
+ import "./chunk-RFNEDBVO.js";
22
+ import "./chunk-XAMAYRDA.js";
23
+ import "./chunk-FBGWG4N6.js";
24
+ import "./chunk-BVHFMAVN.js";
25
+ import "./chunk-VIIRNJDT.js";
30
26
  import "./chunk-K44MW7JJ.js";
27
+ import "./chunk-CQGTEGKL.js";
31
28
  export {
32
29
  TurnMetrics,
33
30
  createChatDoneEvent,
@@ -35,9 +32,8 @@ export {
35
32
  createMessageStartEvent,
36
33
  createToolCallEvent,
37
34
  createToolResultEvent,
38
- filterToolRegistryForStepDone,
39
- runBuilderTurn,
40
- runChatTurn,
41
- runVerifierTurn
35
+ injectWorkflowKickoffIfNeeded,
36
+ runAgentTurn,
37
+ runChatTurn
42
38
  };
43
- //# sourceMappingURL=orchestrator-7ZXM4J22.js.map
39
+ //# sourceMappingURL=orchestrator-75L5UGDU.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.11",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {