openfox 1.0.3 → 1.0.5

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 (29) hide show
  1. package/dist/{auto-compaction-Z7YRAINH.js → auto-compaction-7RNWXTRQ.js} +4 -4
  2. package/dist/{chat-handler-OK33JXYI.js → chat-handler-ZBY3GCFF.js} +6 -6
  3. package/dist/{chunk-U6BUT37A.js → chunk-3AMXYXIA.js} +4 -4
  4. package/dist/{chunk-QYP5HQV4.js → chunk-A6NVV74R.js} +2 -2
  5. package/dist/{chunk-Z4UOHDMH.js → chunk-AOHPSZIW.js} +4 -4
  6. package/dist/{chunk-3UQACISJ.js → chunk-CDITGSG3.js} +3 -3
  7. package/dist/{chunk-7OLTTWZA.js → chunk-CUXZUI2X.js} +3 -3
  8. package/dist/{chunk-M2C5GEQR.js → chunk-GMWOLNCU.js} +2 -2
  9. package/dist/{chunk-BU2ZYOEA.js → chunk-NW7PIZH3.js} +2 -2
  10. package/dist/{chunk-4DBGHCEX.js → chunk-UYFFQTLV.js} +26 -26
  11. package/dist/{chunk-T3CH5PY4.js → chunk-WCC3HABH.js} +11 -11
  12. package/dist/{chunk-2KSCZSXQ.js → chunk-WQ4W5H6A.js} +1 -1
  13. package/dist/cli/dev.js +1 -1
  14. package/dist/cli/index.js +1 -1
  15. package/dist/{config-GIFCEJDU.js → config-VP3V5VGN.js} +4 -4
  16. package/dist/{events-G6CKHDNZ.js → events-B7S4U4DB.js} +3 -3
  17. package/dist/{folding-O52L65VN.js → folding-NZYOXNKK.js} +2 -2
  18. package/dist/{init-MKTUIGZU.js → init-T35BNPF2.js} +8 -8
  19. package/dist/{orchestrator-SMCH5J5W.js → orchestrator-NH3BO64D.js} +5 -5
  20. package/dist/package.json +1 -1
  21. package/dist/{processor-2I3OUWQP.js → processor-W55O5T6T.js} +4 -4
  22. package/dist/project-creator-HY32FPFV.js +62 -0
  23. package/dist/{provider-4KTWU6IV.js → provider-CHKLHKG5.js} +6 -6
  24. package/dist/{serve-MPHVNIEV.js → serve-3YE76OJH.js} +23 -31
  25. package/dist/server/index.js +8 -8
  26. package/dist/{tools-OP64GRLP.js → tools-EGSJDCYX.js} +4 -4
  27. package/dist/{vision-fallback-63VPBSEN.js → vision-fallback-MUKHLGFR.js} +2 -2
  28. package/package.json +1 -1
  29. package/dist/project-creator-KAQXMZCT.js +0 -70
@@ -2,9 +2,9 @@ import {
2
2
  maybeAutoCompactContext,
3
3
  performManualContextCompaction,
4
4
  resolveCompactionStatsIdentity
5
- } from "./chunk-7OLTTWZA.js";
6
- import "./chunk-BU2ZYOEA.js";
7
- import "./chunk-2KSCZSXQ.js";
5
+ } from "./chunk-CUXZUI2X.js";
6
+ import "./chunk-NW7PIZH3.js";
7
+ import "./chunk-WQ4W5H6A.js";
8
8
  import "./chunk-S4QKTRGJ.js";
9
9
  import "./chunk-22CTURMH.js";
10
10
  import "./chunk-7IOZFJBW.js";
@@ -20,4 +20,4 @@ export {
20
20
  performManualContextCompaction,
21
21
  resolveCompactionStatsIdentity
22
22
  };
