openfox 2.0.15 → 2.0.16

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.
@@ -8,8 +8,8 @@ import {
8
8
  } from "./chunk-J7KOV4ST.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-Z64KW2HD.js";
12
- import "./chunk-KPKSN362.js";
11
+ } from "./chunk-63UEI4AF.js";
12
+ import "./chunk-JO6RF2U2.js";
13
13
  import "./chunk-XAMAYRDA.js";
14
14
  import "./chunk-L7TDUIQY.js";
15
15
  import "./chunk-DL6ZILAF.js";
@@ -164,4 +164,4 @@ export {
164
164
  startChatSession,
165
165
  stopSessionExecution
166
166
  };
167
- //# sourceMappingURL=chat-handler-RYOG3WJP.js.map
167
+ //# sourceMappingURL=chat-handler-PC6OVDUR.js.map
@@ -14,7 +14,7 @@ import {
14
14
  loadAllAgentsDefault,
15
15
  processEventsForConversation,
16
16
  runTopLevelAgentLoop
17
- } from "./chunk-KPKSN362.js";
17
+ } from "./chunk-JO6RF2U2.js";
18
18
  import {
19
19
  TurnMetrics,
20
20
  WORKFLOW_KICKOFF_PROMPT,
@@ -320,4 +320,4 @@ export {
320
320
  runAgentTurn,
321
321
  injectWorkflowKickoffIfNeeded
322
322
  };
323
- //# sourceMappingURL=chunk-Z64KW2HD.js.map
323
+ //# sourceMappingURL=chunk-63UEI4AF.js.map
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-EKTGRBDC.js";
24
+ } from "./chunk-WOTBK3QQ.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -61,7 +61,7 @@ import {
61
61
  setMcpTools,
62
62
  setNotifyMcpServersChanged,
63
63
  skillExists
64
- } from "./chunk-KPKSN362.js";
64
+ } from "./chunk-JO6RF2U2.js";
65
65
  import {
66
66
  getProject
67
67
  } from "./chunk-XAMAYRDA.js";
@@ -3944,7 +3944,7 @@ import { Router as Router6 } from "express";
3944
3944
  import { spawn as spawn2 } from "child_process";
3945
3945
 
3946
3946
  // src/constants.ts
3947
- var VERSION = "2.0.15";
3947
+ var VERSION = "2.0.16";
3948
3948
 
3949
3949
  // src/server/routes/auto-update.ts
3950
3950
  var updateInProgress = false;
@@ -4124,7 +4124,7 @@ async function createServerHandle(config4) {
4124
4124
  setMcpTools(mcpTools);
4125
4125
  logger.info("MCP tools registered", { count: mcpTools.length });
4126
4126
  }
4127
- const { signalMcpReady } = await import("./server-P7E2IPVL.js");
4127
+ const { signalMcpReady } = await import("./server-RYKKAOFF.js");
4128
4128
  signalMcpReady();
4129
4129
  });
4130
4130
  const app = express();
