openfox 1.6.8 → 1.6.10

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.
@@ -2,7 +2,7 @@ import {
2
2
  maybeAutoCompactContext,
3
3
  performManualContextCompaction,
4
4
  resolveCompactionStatsIdentity
5
- } from "./chunk-HQMKN766.js";
5
+ } from "./chunk-E5HHQZBT.js";
6
6
  import "./chunk-NBU6KIOD.js";
7
7
  import "./chunk-574HZVLE.js";
8
8
  import "./chunk-XFXOSPYH.js";
@@ -22,4 +22,4 @@ export {
22
22
  performManualContextCompaction,
23
23
  resolveCompactionStatsIdentity
24
24
  };
25
- //# sourceMappingURL=auto-compaction-4762COIC.js.map
25
+ //# sourceMappingURL=auto-compaction-TO5ZFBHJ.js.map
@@ -4,8 +4,8 @@ import {
4
4
  } from "./chunk-QDEKU5RL.js";
5
5
  import {
6
6
  runChatTurn
7
- } from "./chunk-KI7I2QHO.js";
8
- import "./chunk-HQMKN766.js";
7
+ } from "./chunk-BA6N4ODY.js";
8
+ import "./chunk-E5HHQZBT.js";
9
9
  import "./chunk-NBU6KIOD.js";
10
10
  import "./chunk-574HZVLE.js";
11
11
  import "./chunk-XFXOSPYH.js";
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
61
61
  sessionManager.setRunning(sessionId, true);
62
62
  broadcastForSession(sessionId, createSessionRunningMessage(true));