23
- //# sourceMappingURL=auto-compaction-Z7YRAINH.js.map
23
+ //# sourceMappingURL=auto-compaction-7RNWXTRQ.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  runChatTurn
3
- } from "./chunk-Z4UOHDMH.js";
4
- import "./chunk-7OLTTWZA.js";
3
+ } from "./chunk-AOHPSZIW.js";
4
+ import "./chunk-CUXZUI2X.js";
5
5
  import {
6
6
  generateSessionName,
7
7
  needsNameGeneration
@@ -9,11 +9,11 @@ import {
9
9
  import {
10
10
  getEventStore,
11
11
  updateSessionMetadata
12
- } from "./chunk-BU2ZYOEA.js";
12
+ } from "./chunk-NW7PIZH3.js";
13
13
  import {
14
14
  buildMessagesFromStoredEvents,
15
15
  foldPendingConfirmations
16
- } from "./chunk-2KSCZSXQ.js";
16
+ } from "./chunk-WQ4W5H6A.js";
17
17
  import {
18
18
  createChatMessageMessage,
19
19
  createContextStateMessage,
@@ -59,7 +59,7 @@ async function startChatSession(sessionId, content, deps, options) {
59
59
  sessionManager.setRunning(sessionId, true);
60
60
  broadcastForSession(sessionId, createSessionRunningMessage(true));
61
61
  try {
62
- const { maybeAutoCompactContext } = await import("./auto-compaction-Z7YRAINH.js");
62
+ const { maybeAutoCompactContext } = await import("./auto-compaction-7RNWXTRQ.js");
63
63
  await maybeAutoCompactContext({
64
64
  sessionManager,
65
65
  sessionId,
@@ -198,4 +198,4 @@ export {
198
198
  startChatSession,
199
199
  stopSessionExecution
200
200
  };
201
- //# sourceMappingURL=chat-handler-OK33JXYI.js.map
201
+ //# sourceMappingURL=chat-handler-ZBY3GCFF.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  describeImageFromDataUrl,
3
3
  ensureVisionFallbackConfigLoaded
4
- } from "./chunk-M2C5GEQR.js";
4
+ } from "./chunk-GMWOLNCU.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-PNBH3RAX.js";
@@ -818,7 +818,7 @@ function createLLMClient(config, initialBackend = "unknown") {
818
818
  try {
819
819
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
820
820
  await ensureVisionFallbackConfigLoaded();
821
- const { isVisionFallbackEnabled } = await import("./vision-fallback-63VPBSEN.js");
821
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-MUKHLGFR.js");
822
822
  const paramsOptions = {
823
823
  model,
824
824
  request,
@@ -896,7 +896,7 @@ function createLLMClient(config, initialBackend = "unknown") {
896
896
  });
897
897
  try {
898
898
  await ensureVisionFallbackConfigLoaded();
899
- const { isVisionFallbackEnabled } = await import("./vision-fallback-63VPBSEN.js");
899
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-MUKHLGFR.js");
900
900
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
901
901
  const createParams = await buildStreamingCreateParams({
902
902
  model,
@@ -1111,4 +1111,4 @@ export {
1111
1111
  getLlmStatus,
1112
1112
  clearModelCache
1113
1113
  };
1114
- //# sourceMappingURL=chunk-U6BUT37A.js.map
1114
+ //# sourceMappingURL=chunk-3AMXYXIA.js.map
@@ -3,7 +3,7 @@ import {
3
3
  createLLMClient,
4
4
  detectBackend,
5
5
  detectModel
6
- } from "./chunk-U6BUT37A.js";
6
+ } from "./chunk-3AMXYXIA.js";
7
7
  import {
8
8
  logger
9
9
  } from "./chunk-PNBH3RAX.js";
@@ -435,4 +435,4 @@ export {
435
435
  parseDefaultModelSelection,
436
436
  createProviderManager
437
437
  };
438
- //# sourceMappingURL=chunk-QYP5HQV4.js.map
438
+ //# sourceMappingURL=chunk-A6NVV74R.js.map
@@ -13,14 +13,14 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-7OLTTWZA.js";
16
+ } from "./chunk-CUXZUI2X.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
20
- } from "./chunk-BU2ZYOEA.js";
20
+ } from "./chunk-NW7PIZH3.js";
21
21
  import {
22
22
  buildSnapshotFromSessionState
23
- } from "./chunk-2KSCZSXQ.js";
23
+ } from "./chunk-WQ4W5H6A.js";
24
24
  import {
25
25
  createChatMessageMessage
26
26
  } from "./chunk-S4QKTRGJ.js";
@@ -311,4 +311,4 @@ export {
311
311
  runBuilderTurn,
312
312
  runVerifierTurn
313
313
  };
314
- //# sourceMappingURL=chunk-Z4UOHDMH.js.map
314
+ //# sourceMappingURL=chunk-AOHPSZIW.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  detectBackend,
3
3
  detectModel
4
- } from "./chunk-U6BUT37A.js";
4
+ } from "./chunk-3AMXYXIA.js";
5
5
  import {
6
6
  getGlobalConfigPath
7
7
  } from "./chunk-5YQAXUKO.js";
@@ -359,7 +359,7 @@ function mergeConfigs(...configs) {
359
359
  }, {
360
360
  llm: { url: "http://localhost:8000/v1", model: "auto", backend: "auto", maxContext: 2e5, disableThinking: false },
361
361
  server: { port: 10369, host: "127.0.0.1", openBrowser: true },
362
- logging: { level: "info" }
362
+ logging: { level: "error" }
363
363
  });
364
364
  return oldConfigSchema.parse(result);
365
365
  }
@@ -380,4 +380,4 @@ export {
380
380
  activateProvider,
381
381
  mergeConfigs
382
382
  };
383
- //# sourceMappingURL=chunk-3UQACISJ.js.map
383
+ //# sourceMappingURL=chunk-CDITGSG3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  getContextMessages,
3
3
  getCurrentContextWindowId,
4
4
  getEventStore
5
- } from "./chunk-BU2ZYOEA.js";
5
+ } from "./chunk-NW7PIZH3.js";
6
6
  import {
7
7
  createChatMessageMessage,
8
8
  createChatPathConfirmationMessage,
@@ -3472,7 +3472,7 @@ var callSubAgentTool = {
3472
3472
  };
3473
3473
  }
