openfox 2.0.48 → 2.0.50

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.
@@ -208,7 +208,7 @@ async function runCli(options) {
208
208
  if (!configExists) {
209
209
  await runNetworkSetup(mode);
210
210
  }
211
- const { runServe } = await import("./serve-H3AYWFSE.js");
211
+ const { runServe } = await import("./serve-5FEMRPYX.js");
212
212
  const serveOptions = { mode };
213
213
  if (values.port) serveOptions.port = parseInt(values.port);
214
214
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -220,4 +220,4 @@ async function runCli(options) {
220
220
  export {
221
221
  runCli
222
222
  };
223
- //# sourceMappingURL=chunk-TQH447DP.js.map
223
+ //# sourceMappingURL=chunk-J5DFWFIH.js.map
@@ -21,7 +21,7 @@ import {
21
21
  tokenFromPassword,
22
22
  verifyPassword,
23
23
  workflowExists
24
- } from "./chunk-CZPX6AVB.js";
24
+ } from "./chunk-QYCEHUCB.js";
25
25
  import {
26
26
  agentExists,
27
27
  createToolRegistry,
@@ -3849,7 +3849,7 @@ import { Router as Router7 } from "express";
3849
3849
  import { spawn as spawn2 } from "child_process";
3850
3850
 
3851
3851
  // src/constants.ts
3852
- var VERSION = "2.0.48";
3852
+ var VERSION = "2.0.50";
3853
3853
 
3854
3854
  // src/server/routes/auto-update.ts
3855
3855
  var updateInProgress = false;
@@ -4046,7 +4046,7 @@ async function createServerHandle(config4) {
4046
4046
  setMcpTools(mcpTools);
4047
4047
  logger.info("MCP tools registered", { count: mcpTools.length });
4048
4048
  }
4049
- const { signalMcpReady } = await import("./server-7XS77JZD.js");
4049
+ const { signalMcpReady } = await import("./server-6L6I34NC.js");
4050
4050
  signalMcpReady();
4051
4051
  });
4052
4052
  const app = express();
@@ -4292,11 +4292,6 @@ async function createServerHandle(config4) {
4292
4292
  const provider = providerManager.getProviders().find((p) => p.id === providerId);
4293
4293
  const resolvedModel = model ?? provider?.models?.[0]?.id ?? "auto";
4294
4294
  sessionManager.setSessionProvider(sessionId, providerId, resolvedModel);
4295
- const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5GNT4UT.js");
4296
- const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4297
- const updatedConfig = setDefaultModelSelection(globalConfig, providerId, resolvedModel);
4298
- await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4299
- config4.defaultModelSelection = updatedConfig.defaultModelSelection;
4300
4295
  const contextState = sessionManager.getContextState(sessionId);
4301
4296
  const eventStore = getEventStore2();
4302
4297
  const events = eventStore.getEvents(sessionId);
@@ -4304,6 +4299,26 @@ async function createServerHandle(config4) {
4304
4299
  const updatedSession = sessionManager.getSession(sessionId);
4305
4300
  res.json({ session: updatedSession, messages, contextState });
4306
4301
  });