@@ -4315,7 +4315,7 @@ async function createServerHandle(config4) {
4315
4315
  app.get("/api/sessions/:id", async (req, res) => {
4316
4316
  const { getEventStore: getEventStore2 } = await import("./events-4K52FKPR.js");
4317
4317
  const { buildMessagesFromStoredEvents } = await import("./folding-QIBNKYA6.js");
4318
- const { getPendingQuestionsForSession } = await import("./tools-WEE4XDTL.js");
4318
+ const { getPendingQuestionsForSession } = await import("./tools-Y7ZGLK7A.js");
4319
4319
  const session = sessionManager.getSession(req.params.id);
4320
4320
  if (!session) {
4321
4321
  return res.status(404).json({ error: "Session not found" });
@@ -4446,7 +4446,7 @@ async function createServerHandle(config4) {
4446
4446
  if (!callId || approved === void 0) {
4447
4447
  return res.status(400).json({ error: "callId and approved are required" });
4448
4448
  }
4449
- const { providePathConfirmation } = await import("./tools-WEE4XDTL.js");
4449
+ const { providePathConfirmation } = await import("./tools-Y7ZGLK7A.js");
4450
4450
  const result = providePathConfirmation(callId, approved, alwaysAllow);
4451
4451
  if (!result.found) {
4452
4452
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -4454,7 +4454,7 @@ async function createServerHandle(config4) {
4454
4454
  const { getEventStore: getEventStore2 } = await import("./events-4K52FKPR.js");
4455
4455
  const { buildMessagesFromStoredEvents, foldPendingConfirmations } = await import("./folding-QIBNKYA6.js");
4456
4456
  const { createSessionStateMessage } = await import("./protocol-BKNLAEPJ.js");
4457
- const { getPendingQuestionsForSession } = await import("./tools-WEE4XDTL.js");
4457
+ const { getPendingQuestionsForSession } = await import("./tools-Y7ZGLK7A.js");
4458
4458
  const eventStore = getEventStore2();
4459
4459
  const events = eventStore.getEvents(sessionId);
4460
4460
  const messages = buildMessagesFromStoredEvents(events);
@@ -4475,7 +4475,7 @@ async function createServerHandle(config4) {
4475
4475
  if (!skip && typeof answer !== "string") {
4476
4476
  return res.status(400).json({ error: "answer is required when not skipping" });
4477
4477
  }
4478
- const { provideAnswer } = await import("./tools-WEE4XDTL.js");
4478
+ const { provideAnswer } = await import("./tools-Y7ZGLK7A.js");
4479
4479
  const found = provideAnswer(callId, answer ?? "", skip ?? false);
4480
4480
  if (!found) {
4481
4481
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -4511,8 +4511,8 @@ async function createServerHandle(config4) {
4511
4511
  if (!session) {
4512
4512
  return res.status(404).json({ error: "Session not found" });
4513
4513
  }
4514
- const { stopSessionExecution } = await import("./chat-handler-RYOG3WJP.js");
4515
- const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-WEE4XDTL.js");
4514
+ const { stopSessionExecution } = await import("./chat-handler-PC6OVDUR.js");
4515
+ const { cancelQuestionsForSession, cancelPathConfirmationsForSession } = await import("./tools-Y7ZGLK7A.js");
4516
4516
  const queuedMessages = sessionManager.getQueueState(sessionId);
4517
4517
  sessionManager.clearMessageQueue(sessionId);
4518
4518
  stopSessionExecution(sessionId, sessionManager);
@@ -4955,7 +4955,7 @@ async function createServerHandle(config4) {
4955
4955
  });
4956
4956
  async function rebuildMcpTools() {
4957
4957
  const { createMcpTools: createMcpTools2 } = await import("./tool-adapter-B7QP6NLA.js");
4958
- const { setMcpTools: setMcpTools2 } = await import("./tools-WEE4XDTL.js");
4958
+ const { setMcpTools: setMcpTools2 } = await import("./tools-Y7ZGLK7A.js");
4959
4959
  const mcpTools = createMcpTools2(mcpManager);
4960
4960
  setMcpTools2(mcpTools);
4961
4961
  }
@@ -5267,7 +5267,7 @@ async function createServerHandle(config4) {
5267
5267
  const state = sessionManager.getContextState(sessionId);
5268
5268
  wssExports.broadcastForSession(sessionId, createContextStateMessage(state));
5269
5269
  });
5270
- const { QueueProcessor } = await import("./processor-JHR3Z42W.js");
5270
+ const { QueueProcessor } = await import("./processor-KWPYXPL7.js");
5271
5271
  const queueProcessor = new QueueProcessor({
5272
5272
  sessionManager,
5273
5273
  providerManager,
@@ -5342,4 +5342,4 @@ export {
5342
5342
  createServerHandle,
5343
5343
  createServer
5344
5344
  };
5345
- //# sourceMappingURL=chunk-2GX5EIIU.js.map
5345
+ //# sourceMappingURL=chunk-DQ6SV26Y.js.map
@@ -609,6 +609,182 @@ function isNodeError(error) {
609
609
  return error instanceof Error && "code" in error;
610
610
  }
611
611
 
612
+ // src/server/utils/encoding.ts
613
+ import { detect } from "jschardet";
614
+ import * as iconv from "iconv-lite";
615
+ function detectEncoding(buffer) {
616
+ if (buffer.length === 0) {
617
+ return { encoding: "utf-8", confidence: 1, bomSize: 0 };
618
+ }
619
+ const bomSize = detectBOM(buffer);
620
+ const bomStripped = bomSize > 0 ? buffer.subarray(bomSize) : buffer;
621
+ if (bomSize > 0) {
622
+ const bomEncoding = bomEncodingForSize(buffer);
623
+ return { encoding: bomEncoding, confidence: 1, bomSize };
624
+ }
625
+ if (isValidUtf8(bomStripped)) {
626
+ return { encoding: "utf-8", confidence: 0.95, bomSize: 0 };
627
+ }
628
+ const detected = detect(bomStripped);
629
+ if (detected && detected.encoding && detected.confidence > 0.2) {
630
+ return { encoding: normalizeEncoding(detected.encoding), confidence: detected.confidence, bomSize: 0 };
631
+ }
632
+ return { encoding: "ISO-8859-1", confidence: 0.1, bomSize: 0 };
633
+ }
634
+ function detectBOM(buffer) {
635
+ if (buffer.length >= 4 && buffer[0] === 0 && buffer[1] === 0 && buffer[2] === 254 && buffer[3] === 255)
636
+ return 4;
637
+ if (buffer.length >= 4 && buffer[0] === 255 && buffer[1] === 254 && buffer[2] === 0 && buffer[3] === 0)
638
+ return 4;
639
+ if (buffer.length >= 2 && buffer[0] === 254 && buffer[1] === 255) return 2;
640
+ if (buffer.length >= 2 && buffer[0] === 255 && buffer[1] === 254) return 2;
641
+ if (buffer.length >= 3 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) return 3;
642
+ return 0;
643
+ }
644
+ function bomEncodingForSize(buffer) {
645
+ if (buffer.length >= 2) {
646
+ if (buffer[0] === 254 && buffer[1] === 255) return "utf-16be";
647
+ if (buffer[0] === 255 && buffer[1] === 254) {
648
+ if (buffer.length >= 4 && buffer[2] === 0 && buffer[3] === 0) return "utf-32";
649
+ return "utf-16le";
650
+ }
651
+ }
652
+ if (buffer.length >= 3 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) return "utf-8";
653
+ if (buffer.length >= 4 && buffer[0] === 0 && buffer[1] === 0 && buffer[2] === 254 && buffer[3] === 255)
654
+ return "utf-32be";
655
+ return "utf-8";
656
+ }
657
+ function isValidUtf8(buffer) {
658
+ const decoder = new TextDecoder("utf-8", { fatal: true });
659
+ try {
660
+ decoder.decode(buffer);
661
+ return true;
662
+ } catch {
663
+ return false;
664
+ }
665
+ }
666
+ function normalizeEncoding(enc) {
667
+ const lower = enc.toLowerCase().replace(/_/g, "-");
668
+ const map = {
669
+ "utf-8": "utf-8",
670
+ utf8: "utf-8",
671
+ ascii: "utf-8",
672
+ "iso-8859-1": "ISO-8859-1",
673
+ "iso8859-1": "ISO-8859-1",
674
+ latin1: "ISO-8859-1",
675
+ "windows-1252": "windows-1252",
676
+ "shift-jis": "Shift_JIS",
677
+ shift_jis: "Shift_JIS",
678
+ "euc-jp": "EUC-JP",
679
+ "euc-kr": "EUC-KR",
680
+ gb2312: "GB2312",
681
+ gb18030: "GB18030",
682
+ big5: "Big5",
683
+ "utf-16": "utf-16le",
684
+ "utf-16le": "utf-16le",
685
+ "utf-16be": "utf-16be",
686
+ "utf-32": "utf-32le",
687
+ "utf-32le": "utf-32le",
688
+ "utf-32be": "utf-32be",
689
+ "koi8-r": "KOI8-R",
690
+ "koi8-u": "KOI8-U"
691
+ };
692
+ return map[lower] ?? enc;
693
+ }
694
+ function decodeContent(buffer, encoding) {
695
+ const bomSize = detectBOM(buffer);
696
+ const contentBuf = bomSize > 0 ? buffer.subarray(bomSize) : buffer;
697
+ const normalized = normalizeEncoding(encoding);
698
+ if (normalized === "utf-8") {
699
+ return contentBuf.toString("utf-8");
700
+ }
701
+ if (normalized === "utf-16le") {
702
+ return contentBuf.toString("utf-16le");
703
+ }
704
+ if (normalized === "utf-16be") {
705
+ return swapUtf16Endianness(contentBuf).toString("utf-16le");
706
+ }
707
+ if (normalized === "utf-32le") {
708
+ return utf32ToString(contentBuf, true);
709
+ }
710
+ if (normalized === "utf-32be") {
711
+ return utf32ToString(contentBuf, false);
712
+ }
713
+ return iconv.decode(contentBuf, normalized);
714
+ }
715
+ function encodeContent(content, encoding, addBom = false) {
716
+ const normalized = normalizeEncoding(encoding);
717
+ let encoded;
718
+ if (normalized === "utf-8") {
719
+ encoded = Buffer.from(content, "utf-8");
720
+ } else if (normalized === "utf-16le") {
721
+ encoded = Buffer.from(content, "utf-16le");
722
+ } else if (normalized === "utf-16be") {
723
+ encoded = swapUtf16Endianness(Buffer.from(content, "utf-16le"));
724
+ } else if (normalized === "utf-32le") {
725
+ encoded = stringToUtf32(content, true);
726
+ } else if (normalized === "utf-32be") {
727
+ encoded = stringToUtf32(content, false);
728
+ } else {
729
+ encoded = iconv.encode(content, normalized);
730
+ }
731
+ if (addBom) {
732
+ const bom = bomForEncoding(normalized);
733
+ if (bom) {
734
+ encoded = Buffer.concat([bom, encoded]);
735
+ }
736
+ }
737
+ return encoded;
738
+ }
739
+ function bomForEncoding(encoding) {
740
+ switch (encoding) {
741
+ case "utf-8":
742
+ return Buffer.from([239, 187, 191]);
743
+ case "utf-16le":
744
+ return Buffer.from([255, 254]);
745
+ case "utf-16be":
746
+ return Buffer.from([254, 255]);
747
+ case "utf-32le":
748
+ return Buffer.from([255, 254, 0, 0]);
749
+ case "utf-32be":
750
+ return Buffer.from([0, 0, 254, 255]);
751
+ default:
752
+ return null;
753
+ }
754
+ }
755
+ function swapUtf16Endianness(buf) {
756
+ const out = Buffer.alloc(buf.length);
757
+ for (let i = 0; i + 1 < buf.length; i += 2) {
758
+ out[i] = buf[i + 1];
759
+ out[i + 1] = buf[i];
760
+ }
761
+ return out;
762
+ }
763
+ function utf32ToString(buffer, littleEndian) {
764
+ const chars = [];
765
+ for (let i = 0; i + 3 < buffer.length; i += 4) {
766
+ const code = littleEndian ? buffer.readUInt32LE(i) : buffer.readUInt32BE(i);
767
+ if (code > 1114111) continue;
768
+ chars.push(String.fromCodePoint(code));
769
+ }
770
+ return chars.join("");
771
+ }
772
+ function stringToUtf32(str, littleEndian) {
773
+ const codes = [];
774
+ for (const ch of str) {
775
+ codes.push(ch.codePointAt(0));
776
+ }
777
+ const buf = Buffer.alloc(codes.length * 4);
778
+ for (let i = 0; i < codes.length; i++) {
779
+ if (littleEndian) {
780
+ buf.writeUInt32LE(codes[i], i * 4);
781
+ } else {
782
+ buf.writeUInt32BE(codes[i], i * 4);
783
+ }
784
+ }
785
+ return buf;
786
+ }
787
+
612
788
  // src/server/tools/read.ts
613
789
  var IMAGE_MIME_TYPES = {
614
790
  ".png": "image/png",
@@ -759,7 +935,8 @@ var readFileTool = createTool(
759
935
  }
760
936
  });
761
937
  }
762
- const content = rawBuffer.toString("utf-8");
938
+ const { encoding, confidence } = detectEncoding(rawBuffer);
939
+ const content = decodeContent(rawBuffer, encoding);
763
940
  const lines = content.split("\n");
764
941
  const totalLines = lines.length;
765
942
  const startLine = Math.max(1, offset);
@@ -781,7 +958,13 @@ var readFileTool = createTool(
781
958
  if (contentHash2) {
782
959
  context.sessionManager.recordFileRead(context.sessionId, fullPath, contentHash2);
783
960
  }
784
- return helpers.success(output, truncated);
961
+ return helpers.success(output, truncated, {
962
+ metadata: {
963
+ encoding,
964
+ confidence: Math.round(confidence * 100) / 100,
965
+ lineCount: totalLines
966
+ }
967
+ });
785
968
  }
786
969
  );
787
970
 
@@ -840,6 +1023,10 @@ var writeFileTool = createTool(
840
1023
  content: {
841
1024
  type: "string",
842
1025
  description: "Content to write to the file"
1026
+ },
1027
+ encoding: {
1028
+ type: "string",
1029
+ description: 'Optional file encoding (e.g. "ISO-8859-1", "windows-1252", "utf-16"). Defaults to "utf-8". Use the encoding reported by read_file to match project conventions.'
843
1030
  }
844
1031
  },
845
1032
  required: ["path", "content"]
@@ -856,9 +1043,11 @@ var writeFileTool = createTool(
856
1043
  }
857
1044
  const dir = dirname(fullPath);
858
1045
  await mkdir(dir, { recursive: true });
859
- await writeFile(fullPath, args.content, "utf-8");
1046
+ const encoding = args.encoding ?? "utf-8";
1047
+ const encoded = encodeContent(args.content, encoding);
1048
+ await writeFile(fullPath, encoded);
860
1049
  const lineCount = args.content.split("\n").length;
861
- const byteCount = Buffer.byteLength(args.content, "utf-8");
1050
+ const byteCount = encoded.length;
862
1051
  let output = `Successfully wrote ${lineCount} lines (${byteCount} bytes) to ${args.path}`;
863
1052
  let diagnostics = [];
864
1053
  if (context.lspManager) {
@@ -1045,12 +1234,14 @@ var editFileTool = createTool(
1045
1234
  if (!validation.valid) {
1046
1235
  return helpers.error(validation.error?.message ?? "File validation failed");
1047
1236
  }
1048
- let content;
1237
+ let rawBuffer;
1049
1238
  try {
1050
- content = await readFile3(fullPath, "utf-8");
1239
+ rawBuffer = await readFile3(fullPath);
1051
1240
  } catch {
1052
1241
  return helpers.error(`File not found: ${args.path}`);
1053
1242
  }
1243
+ const { encoding, bomSize } = detectEncoding(rawBuffer);
1244
+ const content = decodeContent(rawBuffer, encoding);
1054
1245
  const fileLineEnding = detectLineEnding(content);
1055
1246
  const normalizedContent = normalizeToLF(content);
1056
1247
  const normalizedOldString = normalizeToLF(args.old_string);
@@ -1108,15 +1299,16 @@ Make sure whitespace and indentation match exactly.`
1108
1299
  }
1109
1300
  replacedContent = normalizedContent.slice(0, index) + normalizedNewString + normalizedContent.slice(index + normalizedOldString.length);
1110
1301
  }
1111
- const newContent = replacedContent.replace(
1302
+ const restoredContent = replacedContent.replace(
1112
1303
  /\n/g,
1113
1304
  fileLineEnding === "crlf" ? "\r\n" : fileLineEnding === "cr" ? "\r" : "\n"
1114
1305
  );
1115
- await writeFile2(fullPath, newContent, "utf-8");
1306
+ const encoded = encodeContent(restoredContent, encoding, bomSize > 0);
1307
+ await writeFile2(fullPath, encoded);
1116
1308
  let output = `Successfully replaced ${replaceAll ? occurrences : 1} occurrence(s) in ${args.path}`;
1117
1309
  let diagnostics = [];
1118
1310
  if (context.lspManager) {
1119
- diagnostics = await context.lspManager.notifyFileChange(fullPath, newContent);
1311
+ diagnostics = await context.lspManager.notifyFileChange(fullPath, restoredContent);
1120
1312
  output += formatDiagnosticsForLLM(diagnostics);
1121
1313
  output = appendLspInstallHint(output, context.lspManager, fullPath);
1122
1314
  }
@@ -3149,7 +3341,7 @@ var callSubAgentTool = {
3149
3341
  };
3150
3342
  }
3151
3343
  try {
3152
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-WEE4XDTL.js");
3344
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-Y7ZGLK7A.js");
3153
3345
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3154
3346
  const turnMetrics = new TurnMetrics();
3155
3347
  const result = await executeSubAgent({
@@ -3955,7 +4147,7 @@ async function computeContextHash(sessionManager, sessionId) {
3955
4147
  const runtimeConfig = getRuntimeConfig();
3956
4148
  const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
3957
4149
  const skills = await getEnabledSkillMetadata(configDir, runtimeConfig.workdir);
3958
- const { createToolRegistry: createToolRegistry2 } = await import("./tools-WEE4XDTL.js");
4150
+ const { createToolRegistry: createToolRegistry2 } = await import("./tools-Y7ZGLK7A.js");
3959
4151
  const allTools = createToolRegistry2().definitions;
3960
4152
  const toolFingerprint = getToolFingerprint(allTools);
3961
4153
  const hash = computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -4068,7 +4260,7 @@ var mcpConfigTool = createTool(
4068
4260
  await saveGlobalConfig(mcpConfigMode, { ...globalConfig, mcpServers: updated });
4069
4261
  }
4070
4262
  async function rebuildTools() {
4071
- const { setMcpTools: setMcpTools2 } = await import("./tools-WEE4XDTL.js");
4263
+ const { setMcpTools: setMcpTools2 } = await import("./tools-Y7ZGLK7A.js");
4072
4264
  const mcpTools = createMcpTools(mcpManagerForTools);
4073
4265
  setMcpTools2(mcpTools);
4074
4266
  }
@@ -4448,4 +4640,4 @@ export {
4448
4640
  getToolRegistryForAgent,
4449
4641
  createToolRegistry
4450
4642
  };
4451
- //# sourceMappingURL=chunk-KPKSN362.js.map
4643
+ //# sourceMappingURL=chunk-JO6RF2U2.js.map
@@ -196,7 +196,7 @@ async function runCli(options) {
196
196
  if (!configExists) {
197
197
  await runNetworkSetup(mode);
198
198
  }
199
- const { runServe } = await import("./serve-AV74ODQ6.js");
199
+ const { runServe } = await import("./serve-HZXJXK6T.js");
200
200
  const serveOptions = { mode };
201
201
  if (values.port) serveOptions.port = parseInt(values.port);
202
202
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -208,4 +208,4 @@ async function runCli(options) {
208
208
  export {
209
209
  runCli
210
210
  };
211
- //# sourceMappingURL=chunk-3IKRNKPI.js.map
211
+ //# sourceMappingURL=chunk-OUK5IW26.js.map
@@ -5,7 +5,7 @@ import {
5
5
  injectWorkflowKickoffIfNeeded,
6
6
  runAgentTurn,
7
7
  runChatTurn
8
- } from "./chunk-Z64KW2HD.js";
8
+ } from "./chunk-63UEI4AF.js";
9
9
  import {
10
10
  applyDynamicContext,
11
11
  checkAborted,
@@ -22,7 +22,7 @@ import {
22
22
  loadAllAgentsDefault,
23
23
  saveItemToDir,
24
24
  spawnShellProcess
25
- } from "./chunk-KPKSN362.js";
25
+ } from "./chunk-JO6RF2U2.js";
26
26
  import {
27
27
  TurnMetrics,
28
28
  createMessageStartEvent
@@ -1775,7 +1775,7 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1775
1775
  const runtimeConfig = getRuntimeConfig();
1776
1776
  const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
1777
1777
  const skills = await getEnabledSkillMetadata(configDir, runtimeConfig.workdir);
1778
- const { createToolRegistry } = await import("./tools-WEE4XDTL.js");
1778
+ const { createToolRegistry } = await import("./tools-Y7ZGLK7A.js");
1779
1779
  const allTools = createToolRegistry().definitions;
1780
1780
  const toolFingerprint = getToolFingerprint(allTools);
1781
1781
  const currentHash = computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -1848,7 +1848,7 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1848
1848
  const runtimeConfig = getRuntimeConfig();
1849
1849
  const configDir = getGlobalConfigDir(runtimeConfig.mode ?? "production");
1850
1850
  const skills = await getEnabledSkillMetadata(configDir, runtimeConfig.workdir);
1851
- const { createToolRegistry } = await import("./tools-WEE4XDTL.js");
1851
+ const { createToolRegistry } = await import("./tools-Y7ZGLK7A.js");
1852
1852
  const allTools = createToolRegistry().definitions;
1853
1853
  const toolFingerprint = getToolFingerprint(allTools);
1854
1854
  const currentHash = computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -2069,4 +2069,4 @@ export {
2069
2069
  signalMcpReady,
2070
2070
  createWebSocketServer
2071
2071
  };
2072
- //# sourceMappingURL=chunk-EKTGRBDC.js.map
2072
+ //# sourceMappingURL=chunk-WOTBK3QQ.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-3IKRNKPI.js";
4
+ } from "../chunk-OUK5IW26.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-3IKRNKPI.js";
4
+ } from "../chunk-OUK5IW26.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-K44MW7JJ.js";
@@ -2,8 +2,8 @@ import {
2
2
  injectWorkflowKickoffIfNeeded,
3
3
  runAgentTurn,
4
4
  runChatTurn
5
- } from "./chunk-Z64KW2HD.js";
6
- import "./chunk-KPKSN362.js";
5
+ } from "./chunk-63UEI4AF.js";
6
+ import "./chunk-JO6RF2U2.js";
7
7
  import "./chunk-XAMAYRDA.js";
8
8
  import {
9
9
  TurnMetrics,
@@ -39,4 +39,4 @@ export {
39
39
  runAgentTurn,
40
40
  runChatTurn
41
41
  };
42
- //# sourceMappingURL=orchestrator-KRCVDTZ6.js.map
42
+ //# sourceMappingURL=orchestrator-3SB2BMQ7.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -71,7 +71,9 @@
71
71
  "gray-matter": "^4.0.3",
72
72
  "html2canvas": "^1.4.1",
73
73
  "http-proxy": "^1.18.1",
74
+ "iconv-lite": "^0.7.2",
74
75
  "ignore": "^7.0.5",
76
+ "jschardet": "^3.1.4",
75
77
  "node-pty": "^1.2.0-beta.12",
76
78
  "open": "^11.0.0",
77
79
  "openai": "^6.33.0",
@@ -6,7 +6,7 @@ import {
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
8
  } from "./chunk-J7KOV4ST.js";
9
- import "./chunk-KPKSN362.js";
9
+ import "./chunk-JO6RF2U2.js";
10
10
  import "./chunk-XAMAYRDA.js";
11
11
  import "./chunk-L7TDUIQY.js";
12
12
  import "./chunk-DL6ZILAF.js";
@@ -193,7 +193,7 @@ var QueueProcessor = class {
193
193
  backend: provider?.backend ?? llmClient.getBackend(),
194
194
  model: llmClient.getModel()
195
195
  };
196
- const { runChatTurn } = await import("./orchestrator-KRCVDTZ6.js");
196
+ const { runChatTurn } = await import("./orchestrator-3SB2BMQ7.js");
197
197
  const runChatTurnParams = buildRunChatTurnParams({
198
198
  sessionManager,
199
199
  sessionId,
@@ -241,4 +241,4 @@ var QueueProcessor = class {
241
241
  export {
242
242
  QueueProcessor
243
243
  };
244
- //# sourceMappingURL=processor-JHR3Z42W.js.map
244
+ //# sourceMappingURL=processor-KWPYXPL7.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  VERSION,
3
3
  createServer
4
- } from "./chunk-2GX5EIIU.js";
5
- import "./chunk-EKTGRBDC.js";
4
+ } from "./chunk-DQ6SV26Y.js";
5
+ import "./chunk-WOTBK3QQ.js";
6
6
  import "./chunk-FWJ6YXGA.js";
7
- import "./chunk-Z64KW2HD.js";
8
- import "./chunk-KPKSN362.js";
7
+ import "./chunk-63UEI4AF.js";
8
+ import "./chunk-JO6RF2U2.js";
9
9
  import "./chunk-XAMAYRDA.js";
10
10
  import "./chunk-L7TDUIQY.js";
11
11
  import "./chunk-DL6ZILAF.js";
@@ -193,4 +193,4 @@ async function runServe(options) {
193
193
  export {
194
194
  runServe
195
195
  };
196
- //# sourceMappingURL=serve-AV74ODQ6.js.map
196
+ //# sourceMappingURL=serve-HZXJXK6T.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-2GX5EIIU.js";
5
- import "../chunk-EKTGRBDC.js";
4
+ } from "../chunk-DQ6SV26Y.js";
5
+ import "../chunk-WOTBK3QQ.js";
6
6
  import "../chunk-FWJ6YXGA.js";
7
- import "../chunk-Z64KW2HD.js";
8
- import "../chunk-KPKSN362.js";
7
+ import "../chunk-63UEI4AF.js";
8
+ import "../chunk-JO6RF2U2.js";
9
9
  import "../chunk-XAMAYRDA.js";
10
10
  import "../chunk-L7TDUIQY.js";
11
11
  import "../chunk-DL6ZILAF.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createWebSocketServer,
3
3
  signalMcpReady
4
- } from "./chunk-EKTGRBDC.js";
4
+ } from "./chunk-WOTBK3QQ.js";
5
5
  import "./chunk-FWJ6YXGA.js";
6
- import "./chunk-Z64KW2HD.js";
7
- import "./chunk-KPKSN362.js";
6
+ import "./chunk-63UEI4AF.js";
7
+ import "./chunk-JO6RF2U2.js";
8
8
  import "./chunk-XAMAYRDA.js";
9
9
  import "./chunk-L7TDUIQY.js";
10
10
  import "./chunk-DL6ZILAF.js";
@@ -28,4 +28,4 @@ export {
28
28
  createWebSocketServer,
29
29
  signalMcpReady
30
30
  };
31
- //# sourceMappingURL=server-P7E2IPVL.js.map
31
+ //# sourceMappingURL=server-RYKKAOFF.js.map
@@ -12,7 +12,7 @@ import {
12
12
  setMcpTools,
13
13
  stepDoneTool,
14
14
  validateToolAction
15
- } from "./chunk-KPKSN362.js";
15
+ } from "./chunk-JO6RF2U2.js";
16
16
  import "./chunk-XAMAYRDA.js";
17
17
  import "./chunk-L7TDUIQY.js";
18
18
  import "./chunk-DL6ZILAF.js";
@@ -54,4 +54,4 @@ export {
54
54
  stepDoneTool,
55
55
  validateToolAction
56
56
  };
57
- //# sourceMappingURL=tools-WEE4XDTL.js.map
57
+ //# sourceMappingURL=tools-Y7ZGLK7A.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -71,7 +71,9 @@
71
71
  "gray-matter": "^4.0.3",
72
72
  "html2canvas": "^1.4.1",
73
73
  "http-proxy": "^1.18.1",
74
+ "iconv-lite": "^0.7.2",
74
75
  "ignore": "^7.0.5",
76
+ "jschardet": "^3.1.4",
75
77
  "node-pty": "^1.2.0-beta.12",
76
78
  "open": "^11.0.0",
77
79
  "openai": "^6.33.0",