3474
3474
  try {
3475
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-OP64GRLP.js");
3475
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-EGSJDCYX.js");
3476
3476
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3477
3477
  const turnMetrics = new TurnMetrics();
3478
3478
  const result = await executeSubAgent({
@@ -4480,4 +4480,4 @@ export {
4480
4480
  getToolRegistryForAgent,
4481
4481
  createToolRegistry
4482
4482
  };
4483
- //# sourceMappingURL=chunk-7OLTTWZA.js.map
4483
+ //# sourceMappingURL=chunk-CUXZUI2X.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-GIFCEJDU.js");
32
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-VP3V5VGN.js");
33
33
  const { getRuntimeConfig } = await import("./runtime-config-2XJJIMSC.js");
34
34
  const runtimeConfig = getRuntimeConfig();
35
35
  const mode = runtimeConfig.mode ?? "production";
@@ -134,4 +134,4 @@ export {
134
134
  describeImage,
135
135
  describeImageFromDataUrl
136
136
  };
137
- //# sourceMappingURL=chunk-M2C5GEQR.js.map
137
+ //# sourceMappingURL=chunk-GMWOLNCU.js.map
@@ -3,7 +3,7 @@ import {
3
3
  buildMessagesFromStoredEvents,
4
4
  foldContextState,
5
5
  foldSessionState
6
- } from "./chunk-2KSCZSXQ.js";
6
+ } from "./chunk-WQ4W5H6A.js";
7
7
  import {
8
8
  getDatabase
9
9
  } from "./chunk-3EHGGBWE.js";
@@ -1064,4 +1064,4 @@ export {
1064
1064
  compactContext,
1065
1065
  getRecentUserPromptsForSession
1066
1066
  };
1067
- //# sourceMappingURL=chunk-BU2ZYOEA.js.map
1067
+ //# sourceMappingURL=chunk-NW7PIZH3.js.map
@@ -2,7 +2,7 @@ import {
2
2
  createVerifierNudgeConfig,
3
3
  runBuilderTurn,
4
4
  runChatTurn
5
- } from "./chunk-Z4UOHDMH.js";
5
+ } from "./chunk-AOHPSZIW.js";
6
6
  import {
7
7
  TurnMetrics,
8
8
  agentExists,
@@ -40,7 +40,7 @@ import {
40
40
  saveSkill,
41
41
  setSkillEnabled,
42
42
  skillExists
43
- } from "./chunk-7OLTTWZA.js";
43
+ } from "./chunk-CUXZUI2X.js";
44
44
  import {
45
45
  generateSessionName,
46
46
  needsNameGeneration
@@ -48,7 +48,7 @@ import {
48
48
  import {
49
49
  createProviderManager,
50
50
  parseDefaultModelSelection
51
- } from "./chunk-QYP5HQV4.js";
51
+ } from "./chunk-A6NVV74R.js";
52
52
  import {
53
53
  createSession,
54
54
  deleteSession,
@@ -73,12 +73,12 @@ import {
73
73
  updateSessionMetadata,
74
74
  updateSessionProvider,
75
75
  updateSessionSummary
76
- } from "./chunk-BU2ZYOEA.js";
76
+ } from "./chunk-NW7PIZH3.js";
77
77
  import {
78
78
  buildContextMessagesFromEventHistory,
79
79
  buildMessagesFromStoredEvents,
80
80
  foldPendingConfirmations
81
- } from "./chunk-2KSCZSXQ.js";
81
+ } from "./chunk-WQ4W5H6A.js";
82
82
  import {
83
83
  createChatErrorMessage,
84
84
  createChatMessageMessage,
@@ -124,7 +124,7 @@ import {
124
124
  getBackendDisplayName,
125
125
  getLlmStatus,
126
126
  getModelProfile
127
- } from "./chunk-U6BUT37A.js";
127
+ } from "./chunk-3AMXYXIA.js";
128
128
  import {
129
129
  getGlobalConfigDir
130
130
  } from "./chunk-5YQAXUKO.js";
@@ -5454,7 +5454,7 @@ async function createServerHandle(config) {
5454
5454
  if (!name || !workdir) {
5455
5455
  return res.status(400).json({ error: "name and workdir are required" });
5456
5456
  }
5457
- const { createDirectoryWithGit } = await import("./project-creator-KAQXMZCT.js");
5457
+ const { createDirectoryWithGit } = await import("./project-creator-HY32FPFV.js");
5458
5458
  const project = await createDirectoryWithGit(name, workdir);
5459
5459
  res.status(201).json({ project });
5460
5460
  });
@@ -5488,7 +5488,7 @@ async function createServerHandle(config) {
5488
5488
  res.json({ success: true });
5489
5489
  });