63
63
  try {
64
- const { maybeAutoCompactContext } = await import("./auto-compaction-4762COIC.js");
64
+ const { maybeAutoCompactContext } = await import("./auto-compaction-TO5ZFBHJ.js");
65
65
  await maybeAutoCompactContext({
66
66
  sessionManager,
67
67
  sessionId,
@@ -200,4 +200,4 @@ export {
200
200
  startChatSession,
201
201
  stopSessionExecution
202
202
  };
203
- //# sourceMappingURL=chat-handler-3XQCPSLD.js.map
203
+ //# sourceMappingURL=chat-handler-LMJRCJP6.js.map
@@ -6,7 +6,7 @@ import {
6
6
  createVerifierNudgeConfig,
7
7
  runBuilderTurn,
8
8
  runChatTurn
9
- } from "./chunk-KI7I2QHO.js";
9
+ } from "./chunk-BA6N4ODY.js";
10
10
  import {
11
11
  TurnMetrics,
12
12
  agentExists,
@@ -44,7 +44,7 @@ import {
44
44
  saveSkill,
45
45
  setSkillEnabled,
46
46
  skillExists
47
- } from "./chunk-HQMKN766.js";
47
+ } from "./chunk-E5HHQZBT.js";
48
48
  import {
49
49
  getPathSeparator,
50
50
  getPlatformShell,
@@ -5544,7 +5544,7 @@ function createTerminalRoutes() {
5544
5544
  }
5545
5545
 
5546
5546
  // src/constants.ts
5547
- var VERSION = "1.6.8";
5547
+ var VERSION = "1.6.10";
5548
5548
 
5549
5549
  // src/server/index.ts
5550
5550
  var __dirname2 = dirname5(fileURLToPath4(import.meta.url));
@@ -5850,7 +5850,7 @@ async function createServerHandle(config) {
5850
5850
  if (!callId || approved === void 0) {
5851
5851
  return res.status(400).json({ error: "callId and approved are required" });
5852
5852
  }
5853
- const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-7OCBKLTJ.js");
5853
+ const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-2ZZVCIIL.js");
5854
5854
  const result = providePathConfirmation2(callId, approved, alwaysAllow);
5855
5855
  if (!result.found) {
5856
5856
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
@@ -5875,7 +5875,7 @@ async function createServerHandle(config) {
5875
5875
  if (!callId || !answer) {
5876
5876
  return res.status(400).json({ error: "callId and answer are required" });
5877
5877
  }
5878
- const { provideAnswer: provideAnswer2 } = await import("./tools-7OCBKLTJ.js");
5878
+ const { provideAnswer: provideAnswer2 } = await import("./tools-2ZZVCIIL.js");
5879
5879
  const found = provideAnswer2(callId, answer);
5880
5880
  if (!found) {
5881
5881
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -5911,8 +5911,8 @@ async function createServerHandle(config) {
5911
5911
  if (!session) {
5912
5912
  return res.status(404).json({ error: "Session not found" });
5913
5913
  }
5914
- const { stopSessionExecution } = await import("./chat-handler-3XQCPSLD.js");
5915
- const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-7OCBKLTJ.js");
5914
+ const { stopSessionExecution } = await import("./chat-handler-LMJRCJP6.js");
5915
+ const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-2ZZVCIIL.js");
5916
5916
  stopSessionExecution(sessionId, sessionManager);
5917
5917
  abortSession(sessionId);
5918
5918
  cancelQuestionsForSession2(sessionId, "Session stopped by user");
@@ -6360,7 +6360,7 @@ async function createServerHandle(config) {
6360
6360
  providerManager
6361
6361
  );
6362
6362
  const wss = wssExports.wss;
6363
- const { QueueProcessor } = await import("./processor-PJGSIABY.js");
6363
+ const { QueueProcessor } = await import("./processor-3EZXTCQD.js");
6364
6364
  const queueProcessor = new QueueProcessor({
6365
6365
  sessionManager,
6366
6366
  providerManager,
@@ -6433,4 +6433,4 @@ export {
6433
6433
  createServerHandle,
6434
6434
  createServer
6435
6435
  };
6436
- //# sourceMappingURL=chunk-J3EEKMJB.js.map
6436
+ //# sourceMappingURL=chunk-AAANAQ6F.js.map
@@ -13,7 +13,7 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-HQMKN766.js";
16
+ } from "./chunk-E5HHQZBT.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
@@ -311,4 +311,4 @@ export {
311
311
  runBuilderTurn,
312
312
  runVerifierTurn
313
313
  };
314
- //# sourceMappingURL=chunk-KI7I2QHO.js.map
314
+ //# sourceMappingURL=chunk-BA6N4ODY.js.map
@@ -1907,6 +1907,15 @@ function buildRegion(edits, contextStart, contextEnd, lines) {
1907
1907
  }
1908
1908
 
1909
1909
  // src/server/tools/edit.ts
1910
+ function detectLineEnding(content) {
1911
+ if (content.includes("\r\n")) return "crlf";
1912
+ if (content.includes("\n")) return "lf";
1913
+ if (content.includes("\r")) return "cr";
1914
+ return "lf";
1915
+ }
1916
+ function normalizeToLF(content) {
1917
+ return content.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
1918
+ }
1910
1919
  var editFileTool = createTool(
1911
1920
  "edit_file",
1912
1921
  {
@@ -1953,7 +1962,10 @@ var editFileTool = createTool(
1953
1962
  } catch {
1954
1963
  return helpers.error(`File not found: ${args.path}`);
1955
1964
  }
1956
- const occurrences = content.split(args.old_string).length - 1;
1965
+ const fileLineEnding = detectLineEnding(content);
1966
+ const normalizedContent = normalizeToLF(content);
1967
+ const normalizedOldString = normalizeToLF(args.old_string);
1968
+ const occurrences = normalizedContent.split(normalizedOldString).length - 1;
1957
1969
  if (occurrences === 0) {
1958
1970
  const preview = args.old_string.length > 100 ? args.old_string.slice(0, 100) + "..." : args.old_string;
1959
1971
  return helpers.error(
@@ -1970,7 +1982,7 @@ Make sure whitespace and indentation match exactly.`
1970
1982
  `Found ${occurrences} matches for old_string. Use replace_all: true to replace all, or provide more context to make the match unique.`
1971
1983
  );
1972
1984
  }
1973
- const contextResult = extractEditContext(content, args.old_string, args.new_string, replaceAll);
1985
+ const contextResult = extractEditContext(normalizedContent, normalizedOldString, normalizeToLF(args.new_string), replaceAll);
1974
1986
  const editContextRegions = contextResult.regions.map((region) => ({
1975
1987
  beforeContext: region.beforeContext.map((line) => ({
1976
1988
  lineNumber: line.lineNumber,
@@ -1991,7 +2003,8 @@ Make sure whitespace and indentation match exactly.`
1991
2003
  newContent: edit.newContent
1992
2004
  }))
1993
2005
  }));
1994
- const newContent = replaceAll ? content.replaceAll(args.old_string, args.new_string) : content.replace(args.old_string, args.new_string);
2006
+ const replacedContent = replaceAll ? normalizedContent.replaceAll(normalizedOldString, args.new_string) : normalizedContent.replace(normalizedOldString, args.new_string);
2007
+ const newContent = replacedContent.replace(/\n/g, fileLineEnding === "crlf" ? "\r\n" : fileLineEnding === "cr" ? "\r" : "\n");
1995
2008
  await writeFile3(fullPath, newContent, "utf-8");
1996
2009
  let output = `Successfully replaced ${replaceAll ? occurrences : 1} occurrence(s) in ${args.path}`;
1997
2010
  let diagnostics = [];
@@ -3651,7 +3664,7 @@ var callSubAgentTool = {
3651
3664
  };
3652
3665
  }
3653
3666
  try {
3654
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-7OCBKLTJ.js");
3667
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-2ZZVCIIL.js");
3655
3668
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3656
3669
  const turnMetrics = new TurnMetrics();
3657
3670
  const result = await executeSubAgent({
@@ -4784,4 +4797,4 @@ export {
4784
4797
  getToolRegistryForAgent,
4785
4798
  createToolRegistry
4786
4799
  };
4787
- //# sourceMappingURL=chunk-HQMKN766.js.map
4800
+ //# sourceMappingURL=chunk-E5HHQZBT.js.map
@@ -154,7 +154,7 @@ async function runCli(options) {
154
154
  if (!configExists) {
155
155
  await runNetworkSetup(mode);
156
156
  }
157
- const { runServe } = await import("./serve-XIWYZZ2R.js");
157
+ const { runServe } = await import("./serve-D4L4M7KF.js");
158
158
  await runServe({
159
159
  mode,
160
160
  port: values.port ? parseInt(values.port) : void 0,
@@ -167,4 +167,4 @@ async function runCli(options) {
167
167
  export {
168
168
  runCli
169
169
  };
170
- //# sourceMappingURL=chunk-JFOQZN2Q.js.map
170
+ //# sourceMappingURL=chunk-ULFVGMM4.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-JFOQZN2Q.js";
4
+ } from "../chunk-ULFVGMM4.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.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-JFOQZN2Q.js";
4
+ } from "../chunk-ULFVGMM4.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-KI7I2QHO.js";
6
+ } from "./chunk-BA6N4ODY.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,7 +11,7 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-HQMKN766.js";
14
+ } from "./chunk-E5HHQZBT.js";
15
15
  import "./chunk-NBU6KIOD.js";
16
16
  import "./chunk-574HZVLE.js";
17
17
  import "./chunk-XFXOSPYH.js";
@@ -38,4 +38,4 @@ export {
38
38
  runChatTurn,
39
39
  runVerifierTurn
40
40
  };
41
- //# sourceMappingURL=orchestrator-Q4VBFQZR.js.map
41
+ //# sourceMappingURL=orchestrator-YXTDPRGR.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -188,7 +188,7 @@ var QueueProcessor = class {
188
188
  backend: provider?.backend ?? llmClient.getBackend(),
189
189
  model: llmClient.getModel()
190
190
  };
191
- const { runChatTurn } = await import("./orchestrator-Q4VBFQZR.js");
191
+ const { runChatTurn } = await import("./orchestrator-YXTDPRGR.js");
192
192
  runChatTurn({
193
193
  sessionManager,
194
194
  sessionId,
@@ -233,4 +233,4 @@ var QueueProcessor = class {
233
233
  export {
234
234
  QueueProcessor
235
235
  };
236
- //# sourceMappingURL=processor-PJGSIABY.js.map
236
+ //# sourceMappingURL=processor-3EZXTCQD.js.map
@@ -6,10 +6,10 @@ import {
6
6
  import {
7
7
  VERSION,
8
8
  createServer
9
- } from "./chunk-J3EEKMJB.js";
9
+ } from "./chunk-AAANAQ6F.js";
10
10
  import "./chunk-QDEKU5RL.js";
11
- import "./chunk-KI7I2QHO.js";
12
- import "./chunk-HQMKN766.js";
11
+ import "./chunk-BA6N4ODY.js";
12
+ import "./chunk-E5HHQZBT.js";
13
13
  import "./chunk-NBU6KIOD.js";
14
14
  import "./chunk-574HZVLE.js";
15
15
  import "./chunk-GHQIXIXJ.js";
@@ -188,4 +188,4 @@ async function runServe(options) {
188
188
  export {
189
189
  runServe
190
190
  };
191
- //# sourceMappingURL=serve-XIWYZZ2R.js.map
191
+ //# sourceMappingURL=serve-D4L4M7KF.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-J3EEKMJB.js";
4
+ } from "../chunk-AAANAQ6F.js";
5
5
  import "../chunk-QDEKU5RL.js";
6
- import "../chunk-KI7I2QHO.js";
7
- import "../chunk-HQMKN766.js";
6
+ import "../chunk-BA6N4ODY.js";
7
+ import "../chunk-E5HHQZBT.js";
8
8
  import "../chunk-NBU6KIOD.js";
9
9
  import "../chunk-574HZVLE.js";
10
10
  import "../chunk-GHQIXIXJ.js";
@@ -11,7 +11,7 @@ import {
11
11
  requestPathAccess,
12
12
  stepDoneTool,
13
13
  validateToolAction
14
- } from "./chunk-HQMKN766.js";
14
+ } from "./chunk-E5HHQZBT.js";
15
15
  import "./chunk-NBU6KIOD.js";
16
16
  import "./chunk-574HZVLE.js";
17
17
  import "./chunk-XFXOSPYH.js";
@@ -47,4 +47,4 @@ export {
47
47
  stepDoneTool,
48
48
  validateToolAction
49
49
  };
50
- //# sourceMappingURL=tools-7OCBKLTJ.js.map
50
+ //# sourceMappingURL=tools-2ZZVCIIL.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.8",
3
+ "version": "1.6.10",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {