openfox 2.0.0-beta.9 → 2.0.0

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 (35) hide show
  1. package/README.md +11 -0
  2. package/dist/{chat-handler-6COBLIDR.js → chat-handler-LJMW4OK3.js} +9 -9
  3. package/dist/{chunk-LR5R7EEE.js → chunk-32GQUDLN.js} +22 -18
  4. package/dist/{chunk-DMH6JVPF.js → chunk-7ZMMDZU7.js} +431 -32
  5. package/dist/{chunk-CDDMHSZF.js → chunk-CK6LGE7G.js} +10 -6
  6. package/dist/{chunk-VIIRNJDT.js → chunk-FFEAEPJB.js} +80 -245
  7. package/dist/{chunk-EZUR7OEP.js → chunk-HPCGVAS4.js} +21 -45
  8. package/dist/{chunk-XJEOP6XU.js → chunk-ITWVFGFV.js} +1 -30
  9. package/dist/{chunk-C75I2KZM.js → chunk-LEDG5WAN.js} +29 -35
  10. package/dist/{chunk-KUG27ZUR.js → chunk-MFUPS6UE.js} +6 -6
  11. package/dist/{chunk-NPHYEUYE.js → chunk-XEK3KII6.js} +55 -4
  12. package/dist/{chunk-J2FFLZ5Z.js → chunk-ZDY4WMZJ.js} +184 -71
  13. package/dist/cli/dev.js +1 -1
  14. package/dist/cli/index.js +1 -1
  15. package/dist/{config-TDVA7MQN.js → config-BU66P4KX.js} +2 -7
  16. package/dist/{events-PQ3KTI5H.js → events-ZKWAKWI7.js} +3 -3
  17. package/dist/{folding-CXORTBAU.js → folding-YOCGTZYH.js} +2 -2
  18. package/dist/{orchestrator-ZNGTMZ7W.js → orchestrator-LX6FKB6L.js} +8 -8
  19. package/dist/package.json +2 -1
  20. package/dist/{processor-WMAU4C2N.js → processor-NMYSEBC7.js} +11 -6
  21. package/dist/{protocol-CDOV1pyc.d.ts → protocol-D59sCy9L.d.ts} +15 -6
  22. package/dist/{provider-BGH4MBLH.js → provider-DTNQYCMV.js} +9 -20
  23. package/dist/provider-manager-LMHAHLIF.js +15 -0
  24. package/dist/{serve-N3LBZUVN.js → serve-SGNL43UL.js} +14 -15
  25. package/dist/server/index.d.ts +22 -16
  26. package/dist/server/index.js +9 -10
  27. package/dist/shared/index.d.ts +2 -2
  28. package/dist/{tools-CQGEU3JK.js → tools-BOE5T3KC.js} +7 -7
  29. package/dist/web/assets/index-Bego8SwT.js +299 -0
  30. package/dist/web/assets/{index-CSOB8dwI.css → index-Sdax8ayU.css} +1 -1
  31. package/dist/web/index.html +2 -2
  32. package/dist/web/sw.js +1 -1
  33. package/package.json +2 -1
  34. package/dist/chunk-UKTPL5ZG.js +0 -469
  35. package/dist/web/assets/index-BJuF4wi7.js +0 -299
package/README.md CHANGED
@@ -22,6 +22,17 @@ openfox
22
22
 
23
23
  On first run, OpenFox automatically detects your local LLM backend (vLLM, sglang, ollama, llamacpp) and configures itself.
24
24
 
25
+ ## What's New in 2.0
26
+
27
+ - **Multi-Turn Agent Engine** — Completely rewritten agent loop with EventStore as single source of truth. All modes (builder, planner, verifier, sub-agents, compaction) run through the same unified loop.
28
+ - **Provider Dialog** — Comprehensive provider configuration UI with thinking mode (`reasoningEffort`), editable kwargs, profile defaults, and preset management.
29
+ - **Auto-Retry Patterns** — Replace the old XML protection toggle with configurable pattern matching. Define your own retry triggers in settings.
30
+ - **Unified Image Handling** — Automatic vision model fallback for non-vision models. Images are described before each turn so any model can "see" them.
31
+ - **Session Metadata** — Unified `session_metadata` tool replaces separate criterion/todo tools. Interactive criteria editor with CRUD and agent badges.
32
+ - **Workflow Sub-Groups** — Run individual workflow steps in isolation. New code review phase in the build-verify pipeline.
33
+ - **Parallel `edit_file` Safety** — Per-file mutex prevents race conditions when editing multiple files simultaneously.
34
+ - **Firefox Support** — Custom thin scrollbars with hover behavior, cross-browser compatible.
35
+
25
36
  ## CLI Commands
26
37
 
27
38
  ```bash
@@ -5,18 +5,19 @@ import {
5
5
  generateSessionName,
6
6
  getSessionMessageCount,
7
7
  needsNameGenerationCheck
8
- } from "./chunk-CDDMHSZF.js";
8
+ } from "./chunk-CK6LGE7G.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-C75I2KZM.js";
12
- import "./chunk-LR5R7EEE.js";
11
+ } from "./chunk-LEDG5WAN.js";
12
+ import "./chunk-32GQUDLN.js";
13
13
  import "./chunk-DL6ZILAF.js";
14
14
  import "./chunk-PBGOZMVY.js";
15
15
  import "./chunk-VRGRAQDG.js";
16
+ import "./chunk-XAMAYRDA.js";
16
17
  import {
17
18
  getEventStore
18
- } from "./chunk-NPHYEUYE.js";
19
- import "./chunk-XJEOP6XU.js";
19
+ } from "./chunk-XEK3KII6.js";
20
+ import "./chunk-ITWVFGFV.js";
20
21
  import {
21
22
  createChatMessageMessage,
22
23
  createPhaseChangedMessage,
@@ -24,14 +25,13 @@ import {
24
25
  } from "./chunk-7TTEGAO6.js";
25
26
  import "./chunk-BJYPTN5S.js";
26
27
  import "./chunk-RFNEDBVO.js";
27
- import "./chunk-XAMAYRDA.js";
28
28
  import "./chunk-FBGWG4N6.js";
29
29
  import "./chunk-BVHFMAVN.js";
30
- import "./chunk-VIIRNJDT.js";
30
+ import "./chunk-CQGTEGKL.js";
31
+ import "./chunk-FFEAEPJB.js";
31
32
  import {
32
33
  logger
33
34
  } from "./chunk-K44MW7JJ.js";
34
- import "./chunk-CQGTEGKL.js";
35
35
 
36
36
  // src/server/session/chat-handler.ts
37
37
  var activeAgents = /* @__PURE__ */ new Map();
@@ -161,4 +161,4 @@ export {
161
161
  startChatSession,
162
162
  stopSessionExecution
163
163
  };
164
- //# sourceMappingURL=chat-handler-6COBLIDR.js.map
164
+ //# sourceMappingURL=chat-handler-LJMW4OK3.js.map
@@ -14,12 +14,15 @@ import {
14
14
  getMaxPerSession,
15
15
  getSessionProcessCount
16
16
  } from "./chunk-VRGRAQDG.js";
17
+ import {
18
+ getProject
19
+ } from "./chunk-XAMAYRDA.js";
17
20
  import {
18
21
  getCurrentContextWindowId,
19
22
  getCurrentWindowMessageOptions,
20
23
  getEventStore,
21
24
  getRuntimeConfig
22
- } from "./chunk-NPHYEUYE.js";
25
+ } from "./chunk-XEK3KII6.js";
23
26
  import {
24
27
  buildContextMessagesFromEventHistory,
25
28
  foldContextState,
@@ -28,7 +31,7 @@ import {
28
31
  handleToolCall,
29
32
  handleToolResult,
30
33
  stripOrphanedToolCalls
31
- } from "./chunk-XJEOP6XU.js";
34
+ } from "./chunk-ITWVFGFV.js";
32
35
  import {
33
36
  createChatDoneMessage,
34
37
  createChatMessageMessage,
@@ -46,21 +49,18 @@ import {
46
49
  getSetting
47
50
  } from "./chunk-RFNEDBVO.js";
48
51
  import {
49
- getProject
50
- } from "./chunk-XAMAYRDA.js";
52
+ getGlobalConfigDir
53
+ } from "./chunk-CQGTEGKL.js";
51
54
  import {
52
55
  buildModelParams,
53
56
  getBackendCapabilities,
54
57
  getModelProfile,
55
58
  modelSupportsVision,
56
59
  streamWithSegments
57
- } from "./chunk-VIIRNJDT.js";
60
+ } from "./chunk-FFEAEPJB.js";
58
61
  import {
59
62
  logger
60
63
  } from "./chunk-K44MW7JJ.js";
61
- import {
62
- getGlobalConfigDir
63
- } from "./chunk-CQGTEGKL.js";
64
64
 
65
65
  // src/server/tools/read.ts
66
66
  import { readFile as readFile2, stat, readdir } from "fs/promises";
@@ -1955,6 +1955,11 @@ function buildAgentReminder(agentDef) {
1955
1955
  ${agentDef.prompt}${toolPermissions}
1956
1956
  </system-reminder>`;
1957
1957
  }
1958
+ function buildAgentSmallReminder(name) {
1959
+ return `<system-reminder>
1960
+ Reminder: you are in '${name}' mode.
1961
+ </system-reminder>`;
1962
+ }
1958
1963
  var WORKFLOW_KICKOFF_PROMPT = (criteriaCount) => `Implement the task and make sure you fulfil the ${criteriaCount} criteria.`;
1959
1964
  var COMPACTION_PROMPT = `You are a helpful AI assistant tasked with summarizing conversations for continuation.
1960
1965
 
@@ -1996,12 +2001,12 @@ function matchRetryPatterns(content, thinking, patterns) {
1996
2001
 
1997
2002
  // src/server/chat/stream-utils.ts
1998
2003
  function buildStreamRequestObject(params) {
1999
- const { messages, tools, toolChoice, disableThinking, signal, modelSettings } = params;
2004
+ const { messages, tools, toolChoice, reasoningEffort, signal, modelSettings } = params;
2000
2005
  return {
2001
2006
  messages,
2002
2007
  ...tools && { tools },
2003
2008
  ...toolChoice && { toolChoice },
2004
- disableThinking: disableThinking ?? false,
2009
+ ...reasoningEffort && { reasoningEffort },
2005
2010
  ...signal && { signal },
2006
2011
  ...modelSettings && { modelSettings }
2007
2012
  };
@@ -2055,7 +2060,7 @@ function createEmptyStreamResult(aborted, modelParams, patternMatch) {
2055
2060
  };
2056
2061
  }
2057
2062
  async function* streamLLMPure(options) {
2058
- const { messageId, systemPrompt, llmClient, messages, tools, toolChoice, signal, disableThinking, retryPatterns } = options;
2063
+ const { messageId, systemPrompt, llmClient, messages, tools, toolChoice, signal, reasoningEffort, retryPatterns } = options;
2059
2064
  const llmMessages = [{ role: "system", content: systemPrompt }, ...messages];
2060
2065
  const profile = getModelProfile(llmClient.getModel());
2061
2066
  const backend = getBackendCapabilities(llmClient.getBackend());
@@ -2088,7 +2093,7 @@ async function* streamLLMPure(options) {
2088
2093
  messages: llmMessages,
2089
2094
  tools,
2090
2095
  toolChoice,
2091
- disableThinking: disableThinking ?? false,
2096
+ reasoningEffort,
2092
2097
  signal: combinedSignal,
2093
2098
  modelSettings: options.modelSettings
2094
2099
  });
@@ -3100,7 +3105,7 @@ ${COMPACTION_PROMPT}`,
3100
3105
  });
3101
3106
  append(createMessageDoneEvent(assistantMsgId, { stats: turnMetrics.buildStats(statsIdentity, mode) }));
3102
3107
  append(createChatDoneEvent(assistantMsgId, "complete"));
3103
- config.injectModeReminder?.();
3108
+ config.injectAgentReminder?.();
3104
3109
  compacting = false;
3105
3110
  continue;
3106
3111
  }
@@ -3184,7 +3189,6 @@ function buildAssemblyInput(systemPrompt, baseInput) {
3184
3189
  injectedFiles: baseInput.injectedFiles,
3185
3190
  requestTools: baseInput.requestTools ?? baseInput.promptTools,
3186
3191
  toolChoice: baseInput.toolChoice ?? "auto",
3187
- disableThinking: baseInput.disableThinking ?? false,
3188
3192
  ...baseInput.customInstructions ? { customInstructions: baseInput.customInstructions } : {},
3189
3193
  ...baseInput.skills && baseInput.skills.length > 0 ? { skills: baseInput.skills } : {}
3190
3194
  });
@@ -3276,7 +3280,7 @@ async function describeImageFromDataUrl(dataUrl, visionModel, options) {
3276
3280
  import { createHash as createHash2 } from "crypto";
3277
3281
  async function loadVisionModelFromGlobalConfig() {
3278
3282
  try {
3279
- const { loadGlobalConfig, getVisionFallback } = await import("./config-TDVA7MQN.js");
3283
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-BU66P4KX.js");
3280
3284
  const runtimeConfig = getRuntimeConfig();
3281
3285
  const mode = runtimeConfig.mode ?? "production";
3282
3286
  const globalConfig = await loadGlobalConfig(mode);
@@ -3639,7 +3643,6 @@ async function executeSubAgent(options) {
3639
3643
  injectedFiles: input.injectedFiles,
3640
3644
  requestTools: input.promptTools,
3641
3645
  toolChoice: input.toolChoice,
3642
- disableThinking: true,
3643
3646
  ...instructionContent ? { customInstructions: instructionContent } : {},
3644
3647
  ...skills.length > 0 ? { skills } : {}
3645
3648
  }),
@@ -3730,7 +3733,7 @@ var callSubAgentTool = {
3730
3733
  };
3731
3734
  }
3732
3735
  try {
3733
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-CQGEU3JK.js");
3736
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-BOE5T3KC.js");
3734
3737
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3735
3738
  const turnMetrics = new TurnMetrics();
3736
3739
  const result = await executeSubAgent({
@@ -4738,6 +4741,7 @@ export {
4738
4741
  buildBasePrompt,
4739
4742
  buildTopLevelSystemPrompt,
4740
4743
  buildAgentReminder,
4744
+ buildAgentSmallReminder,
4741
4745
  WORKFLOW_KICKOFF_PROMPT,
4742
4746
  COMPACTION_PROMPT,
4743
4747
  streamLLMPure,
@@ -4781,4 +4785,4 @@ export {
4781
4785
  getToolRegistryForAgent,
4782
4786
  createToolRegistry
4783
4787
  };
4784
- //# sourceMappingURL=chunk-LR5R7EEE.js.map
4788
+ //# sourceMappingURL=chunk-32GQUDLN.js.map