5490
5490
  app.get("/api/sessions", async (req, res) => {
5491
- const { getRecentUserPromptsForSession } = await import("./events-G6CKHDNZ.js");
5491
+ const { getRecentUserPromptsForSession } = await import("./events-B7S4U4DB.js");
5492
5492
  const projectId = req.query["projectId"];
5493
5493
  const limit = Math.min(parseInt(req.query["limit"]) || 20, 100);
5494
5494
  const offset = parseInt(req.query["offset"]) || 0;
@@ -5521,8 +5521,8 @@ async function createServerHandle(config) {
5521
5521
  res.status(201).json({ session });
5522
5522
  });
5523
5523
  app.get("/api/sessions/:id", async (req, res) => {
5524
- const { getEventStore: getEventStore2 } = await import("./events-G6CKHDNZ.js");
5525
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-O52L65VN.js");
5524
+ const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
5525
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
5526
5526
  const session = sessionManager.getSession(req.params.id);
5527
5527
  if (!session) {
5528
5528
  return res.status(404).json({ error: "Session not found" });
@@ -5552,8 +5552,8 @@ async function createServerHandle(config) {
5552
5552
  res.json({ success: true });
5553
5553
  });
5554
5554
  app.post("/api/sessions/:id/provider", async (req, res) => {
5555
- const { getEventStore: getEventStore2 } = await import("./events-G6CKHDNZ.js");
5556
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-O52L65VN.js");
5555
+ const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
5556
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
5557
5557
  const sessionId = req.params.id;
5558
5558
  const session = sessionManager.getSession(sessionId);
5559
5559
  if (!session) {
@@ -5564,7 +5564,7 @@ async function createServerHandle(config) {
5564
5564
  return res.status(400).json({ error: "providerId is required" });
5565
5565
  }
5566
5566
  sessionManager.setSessionProvider(sessionId, providerId, model ?? "auto");
5567
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
5567
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
5568
5568
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
5569
5569
  const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model ?? "auto");
5570
5570
  await saveGlobalConfig(config.mode ?? "production", updatedConfig);
@@ -5590,8 +5590,8 @@ async function createServerHandle(config) {
5590
5590
  res.json({ success: true });
5591
5591
  });
5592
5592
  app.put("/api/sessions/:id/mode", async (req, res) => {
5593
- const { getEventStore: getEventStore2 } = await import("./events-G6CKHDNZ.js");
5594
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-O52L65VN.js");
5593
+ const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
5594
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2 } = await import("./folding-NZYOXNKK.js");
5595
5595
  const sessionId = req.params.id;
5596
5596
  const session = sessionManager.getSession(sessionId);
5597
5597
  if (!session) {
@@ -5629,13 +5629,13 @@ async function createServerHandle(config) {
5629
5629
  if (!callId || approved === void 0) {
5630
5630
  return res.status(400).json({ error: "callId and approved are required" });
5631
5631
  }
5632
- const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-OP64GRLP.js");
5632
+ const { providePathConfirmation: providePathConfirmation2 } = await import("./tools-EGSJDCYX.js");
5633
5633
  const result = providePathConfirmation2(callId, approved, alwaysAllow);
5634
5634
  if (!result.found) {
5635
5635
  return res.status(404).json({ error: "No pending path confirmation with that ID" });
5636
5636
  }
5637
- const { getEventStore: getEventStore2 } = await import("./events-G6CKHDNZ.js");
5638
- const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-O52L65VN.js");
5637
+ const { getEventStore: getEventStore2 } = await import("./events-B7S4U4DB.js");
5638
+ const { buildMessagesFromStoredEvents: buildMessagesFromStoredEvents2, foldPendingConfirmations: foldPendingConfirmations2 } = await import("./folding-NZYOXNKK.js");
5639
5639
  const { createSessionStateMessage: createSessionStateMessage2 } = await import("./protocol-WQENDK72.js");
5640
5640
  const eventStore = getEventStore2();
5641
5641
  const events = eventStore.getEvents(sessionId);
@@ -5654,7 +5654,7 @@ async function createServerHandle(config) {
5654
5654
  if (!callId || !answer) {
5655
5655
  return res.status(400).json({ error: "callId and answer are required" });
5656
5656
  }
5657
- const { provideAnswer: provideAnswer2 } = await import("./tools-OP64GRLP.js");
5657
+ const { provideAnswer: provideAnswer2 } = await import("./tools-EGSJDCYX.js");
5658
5658
  const found = provideAnswer2(callId, answer);
5659
5659
  if (!found) {
5660
5660
  return res.status(404).json({ error: "No pending question with that ID" });
@@ -5690,14 +5690,14 @@ async function createServerHandle(config) {
5690
5690
  if (!session) {
5691
5691
  return res.status(404).json({ error: "Session not found" });
5692
5692
  }
5693
- const { stopSessionExecution } = await import("./chat-handler-OK33JXYI.js");
5694
- const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-OP64GRLP.js");
5693
+ const { stopSessionExecution } = await import("./chat-handler-ZBY3GCFF.js");
5694
+ const { cancelQuestionsForSession: cancelQuestionsForSession2, cancelPathConfirmationsForSession: cancelPathConfirmationsForSession2 } = await import("./tools-EGSJDCYX.js");
5695
5695
  stopSessionExecution(sessionId, sessionManager);
5696
5696
  abortSession(sessionId);
5697
5697
  cancelQuestionsForSession2(sessionId, "Session stopped by user");
5698
5698
  cancelPathConfirmationsForSession2(sessionId, "Session stopped by user");
5699
5699
  sessionManager.clearMessageQueue(sessionId);
5700
- const eventStore = (await import("./events-G6CKHDNZ.js")).getEventStore();
5700
+ const eventStore = (await import("./events-B7S4U4DB.js")).getEventStore();
5701
5701
  eventStore.append(sessionId, { type: "running.changed", data: { isRunning: false } });
5702
5702
  res.json({ success: true });
5703
5703
  });
@@ -5806,7 +5806,7 @@ async function createServerHandle(config) {
5806
5806
  return res.status(400).json({ error: result.error });
5807
5807
  }
5808
5808
  const llmClient = getLLMClient();
5809
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
5809
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
5810
5810
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
5811
5811
  const updatedConfig = setDefaultModelSelection(globalConfig, id, llmClient.getModel());
5812
5812
  await saveGlobalConfig(config.mode ?? "production", updatedConfig);
@@ -5827,7 +5827,7 @@ async function createServerHandle(config) {
5827
5827
  if (!result.success) {
5828
5828
  return res.status(400).json({ error: result.error });
5829
5829
  }
5830
- const { loadGlobalConfig, saveGlobalConfig } = await import("./config-GIFCEJDU.js");
5830
+ const { loadGlobalConfig, saveGlobalConfig } = await import("./config-VP3V5VGN.js");
5831
5831
  const globalConfig = await loadGlobalConfig(config.mode ?? "production");
5832
5832
  const updatedProviders = providerManager.getProviders();
5833
5833
  const updatedConfig = {
@@ -6012,7 +6012,7 @@ async function createServerHandle(config) {
6012
6012
  providerManager
6013
6013
  );
6014
6014
  const wss = wssExports.wss;
6015
- const { QueueProcessor } = await import("./processor-2I3OUWQP.js");
6015
+ const { QueueProcessor } = await import("./processor-W55O5T6T.js");
6016
6016
  const queueProcessor = new QueueProcessor({
6017
6017
  sessionManager,
6018
6018
  providerManager,
@@ -6082,4 +6082,4 @@ export {
6082
6082
  createServerHandle,
6083
6083
  createServer
6084
6084
  };
6085
- //# sourceMappingURL=chunk-4DBGHCEX.js.map
6085
+ //# sourceMappingURL=chunk-UYFFQTLV.js.map
@@ -24,7 +24,7 @@ Options:
24
24
  `);
25
25
  }
26
26
  async function runConfig(mode) {
27
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-GIFCEJDU.js");
27
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-VP3V5VGN.js");
28
28
  const { getGlobalConfigPath } = await import("./paths-MM76AWYB.js");
29
29
  const config = await loadGlobalConfig(mode);
30
30
  const configPath = getGlobalConfigPath(mode);
@@ -75,8 +75,8 @@ async function runCli(options) {
75
75
  const [command] = positionals;
76
76
  switch (command) {
77
77
  case "init": {
78
- const { runInitWithSelect } = await import("./init-MKTUIGZU.js");
79
- const { loadGlobalConfig, getActiveProvider } = await import("./config-GIFCEJDU.js");
78
+ const { runInitWithSelect } = await import("./init-T35BNPF2.js");
79
+ const { loadGlobalConfig, getActiveProvider } = await import("./config-VP3V5VGN.js");
80
80
  const config = await loadGlobalConfig(mode);
81
81
  const activeProvider = getActiveProvider(config);
82
82
  if (activeProvider) {
@@ -91,24 +91,24 @@ async function runCli(options) {
91
91
  break;
92
92
  }
93
93
  case "provider": {
94
- const { runProviderCommand } = await import("./provider-4KTWU6IV.js");
94
+ const { runProviderCommand } = await import("./provider-CHKLHKG5.js");
95
95
  const [, subcommand] = positionals;
96
96
  await runProviderCommand(mode, subcommand);
97
97
  break;
98
98
  }
99
99
  default: {
100
- const { configFileExists } = await import("./config-GIFCEJDU.js");
100
+ const { configFileExists } = await import("./config-VP3V5VGN.js");
101
101
  const configExists = await configFileExists(mode);
102
102
  if (!configExists) {
103
103
  console.log("Welcome to OpenFox!\n");
104
- const { trySmartDefaults, saveGlobalConfig, addProvider } = await import("./config-GIFCEJDU.js");
104
+ const { trySmartDefaults, saveGlobalConfig, addProvider } = await import("./config-VP3V5VGN.js");
105
105
  const detected = await trySmartDefaults(mode);
106
106
  if (detected) {
107
107
  console.log(`\u2713 Found ${detected.backend} (${detected.model}) at ${detected.url}`);
108
108
  const baseConfig = {
109
109
  providers: [],
110
110
  server: { port: 10369, host: "127.0.0.1", openBrowser: true },
111
- logging: { level: "info" },
111
+ logging: { level: "error" },
112
112
  database: { path: "" },
113
113
  workspace: { workdir: process.cwd() }
114
114
  };
@@ -119,17 +119,17 @@ async function runCli(options) {
119
119
  models: [],
120
120
  isActive: true
121
121
  });
122
- const { setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
122
+ const { setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
123
123
  const finalConfig = setDefaultModelSelection(configWithProvider, configWithProvider.providers[0].id, detected.model);
124
124
  await saveGlobalConfig(mode, finalConfig);
125
125
  console.log("Configuration saved!\n");
126
126
  } else {
127
127
  console.log("\u2717 No LLM server detected\n");
128
- const { runInitWithSelect } = await import("./init-MKTUIGZU.js");
128
+ const { runInitWithSelect } = await import("./init-T35BNPF2.js");
129
129
  await runInitWithSelect(mode);
130
130
  }
131
131
  }
132
- const { runServe } = await import("./serve-MPHVNIEV.js");
132
+ const { runServe } = await import("./serve-3YE76OJH.js");
133
133
  await runServe({
134
134
  mode,
135
135
  port: values.port ? parseInt(values.port) : void 0,
@@ -142,4 +142,4 @@ async function runCli(options) {
142
142
  export {
143
143
  runCli
144
144
  };
145
- //# sourceMappingURL=chunk-T3CH5PY4.js.map
145
+ //# sourceMappingURL=chunk-WCC3HABH.js.map
@@ -677,4 +677,4 @@ export {
677
677
  getMessagesForWindow,
678
678
  buildContextMessagesFromMessages
679
679
  };
680
- //# sourceMappingURL=chunk-2KSCZSXQ.js.map
680
+ //# sourceMappingURL=chunk-WQ4W5H6A.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-T3CH5PY4.js";
4
+ } from "../chunk-WCC3HABH.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-T3CH5PY4.js";
4
+ } from "../chunk-WCC3HABH.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -13,11 +13,11 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  trySmartDefaults
16
- } from "./chunk-3UQACISJ.js";
17
- import "./chunk-U6BUT37A.js";
16
+ } from "./chunk-CDITGSG3.js";
17
+ import "./chunk-3AMXYXIA.js";
18
18
  import "./chunk-XFXOSPYH.js";
19
19
  import "./chunk-5YQAXUKO.js";
20
- import "./chunk-M2C5GEQR.js";
20
+ import "./chunk-GMWOLNCU.js";
21
21
  import "./chunk-PNBH3RAX.js";
22
22
  export {
23
23
  activateProvider,
@@ -35,4 +35,4 @@ export {
35
35
  setDefaultModelSelection,
36
36
  trySmartDefaults
37
37
  };
38
- //# sourceMappingURL=config-GIFCEJDU.js.map
38
+ //# sourceMappingURL=config-VP3V5VGN.js.map
@@ -36,7 +36,7 @@ import {
36
36
  isFileInCache,
37
37
  isStoredEvent,
38
38
  isTurnEvent
39
- } from "./chunk-BU2ZYOEA.js";
39
+ } from "./chunk-NW7PIZH3.js";
40
40
  import {
41
41
  buildContextMessagesFromEventHistory,
42
42
  buildContextMessagesFromMessages,
@@ -53,7 +53,7 @@ import {
53
53
  foldTodos,
54
54
  foldTurnEventsToSnapshotMessages,
55
55
  getMessagesForWindow
56
- } from "./chunk-2KSCZSXQ.js";
56
+ } from "./chunk-WQ4W5H6A.js";
57
57
  import "./chunk-3EHGGBWE.js";
58
58
  import "./chunk-TVQOONDR.js";
59
59
  import "./chunk-PNBH3RAX.js";
@@ -111,4 +111,4 @@ export {
111
111
  isStoredEvent,
112
112
  isTurnEvent
113
113
  };
114
- //# sourceMappingURL=events-G6CKHDNZ.js.map
114
+ //# sourceMappingURL=events-B7S4U4DB.js.map
@@ -15,7 +15,7 @@ import {
15
15
  foldTodos,
16
16
  foldTurnEventsToSnapshotMessages,
17
17
  getMessagesForWindow
18
- } from "./chunk-2KSCZSXQ.js";
18
+ } from "./chunk-WQ4W5H6A.js";
19
19
  export {
20
20
  buildContextMessagesFromEventHistory,
21
21
  buildContextMessagesFromMessages,
@@ -34,4 +34,4 @@ export {
34
34
  foldTurnEventsToSnapshotMessages,
35
35
  getMessagesForWindow
36
36
  };
37
- //# sourceMappingURL=folding-O52L65VN.js.map
37
+ //# sourceMappingURL=folding-NZYOXNKK.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  addProvider,
3
3
  saveGlobalConfig
4
- } from "./chunk-3UQACISJ.js";
4
+ } from "./chunk-CDITGSG3.js";
5
5
  import {
6
6
  detectBackend,
7
7
  detectModel
8
- } from "./chunk-U6BUT37A.js";
8
+ } from "./chunk-3AMXYXIA.js";
9
9
  import "./chunk-XFXOSPYH.js";
10
10
  import "./chunk-5YQAXUKO.js";
11
- import "./chunk-M2C5GEQR.js";
11
+ import "./chunk-GMWOLNCU.js";
12
12
  import "./chunk-PNBH3RAX.js";
13
13
 
14
14
  // src/cli/init.ts
@@ -26,7 +26,7 @@ function createBaseConfig() {
26
26
  activeProviderId: void 0,
27
27
  activeWorkflowId: void 0,
28
28
  server: { port: 10369, host: "127.0.0.1", openBrowser: true },
29
- logging: { level: "info" },
29
+ logging: { level: "error" },
30
30
  database: { path: "" },
31
31
  workspace: { workdir: process.cwd() },
32
32
  visionFallback: { enabled: false, url: "http://localhost:11434", model: "qwen3-vl:2b", timeout: 120 }
@@ -136,7 +136,7 @@ async function runInitWithSelect(mode, existingConfig) {
136
136
  models: [],
137
137
  isActive: true
138
138
  });
139
- const { setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
139
+ const { setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
140
140
  config = setDefaultModelSelection(config, config.providers[config.providers.length - 1].id, model ?? "auto");
141
141
  } catch {
142
142
  s2.stop("Server isn't available");
@@ -160,7 +160,7 @@ async function runInitWithSelect(mode, existingConfig) {
160
160
  models: [],
161
161
  isActive: true
162
162
  });
163
- const { setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
163
+ const { setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
164
164
  config = setDefaultModelSelection(config, config.providers[config.providers.length - 1].id, "auto");
165
165
  }
166
166
  }
@@ -206,7 +206,7 @@ async function runInitWithSelect(mode, existingConfig) {
206
206
  };
207
207
  }
208
208
  if (config.providers.length > 0 && !config.defaultModelSelection) {
209
- const { setDefaultModelSelection } = await import("./config-GIFCEJDU.js");
209
+ const { setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
210
210
  config = setDefaultModelSelection(config, config.providers[0].id, "auto");
211
211
  }
212
212
  await saveGlobalConfig(mode, config);
@@ -215,4 +215,4 @@ async function runInitWithSelect(mode, existingConfig) {
215
215
  export {
216
216
  runInitWithSelect
217
217
  };
218
- //# sourceMappingURL=init-MKTUIGZU.js.map
218
+ //# sourceMappingURL=init-T35BNPF2.js.map
@@ -3,7 +3,7 @@ import {
3
3
  runBuilderTurn,
4
4
  runChatTurn,
5
5
  runVerifierTurn
6
- } from "./chunk-Z4UOHDMH.js";
6
+ } from "./chunk-AOHPSZIW.js";
7
7
  import {
8
8
  TurnMetrics,
9
9
  createChatDoneEvent,
@@ -11,9 +11,9 @@ import {
11
11
  createMessageStartEvent,
12
12
  createToolCallEvent,
13
13
  createToolResultEvent
14
- } from "./chunk-7OLTTWZA.js";
15
- import "./chunk-BU2ZYOEA.js";
16
- import "./chunk-2KSCZSXQ.js";
14
+ } from "./chunk-CUXZUI2X.js";
15
+ import "./chunk-NW7PIZH3.js";
16
+ import "./chunk-WQ4W5H6A.js";
17
17
  import "./chunk-S4QKTRGJ.js";
18
18
  import "./chunk-22CTURMH.js";
19
19
  import "./chunk-7IOZFJBW.js";
@@ -36,4 +36,4 @@ export {
36
36
  runChatTurn,
37
37
  runVerifierTurn
38
38
  };
39
- //# sourceMappingURL=orchestrator-SMCH5J5W.js.map
39
+ //# sourceMappingURL=orchestrator-NH3BO64D.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -5,11 +5,11 @@ import {
5
5
  import {
6
6
  getEventStore,
7
7
  updateSessionMetadata
8
- } from "./chunk-BU2ZYOEA.js";
8
+ } from "./chunk-NW7PIZH3.js";
9
9
  import {
10
10
  buildMessagesFromStoredEvents,
11
11
  foldPendingConfirmations
12
- } from "./chunk-2KSCZSXQ.js";
12
+ } from "./chunk-WQ4W5H6A.js";
13
13
  import {
14
14
  createChatMessageMessage,
15
15
  createContextStateMessage,
@@ -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-SMCH5J5W.js");
191
+ const { runChatTurn } = await import("./orchestrator-NH3BO64D.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-2I3OUWQP.js.map
236
+ //# sourceMappingURL=processor-W55O5T6T.js.map
@@ -0,0 +1,62 @@
1
+ import {
2
+ createProject
3
+ } from "./chunk-XKFPU2FA.js";
4
+ import "./chunk-3EHGGBWE.js";
5
+ import "./chunk-PNBH3RAX.js";
6
+
7
+ // src/server/utils/project-creator.ts
8
+ import { execSync } from "child_process";
9
+ import { join } from "path";
10
+ function validateProjectName(name) {
11
+ if (!name || name.trim() === "") {
12
+ return { valid: false, error: "Project name cannot be empty" };
13
+ }
14
+ if (!/^[a-zA-Z0-9._ -]+$/.test(name)) {
15
+ return { valid: false, error: "Project name can only contain letters, numbers, hyphens, underscores, dots, and spaces" };
16
+ }
17
+ if (name.includes("/") || name.includes("\\") || name.includes("..")) {
18
+ return { valid: false, error: "Project name cannot contain path separators" };
19
+ }
20
+ return { valid: true };
21
+ }
22
+ async function directoryExists(path) {
23
+ try {
24
+ const { access } = await import("fs/promises");
25
+ const { constants } = await import("fs");
26
+ await access(path, constants.F_OK);
27
+ return true;
28
+ } catch {
29
+ return false;
30
+ }
31
+ }
32
+ async function createDirectoryWithGit(projectName, workdir) {
33
+ const validation = validateProjectName(projectName);
34
+ if (!validation.valid) {
35
+ throw new Error(validation.error);
36
+ }
37
+ const fullPath = workdir.replace(/\/+$/, "");
38
+ const { stat, mkdir } = await import("fs/promises");
39
+ try {
40
+ const stats = await stat(fullPath);
41
+ if (!stats.isDirectory()) {
42
+ throw new Error(`A file named '${projectName}' already exists at ${fullPath}`);
43
+ }
44
+ } catch {
45
+ await mkdir(fullPath, { recursive: true });
46
+ }
47
+ if (!await directoryExists(join(fullPath, ".git"))) {
48
+ try {
49
+ execSync("git init", { cwd: fullPath, stdio: "pipe" });
50
+ } catch (gitErr) {
51
+ const { rm } = await import("fs/promises");
52
+ await rm(fullPath, { recursive: true, force: true });
53
+ throw new Error(`Failed to initialize git: ${gitErr instanceof Error ? gitErr.message : "Unknown"}`);
54
+ }
55
+ }
56
+ return createProject(projectName, fullPath);
57
+ }
58
+ export {
59
+ createDirectoryWithGit,
60
+ validateProjectName
61
+ };
62
+ //# sourceMappingURL=project-creator-HY32FPFV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fetchAvailableModelsFromBackend
3
- } from "./chunk-QYP5HQV4.js";
3
+ } from "./chunk-A6NVV74R.js";
4
4
  import {
5
5
  activateProvider,
6
6
  addProvider,
@@ -8,14 +8,14 @@ import {
8
8
  loadGlobalConfig,
9
9
  removeProvider,
10
10
  saveGlobalConfig
11
- } from "./chunk-3UQACISJ.js";
11
+ } from "./chunk-CDITGSG3.js";
12
12
  import {
13
13
  detectBackend,
14
14
  detectModel
15
- } from "./chunk-U6BUT37A.js";
15
+ } from "./chunk-3AMXYXIA.js";
16
16
  import "./chunk-XFXOSPYH.js";
17
17
  import "./chunk-5YQAXUKO.js";
18
- import "./chunk-M2C5GEQR.js";
18
+ import "./chunk-GMWOLNCU.js";
19
19
  import "./chunk-PNBH3RAX.js";
20
20
 
21
21
  // 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-GIFCEJDU.js");
251
+ const { setDefaultModelSelection } = await import("./config-VP3V5VGN.js");
252
252
  newConfig = setDefaultModelSelection(newConfig, newConfig.providers[newConfig.providers.length - 1].id, selectedModel);
253
253
  }
254
254
  await saveGlobalConfig(mode, newConfig);
@@ -372,4 +372,4 @@ export {
372
372
  runProviderRemove,
373
373
  runProviderUse
374
374
  };
375
- //# sourceMappingURL=provider-4KTWU6IV.js.map
375
+ //# sourceMappingURL=provider-CHKLHKG5.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-4DBGHCEX.js";
4
- import "./chunk-Z4UOHDMH.js";
5
- import "./chunk-7OLTTWZA.js";
3
+ } from "./chunk-UYFFQTLV.js";
4
+ import "./chunk-AOHPSZIW.js";
5
+ import "./chunk-CUXZUI2X.js";
6
6
  import "./chunk-QDEKU5RL.js";
7
- import "./chunk-QYP5HQV4.js";
8
- import "./chunk-BU2ZYOEA.js";
9
- import "./chunk-2KSCZSXQ.js";
7
+ import "./chunk-A6NVV74R.js";
8
+ import "./chunk-NW7PIZH3.js";
9
+ import "./chunk-WQ4W5H6A.js";
10
10
  import "./chunk-S4QKTRGJ.js";
11
11
  import "./chunk-22CTURMH.js";
12
12
  import "./chunk-7IOZFJBW.js";
@@ -21,42 +21,34 @@ import {
21
21
  getActiveProvider,
22
22
  getDefaultModel,
23
23
  loadGlobalConfig
24
- } from "./chunk-3UQACISJ.js";
25
- import "./chunk-U6BUT37A.js";
24
+ } from "./chunk-CDITGSG3.js";
25
+ import "./chunk-3AMXYXIA.js";
26
26
  import "./chunk-XFXOSPYH.js";
27
27
  import {
28
28
  ensureDataDirExists,
29
29
  getDatabasePath,
30
30
  getGlobalConfigPath
31
31
  } from "./chunk-5YQAXUKO.js";
32
- import "./chunk-M2C5GEQR.js";
32
+ import "./chunk-GMWOLNCU.js";
33
33
  import {
34
34
  logger
35
35
  } from "./chunk-PNBH3RAX.js";
36
36
 
37
37
  // src/server/utils/network.ts
38
38
  import os from "os";
39
- import { statSync, readFileSync } from "fs";
40
- import { dirname, join } from "path";
39
+ import { statSync } from "fs";
40
+
41
+ // src/constants.ts
42
+ import { readFileSync, existsSync } from "fs";
43
+ import { join } from "path";
44
+ var pkgPath = join(process.cwd(), "package.json");
45
+ var pkg = existsSync(pkgPath) ? JSON.parse(readFileSync(pkgPath, "utf-8")) : { version: "0.0.0" };
46
+ var isDev = process.env["OPENFOX_DEV"] === "true";
47
+ var VERSION = isDev ? `${pkg.version}-dev` : pkg.version;
48
+
49
+ // src/server/utils/network.ts
41
50
  function getVersion() {
42
- const possiblePaths = [];
43
- possiblePaths.push(join(process.cwd(), "package.json"));
44
- const entryPoint = process.argv[1];
45
- if (entryPoint) {
46
- const cliDir = dirname(entryPoint);
47
- possiblePaths.push(join(cliDir, "../../package.json"));
48
- possiblePaths.push(join(cliDir, "../../../package.json"));
49
- }
50
- for (const packageJsonPath of possiblePaths) {
51
- try {
52
- const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
53
- if (packageJson.version && typeof packageJson.version === "string") {
54
- return packageJson.version;
55
- }
56
- } catch {
57
- }
58
- }
59
- return "unknown";
51
+ return VERSION;
60
52
  }
61
53
  function getNetworkInterfaces() {
62
54
  const interfaces = os.networkInterfaces();
@@ -178,7 +170,7 @@ async function runServe(options) {
178
170
  path: env.database.path !== "./openfox.db" ? env.database.path : getDatabasePath(mode)
179
171
  },
180
172
  logging: {
181
- level: globalConfig.logging?.level ?? "info"
173
+ level: globalConfig.logging?.level ?? "error"
182
174
  },
183
175
  mode,
184
176
  // Pass providers for the server to use
@@ -206,4 +198,4 @@ async function runServe(options) {
206
198
  export {
207
199
  runServe
208
200
  };
209
- //# sourceMappingURL=serve-MPHVNIEV.js.map
201
+ //# sourceMappingURL=serve-3YE76OJH.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-4DBGHCEX.js";
5
- import "../chunk-Z4UOHDMH.js";
6
- import "../chunk-7OLTTWZA.js";
4
+ } from "../chunk-UYFFQTLV.js";
5
+ import "../chunk-AOHPSZIW.js";
6
+ import "../chunk-CUXZUI2X.js";
7
7
  import "../chunk-QDEKU5RL.js";
8
- import "../chunk-QYP5HQV4.js";
9
- import "../chunk-BU2ZYOEA.js";
10
- import "../chunk-2KSCZSXQ.js";
8
+ import "../chunk-A6NVV74R.js";
9
+ import "../chunk-NW7PIZH3.js";
10
+ import "../chunk-WQ4W5H6A.js";
11
11
  import "../chunk-S4QKTRGJ.js";
12
12
  import "../chunk-22CTURMH.js";
13
13
  import "../chunk-7IOZFJBW.js";
@@ -16,10 +16,10 @@ import "../chunk-3EHGGBWE.js";
16
16
  import "../chunk-QY7BMXWT.js";
17
17
  import "../chunk-TPT6HP4H.js";
18
18
  import "../chunk-TVQOONDR.js";
19
- import "../chunk-U6BUT37A.js";
19
+ import "../chunk-3AMXYXIA.js";
20
20
  import "../chunk-XFXOSPYH.js";
21
21
  import "../chunk-5YQAXUKO.js";
22
- import "../chunk-M2C5GEQR.js";
22
+ import "../chunk-GMWOLNCU.js";
23
23
  import "../chunk-PNBH3RAX.js";
24
24
  export {
25
25
  createServer,
@@ -11,9 +11,9 @@ import {
11
11
  requestPathAccess,
12
12
  stepDoneTool,
13
13
  validateToolAction
14
- } from "./chunk-7OLTTWZA.js";
15
- import "./chunk-BU2ZYOEA.js";
16
- import "./chunk-2KSCZSXQ.js";
14
+ } from "./chunk-CUXZUI2X.js";
15
+ import "./chunk-NW7PIZH3.js";
16
+ import "./chunk-WQ4W5H6A.js";
17
17
  import "./chunk-S4QKTRGJ.js";
18
18
  import {
19
19
  AskUserInterrupt,
@@ -45,4 +45,4 @@ export {
45
45
  stepDoneTool,
46
46
  validateToolAction
47
47
  };
48
- //# sourceMappingURL=tools-OP64GRLP.js.map
48
+ //# sourceMappingURL=tools-EGSJDCYX.js.map
@@ -7,7 +7,7 @@ import {
7
7
  getVisionFallbackConfig,
8
8
  isVisionFallbackEnabled,
9
9
  setVisionFallbackConfig
10
- } from "./chunk-M2C5GEQR.js";
10
+ } from "./chunk-GMWOLNCU.js";
11
11
  import "./chunk-PNBH3RAX.js";
12
12
  export {
13
13
  clearDescriptionCache,
@@ -19,4 +19,4 @@ export {
19
19
  isVisionFallbackEnabled,
20
20
  setVisionFallbackConfig
21
21
  };
22
- //# sourceMappingURL=vision-fallback-63VPBSEN.js.map
22
+ //# sourceMappingURL=vision-fallback-MUKHLGFR.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,70 +0,0 @@
1
- import {
2
- createProject
3
- } from "./chunk-XKFPU2FA.js";
4
- import "./chunk-3EHGGBWE.js";
5
- import "./chunk-PNBH3RAX.js";
6
-
7
- // src/server/utils/project-creator.ts
8
- import { mkdir } from "fs/promises";
9
- import { execSync } from "child_process";
10
- import { join } from "path";
11
- function validateProjectName(name) {
12
- if (!name || name.trim() === "") {
13
- return { valid: false, error: "Project name cannot be empty" };
14
- }
15
- const validPattern = /^[a-zA-Z0-9._ -]+$/;
16
- if (!validPattern.test(name)) {
17
- return {
18
- valid: false,
19
- error: "Project name can only contain letters, numbers, hyphens, underscores, dots, and spaces"
20
- };
21
- }
22
- if (name.includes("/") || name.includes("\\") || name.includes("..")) {
23
- return { valid: false, error: "Project name cannot contain path separators" };
24
- }
25
- return { valid: true };
26
- }
27
- async function directoryExists(path) {
28
- try {
29
- const { access } = await import("fs/promises");
30
- const { constants } = await import("fs");
31
- await access(path, constants.F_OK);
32
- return true;
33
- } catch {
34
- return false;
35
- }
36
- }
37
- async function createDirectoryWithGit(projectName, workdir) {
38
- const validation = validateProjectName(projectName);
39
- if (!validation.valid) {
40
- throw new Error(validation.error);
41
- }
42
- const sanitizedName = projectName.trim().replace(/\s+/g, "-");
43
- const fullPath = join(workdir, sanitizedName);
44
- const exists = await directoryExists(fullPath);
45
- if (exists) {
46
- throw new Error(`Directory already exists: ${fullPath}. Please choose a different name or use the existing directory from Browse Projects.`);
47
- }
48
- try {
49
- await mkdir(fullPath, { recursive: true });
50
- } catch (error) {
51
- const errorMessage = error instanceof Error ? error.message : "Unknown error";
52
- throw new Error(`Failed to create directory: ${errorMessage}`);
53
- }
54
- try {
55
- execSync("git init", { cwd: fullPath, stdio: "pipe" });
56
- } catch (error) {
57
- const { rm } = await import("fs/promises");
58
- await rm(fullPath, { recursive: true, force: true });
59
- const errorMessage = error instanceof Error ? error.message : "Unknown error";
60
- throw new Error(`Failed to initialize git repository: ${errorMessage}`);
61
- }
62
- const project = createProject(projectName, workdir);
63
- return project;
64
- }
65
- export {
66
- createDirectoryWithGit,
67
- directoryExists,
68
- validateProjectName
69
- };
70
- //# sourceMappingURL=project-creator-KAQXMZCT.js.map