4302
+ app.post("/api/default-model", async (req, res) => {
4303
+ const { providerId, model } = req.body;
4304
+ if (!providerId || !model) {
4305
+ return res.status(400).json({ error: "providerId and model are required" });
4306
+ }
4307
+ const provider = providerManager.getProviders().find((p) => p.id === providerId);
4308
+ if (!provider) {
4309
+ return res.status(404).json({ error: "Provider not found" });
4310
+ }
4311
+ const result = await providerManager.setDefaultModelSelection(providerId, model);
4312
+ if (!result.success) {
4313
+ return res.status(500).json({ error: result.error ?? "Failed to set default model" });
4314
+ }
4315
+ const { loadGlobalConfig, saveGlobalConfig, setDefaultModelSelection } = await import("./config-G5GNT4UT.js");
4316
+ const globalConfig = await loadGlobalConfig(config4.mode ?? "production");
4317
+ const updatedConfig = setDefaultModelSelection(globalConfig, providerId, model);
4318
+ await saveGlobalConfig(config4.mode ?? "production", updatedConfig);
4319
+ config4.defaultModelSelection = updatedConfig.defaultModelSelection;
4320
+ res.json({ success: true, defaultModelSelection: config4.defaultModelSelection });
4321
+ });
4307
4322
  app.put("/api/sessions/:id/criteria", async (req, res) => {
4308
4323
  const sessionId = req.params.id;
4309
4324
  const session = sessionManager.getSession(sessionId);
@@ -5386,4 +5401,4 @@ export {
5386
5401
  createServerHandle,
5387
5402
  createServer
5388
5403
  };
5389
- //# sourceMappingURL=chunk-YBNLQ2WX.js.map
5404
+ //# sourceMappingURL=chunk-PTKQBKSK.js.map
@@ -1815,12 +1815,20 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1815
1815
  return;
1816
1816
  }
1817
1817
  send({ type: "ack", payload: {}, id: message.id });
1818
+ const controller = new AbortController();
1819
+ const existingController = activeAgents.get(sessionId);
1820
+ if (existingController) {
1821
+ logger.warn("Aborting existing agent before compaction", { sessionId });
1822
+ existingController.abort();
1823
+ }
1824
+ activeAgents.set(sessionId, controller);
1818
1825
  appendCompactionPrompt(sessionId, (event) => getEventStore().append(sessionId, event));
1819
1826
  runChatTurn({
1820
1827
  sessionManager,
1821
1828
  sessionId,
1822
1829
  llmClient: llmForSession(sessionId),
1823
1830
  statsIdentity: statsForSession(sessionId),
1831
+ signal: controller.signal,
1824
1832
  onMessage: (msg) => _broadcastForSession(sessionId, msg),
1825
1833
  initialCompacting: true
1826
1834
  }).then(() => {
@@ -1838,8 +1846,17 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1838
1846
  );
1839
1847
  }).finally(() => {
1840
1848
  try {
1849
+ if (activeAgents.get(sessionId) === controller) {
1850
+ activeAgents.delete(sessionId);
1851
+ }
1852
+ if (abortedSessions.has(sessionId)) {
1853
+ abortedSessions.delete(sessionId);
1854
+ sessionManager.clearMessageQueue(sessionId);
1855
+ }
1841
1856
  sessionManager.setRunning(sessionId, false);
1842
1857
  sendForSession(sessionId, createSessionRunningMessage(false));
1858
+ const contextState = sessionManager.getContextState(sessionId);
1859
+ sendForSession(sessionId, createContextStateMessage(contextState));
1843
1860
  } catch {
1844
1861
  }
1845
1862
  });
@@ -2074,4 +2091,4 @@ export {
2074
2091
  signalMcpReady,
2075
2092
  createWebSocketServer
2076
2093
  };
2077
- //# sourceMappingURL=chunk-CZPX6AVB.js.map
2094
+ //# sourceMappingURL=chunk-QYCEHUCB.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-TQH447DP.js";
4
+ } from "../chunk-J5DFWFIH.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
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-TQH447DP.js";
4
+ } from "../chunk-J5DFWFIH.js";
5
5
  import "../chunk-XY3LESVZ.js";
6
6
  import {
7
7
  logger
@@ -0,0 +1,7 @@
1
+ ---
2
+ id: add-criteria
3
+ name: Add criteria
4
+ agentMode: planner
5
+ ---
6
+
7
+ Add the acceptance criteria you proposed using the `session_metadata` tool with the `criteria` key
@@ -6,7 +6,6 @@ agentMode: builder
6
6
 
7
7
  Commit and push:
8
8
 
9
- 0. `npm test` -> make sure the project is green
10
9
  1. `git status` -> verify what files are modified
11
10
  2. `git add` -> never do `-A`, add your files and your files only
12
11
  3. `git commit -m` -> add a clear message
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "2.0.48",
3
+ "version": "2.0.50",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  VERSION,
3
3
  createServer
4
- } from "./chunk-YBNLQ2WX.js";
5
- import "./chunk-CZPX6AVB.js";
4
+ } from "./chunk-PTKQBKSK.js";
5
+ import "./chunk-QYCEHUCB.js";
6
6
  import "./chunk-PTIF5OEJ.js";
7
7
  import "./chunk-GTY27MWS.js";
8
8
  import "./chunk-LBGHZLLH.js";
@@ -205,4 +205,4 @@ async function runServe(options) {
205
205
  export {
206
206
  runServe
207
207
  };
208
- //# sourceMappingURL=serve-H3AYWFSE.js.map
208
+ //# sourceMappingURL=serve-5FEMRPYX.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-YBNLQ2WX.js";
5
- import "../chunk-CZPX6AVB.js";
4
+ } from "../chunk-PTKQBKSK.js";
5
+ import "../chunk-QYCEHUCB.js";
6
6
  import "../chunk-PTIF5OEJ.js";
7
7
  import "../chunk-GTY27MWS.js";
8
8
  import "../chunk-LBGHZLLH.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createWebSocketServer,
3
3
  signalMcpReady
4
- } from "./chunk-CZPX6AVB.js";
4
+ } from "./chunk-QYCEHUCB.js";
5
5
  import "./chunk-PTIF5OEJ.js";
6
6
  import "./chunk-GTY27MWS.js";
7
7
  import "./chunk-LBGHZLLH.js";
@@ -35,4 +35,4 @@ export {
35
35
  createWebSocketServer,
36
36
  signalMcpReady
37
37
  };
38
- //# sourceMappingURL=server-7XS77JZD.js.map
38
+ //# sourceMappingURL=server-6L6I34NC.js.map