openfox 2.0.84 → 2.0.86

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 (61) hide show
  1. package/dist/{chat-handler-377ZHEDW.js → chat-handler-AVGJQSYW.js} +16 -15
  2. package/dist/chunk-2Y2K66PD.js +7 -0
  3. package/dist/{chunk-JKZPMRH2.js → chunk-3JYPDZT2.js} +2 -2
  4. package/dist/{chunk-SJTG56CH.js → chunk-47WNBFDO.js} +2 -2
  5. package/dist/{chunk-J5E6ZE7O.js → chunk-4YXILHQC.js} +135 -103
  6. package/dist/{chunk-3D3N2PXI.js → chunk-5W2FIWDH.js} +3 -3
  7. package/dist/{chunk-IIRXKSB5.js → chunk-ACL4YUJH.js} +10 -2
  8. package/dist/{chunk-G4PVYDVM.js → chunk-B6VZS5SC.js} +20 -17
  9. package/dist/{chunk-WL6AOKRD.js → chunk-BKH4SIWV.js} +11 -9
  10. package/dist/{chunk-XIVQNOXU.js → chunk-CK7G2JLY.js} +29 -24
  11. package/dist/chunk-FYYPQ27K.js +399 -0
  12. package/dist/{chunk-FVY2JOTO.js → chunk-H765CIHN.js} +2 -2
  13. package/dist/{chunk-AANVMTYU.js → chunk-L4S5N3WV.js} +8 -3
  14. package/dist/{chunk-VB23QPW3.js → chunk-M6X72DYZ.js} +3 -3
  15. package/dist/{chunk-SBSQD7MG.js → chunk-MTZ3PC6K.js} +2 -2
  16. package/dist/{chunk-NH2PVB6R.js → chunk-N54PQSCH.js} +33 -24
  17. package/dist/{chunk-A2IZ4PWQ.js → chunk-OHKBGMLO.js} +15 -4
  18. package/dist/{chunk-55L4SHCO.js → chunk-PUJO6ITQ.js} +7 -7
  19. package/dist/{chunk-CKWD5V4W.js → chunk-SBVKT4GT.js} +95 -366
  20. package/dist/{chunk-CNJ63FXJ.js → chunk-STFIEU5F.js} +3 -2
  21. package/dist/{chunk-X6BXZFO7.js → chunk-U7RLUZBP.js} +1 -1
  22. package/dist/{chunk-BUXIESO5.js → chunk-V5LOH363.js} +6 -74
  23. package/dist/{chunk-5ZHVQOI3.js → chunk-W23S3TU5.js} +2 -2
  24. package/dist/{chunk-DQP5HSDS.js → chunk-WVMOGE7U.js} +3 -3
  25. package/dist/cli/dev.js +1 -1
  26. package/dist/cli/index.js +1 -1
  27. package/dist/{client-TA2VD4LR.js → client-C2P67MA4.js} +4 -4
  28. package/dist/{compactor-YKESKGHL.js → compactor-2YT66FDZ.js} +10 -8
  29. package/dist/{config-EN3WEH4A.js → config-JN6MW5SL.js} +2 -2
  30. package/dist/{events-GF2WNELM.js → events-OEDAFNEI.js} +7 -4
  31. package/dist/{folding-UACKBHUZ.js → folding-FGTCP73N.js} +7 -2
  32. package/dist/{http-client-QZY7W36Q.js → http-client-I52X7GQB.js} +3 -3
  33. package/dist/{manager-WOUOQVLV.js → manager-TD2UT62O.js} +4 -4
  34. package/dist/{orchestrator-LRKFV4MN.js → orchestrator-AGJ7EMFZ.js} +15 -14
  35. package/dist/package.json +1 -1
  36. package/dist/{path-security-AWDNKRZ4.js → path-security-DWL3R2SF.js} +10 -7
  37. package/dist/{platform-7AK5MB4K.js → platform-OYKGQ7Z3.js} +3 -3
  38. package/dist/{processor-LXVRVPBN.js → processor-VCDVG7RV.js} +16 -15
  39. package/dist/{protocol-Q7X4NEME.js → protocol-BUA2W2KM.js} +3 -3
  40. package/dist/{protocol-9WP7lLec.d.ts → protocol-BzTZcNEh.d.ts} +3 -1
  41. package/dist/provider/index.d.ts +4 -4
  42. package/dist/{provider-QVVJ6XNZ.js → provider-YNYYAR6C.js} +7 -7
  43. package/dist/{provider-manager-7246YSJT.js → provider-manager-3DW3A2VC.js} +5 -5
  44. package/dist/{serve-SYGARZPL.js → serve-6GYDVM34.js} +22 -21
  45. package/dist/server/index.d.ts +4 -4
  46. package/dist/server/index.js +21 -20
  47. package/dist/{server-ZU3IU7WH.js → server-3X46OIYC.js} +17 -16
  48. package/dist/{sessions-SFG42M4W.js → sessions-V3BF2OTU.js} +5 -2
  49. package/dist/{settings-6TJIHDVX.js → settings-AGNYWEIE.js} +2 -2
  50. package/dist/shared/index.d.ts +3 -3
  51. package/dist/shared/index.js +1 -1
  52. package/dist/{tools-6NVILBHW.js → tools-X65P65KF.js} +14 -13
  53. package/dist/{types-ulRvCqQX.d.ts → types-B4wa_vGm.d.ts} +2 -0
  54. package/dist/{types-BtY5XChg.d.ts → types-CrLD4iRS.d.ts} +1 -1
  55. package/dist/{update-VHU2XFPH.js → update-EOPW72IR.js} +2 -2
  56. package/dist/web/assets/index-xfwgrYl9.js +305 -0
  57. package/dist/web/index.html +1 -1
  58. package/dist/web/sw.js +1 -1
  59. package/package.json +1 -1
  60. package/dist/chunk-YWBJRUDI.js +0 -7
  61. package/dist/web/assets/index-BhxPPOY-.js +0 -305
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createChatPathConfirmationMessage
3
- } from "./chunk-SJTG56CH.js";
3
+ } from "./chunk-47WNBFDO.js";
4
4
  import {
5
5
  getEventStore
6
- } from "./chunk-BUXIESO5.js";
6
+ } from "./chunk-V5LOH363.js";
7
7
 
8
8
  // src/server/tools/path-security.ts
9
9
  import { realpath } from "fs/promises";
@@ -494,4 +494,4 @@ export {
494
494
  getConfirmationSessionId,
495
495
  getPendingConfirmationsBySession
496
496
  };
497
- //# sourceMappingURL=chunk-3D3N2PXI.js.map
497
+ //# sourceMappingURL=chunk-5W2FIWDH.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-CNJ63FXJ.js";
4
+ } from "./chunk-STFIEU5F.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-K44MW7JJ.js";
@@ -27,6 +27,13 @@ var LLMError = class extends OpenFoxError {
27
27
  this.name = "LLMError";
28
28
  }
29
29
  };
30
+ var WorkspaceInUseError = class extends OpenFoxError {
31
+ constructor(message, conflictingSessionIds) {
32
+ super(message, "WORKSPACE_IN_USE");
33
+ this.conflictingSessionIds = conflictingSessionIds;
34
+ this.name = "WorkspaceInUseError";
35
+ }
36
+ };
30
37
 
31
38
  // src/server/llm/proxy.ts
32
39
  import { fetch as undiciFetch, ProxyAgent } from "undici";
@@ -160,7 +167,8 @@ var OpenAIHttpClient = class {
160
167
  export {
161
168
  SessionNotFoundError,
162
169
  LLMError,
170
+ WorkspaceInUseError,
163
171
  proxyFetch,
164
172
  OpenAIHttpClient
165
173
  };
166
- //# sourceMappingURL=chunk-IIRXKSB5.js.map
174
+ //# sourceMappingURL=chunk-ACL4YUJH.js.map
@@ -1,18 +1,15 @@
1
1
  import {
2
2
  createAssemblyResult,
3
- findAgentById,
4
3
  getAllInstructions,
5
4
  getConversationMessages,
6
5
  getEnabledSkillMetadata,
7
- getSubAgents,
8
6
  getToolRegistryForAgent,
9
- loadAllAgentsDefault,
10
7
  processEventsForConversation,
11
8
  runTopLevelAgentLoop
12
- } from "./chunk-CKWD5V4W.js";
9
+ } from "./chunk-SBVKT4GT.js";
13
10
  import {
14
11
  PathAccessDeniedError
15
- } from "./chunk-3D3N2PXI.js";
12
+ } from "./chunk-5W2FIWDH.js";
16
13
  import {
17
14
  TurnMetrics,
18
15
  buildAgentReminder,
@@ -20,16 +17,22 @@ import {
20
17
  buildTopLevelSystemPrompt,
21
18
  createChatDoneEvent,
22
19
  createMessageStartEvent
23
- } from "./chunk-FVY2JOTO.js";
20
+ } from "./chunk-H765CIHN.js";
24
21
  import {
25
22
  getCurrentContextWindowId,
26
23
  getCurrentWindowMessageOptions,
27
- getEventStore,
28
- getRuntimeConfig
29
- } from "./chunk-BUXIESO5.js";
24
+ getEventStore
25
+ } from "./chunk-V5LOH363.js";
30
26
  import {
31
27
  buildSnapshotFromSessionState
32
- } from "./chunk-A2IZ4PWQ.js";
28
+ } from "./chunk-OHKBGMLO.js";
29
+ import {
30
+ findAgentById,
31
+ getRuntimeConfig,
32
+ getSubAgents,
33
+ loadAllAgentsDefault,
34
+ resolveDefaultAgentId
35
+ } from "./chunk-FYYPQ27K.js";
33
36
  import {
34
37
  logger
35
38
  } from "./chunk-K44MW7JJ.js";
@@ -61,12 +64,12 @@ async function loadSessionContext(sessionManager, sessionId) {
61
64
  function resolveAgentDef(sessionManager, sessionId) {
62
65
  return loadAllAgentsDefault().then((allAgents) => {
63
66
  const session = sessionManager.requireSession(sessionId);
64
- return findAgentById(session.mode, allAgents) ?? findAgentById("planner", allAgents);
67
+ return findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
65
68
  });
66
69
  }
67
70
  async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
68
71
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
69
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-6NVILBHW.js");
72
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-X65P65KF.js");
70
73
  const tools = getToolRegistryForAgent2(agentDef).definitions;
71
74
  const toolFingerprint = getToolFingerprint(tools);
72
75
  const allAgents = await loadAllAgentsDefault();
@@ -79,7 +82,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef) {
79
82
  async function computeSessionHash(sessionManager, sessionId) {
80
83
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
81
84
  const agentDef = await resolveAgentDef(sessionManager, sessionId);
82
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-6NVILBHW.js");
85
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-X65P65KF.js");
83
86
  const tools = getToolRegistryForAgent2(agentDef).definitions;
84
87
  const toolFingerprint = getToolFingerprint(tools);
85
88
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint);
@@ -87,7 +90,7 @@ async function computeSessionHash(sessionManager, sessionId) {
87
90
  async function applyDynamicContext(sessionManager, sessionId) {
88
91
  const session = sessionManager.requireSession(sessionId);
89
92
  const allAgents = await loadAllAgentsDefault();
90
- const agentDef = findAgentById(session.mode, allAgents) ?? findAgentById("planner", allAgents);
93
+ const agentDef = findAgentById(session.mode, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
91
94
  const { systemPrompt, tools, hash } = await buildCachedPrompt(sessionManager, sessionId, agentDef);
92
95
  sessionManager.setCachedPrompt(sessionId, systemPrompt, tools, hash);
93
96
  sessionManager.setDynamicContextChanged(sessionId, false);
@@ -97,7 +100,7 @@ async function applyDynamicContext(sessionManager, sessionId) {
97
100
 
98
101
  // src/server/chat/orchestrator.ts
99
102
  async function buildRetryPatterns() {
100
- const { getSetting, SETTINGS_KEYS } = await import("./settings-6TJIHDVX.js");
103
+ const { getSetting, SETTINGS_KEYS } = await import("./settings-AGNYWEIE.js");
101
104
  const raw = getSetting(SETTINGS_KEYS.RETRY_PATTERNS);
102
105
  if (!raw) {
103
106
  const oldXmlProtection = getSetting("llm.disableXmlProtection");
@@ -274,7 +277,7 @@ function injectAgentReminder(sessionId, agentDef) {
274
277
  async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
275
278
  const statsIdentity = resolveStatsIdentity(options);
276
279
  const allAgents = await loadAllAgentsDefault();
277
- const agentDef = findAgentById(agentId, allAgents) ?? findAgentById("planner", allAgents);
280
+ const agentDef = findAgentById(agentId, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
278
281
  if (!options.warmup) {
279
282
  injectAgentReminder(options.sessionId, agentDef);
280
283
  }
@@ -359,4 +362,4 @@ export {
359
362
  runChatTurn,
360
363
  runAgentTurn
361
364
  };
362
- //# sourceMappingURL=chunk-G4PVYDVM.js.map
365
+ //# sourceMappingURL=chunk-B6VZS5SC.js.map
@@ -1,25 +1,27 @@
1
1
  import {
2
2
  createContextStateMessage,
3
3
  createSessionStateMessage
4
- } from "./chunk-SJTG56CH.js";
4
+ } from "./chunk-47WNBFDO.js";
5
5
  import {
6
6
  getPendingQuestionsForSession
7
7
  } from "./chunk-EU3WWTFH.js";
8
8
  import {
9
9
  combineEventsWithSnapshot,
10
- getEventStore,
11
- getRuntimeConfig
12
- } from "./chunk-BUXIESO5.js";
10
+ getEventStore
11
+ } from "./chunk-V5LOH363.js";
13
12
  import {
14
13
  buildMessagesFromStoredEvents,
15
14
  foldPendingConfirmations
16
- } from "./chunk-A2IZ4PWQ.js";
15
+ } from "./chunk-OHKBGMLO.js";
17
16
  import {
18
17
  updateSessionMetadata
19
- } from "./chunk-AANVMTYU.js";
18
+ } from "./chunk-L4S5N3WV.js";
19
+ import {
20
+ getRuntimeConfig
21
+ } from "./chunk-FYYPQ27K.js";
20
22
  import {
21
23
  getMaxVisibleItems
22
- } from "./chunk-CNJ63FXJ.js";
24
+ } from "./chunk-STFIEU5F.js";
23
25
  import {
24
26
  logger
25
27
  } from "./chunk-K44MW7JJ.js";
@@ -151,7 +153,7 @@ async function generateSessionNameForSession(sessionId, userMessage, deps, signa
151
153
  client = deps.getLLMClient();
152
154
  client.setModel(providerConfig.model);
153
155
  } else if (providerConfig) {
154
- const { createLLMClient } = await import("./client-TA2VD4LR.js");
156
+ const { createLLMClient } = await import("./client-C2P67MA4.js");
155
157
  client = createLLMClient({
156
158
  llm: {
157
159
  baseUrl: providerConfig.baseUrl,
@@ -200,4 +202,4 @@ export {
200
202
  buildRunChatTurnParams,
201
203
  generateSessionNameForSession
202
204
  };
203
- //# sourceMappingURL=chunk-WL6AOKRD.js.map
205
+ //# sourceMappingURL=chunk-BKH4SIWV.js.map
@@ -3,22 +3,17 @@ import {
3
3
  computeSessionHash,
4
4
  runAgentTurn,
5
5
  runChatTurn
6
- } from "./chunk-G4PVYDVM.js";
6
+ } from "./chunk-B6VZS5SC.js";
7
7
  import {
8
- deleteItemFromDir,
9
8
  devServerManager,
10
9
  executeSubAgent,
11
- findAgentById,
12
- getToolRegistryForAgent,
13
- jsonSerializer,
14
- loadAllAgentsDefault,
15
- saveItemToDir
16
- } from "./chunk-CKWD5V4W.js";
10
+ getToolRegistryForAgent
11
+ } from "./chunk-SBVKT4GT.js";
17
12
  import {
18
13
  checkAborted,
19
14
  onProcessEvent,
20
15
  spawnShellProcess
21
- } from "./chunk-JKZPMRH2.js";
16
+ } from "./chunk-3JYPDZT2.js";
22
17
  import {
23
18
  gitSpawnEnv
24
19
  } from "./chunk-J7GAZGZT.js";
@@ -36,21 +31,21 @@ import {
36
31
  parseClientMessage,
37
32
  serializeServerMessage,
38
33
  storedEventToServerMessage
39
- } from "./chunk-SJTG56CH.js";
34
+ } from "./chunk-47WNBFDO.js";
40
35
  import {
41
36
  getPendingQuestionsForSession,
42
37
  provideAnswer
43
38
  } from "./chunk-EU3WWTFH.js";
44
39
  import {
45
40
  appendCompactionPrompt
46
- } from "./chunk-DQP5HSDS.js";
41
+ } from "./chunk-WVMOGE7U.js";
47
42
  import {
48
43
  TurnMetrics,
49
44
  createMessageStartEvent
50
- } from "./chunk-FVY2JOTO.js";
45
+ } from "./chunk-H765CIHN.js";
51
46
  import {
52
47
  getPlatformShell
53
- } from "./chunk-5ZHVQOI3.js";
48
+ } from "./chunk-W23S3TU5.js";
54
49
  import {
55
50
  killProcessTree,
56
51
  terminateProcessTree
@@ -58,16 +53,24 @@ import {
58
53
  import {
59
54
  combineEventsWithSnapshot,
60
55
  getCurrentContextWindowId,
61
- getEventStore,
62
- getRuntimeConfig
63
- } from "./chunk-BUXIESO5.js";
56
+ getEventStore
57
+ } from "./chunk-V5LOH363.js";
64
58
  import {
65
59
  buildMessagesFromStoredEvents,
66
60
  foldPendingConfirmations
67
- } from "./chunk-A2IZ4PWQ.js";
61
+ } from "./chunk-OHKBGMLO.js";
62
+ import {
63
+ deleteItemFromDir,
64
+ findAgentById,
65
+ getRuntimeConfig,
66
+ jsonSerializer,
67
+ loadAllAgentsDefault,
68
+ resolveDefaultAgentId,
69
+ saveItemToDir
70
+ } from "./chunk-FYYPQ27K.js";
68
71
  import {
69
72
  getMaxVisibleItems
70
- } from "./chunk-CNJ63FXJ.js";
73
+ } from "./chunk-STFIEU5F.js";
71
74
  import {
72
75
  logger
73
76
  } from "./chunk-K44MW7JJ.js";
@@ -76,7 +79,7 @@ import {
76
79
  } from "./chunk-VUQCQXXJ.js";
77
80
  import {
78
81
  createServerMessage
79
- } from "./chunk-X6BXZFO7.js";
82
+ } from "./chunk-U7RLUZBP.js";
80
83
  import {
81
84
  getGlobalConfigDir
82
85
  } from "./chunk-CQGTEGKL.js";
@@ -818,7 +821,7 @@ async function executeWorkflow(workflow, options, subGroup) {
818
821
  sessionManager.setPhase(sessionId, step.phase);
819
822
  if (step.type === "agent") {
820
823
  const agentStep = step;
821
- sessionManager.setMode(sessionId, agentStep.agentId ?? "planner");
824
+ sessionManager.setMode(sessionId, agentStep.agentId ?? resolveDefaultAgentId());
822
825
  }
823
826
  logger.debug("Workflow step executing", { sessionId, iteration: iterations, stepId: step.id, stepType: step.type });
824
827
  let stepOutcome = null;
@@ -881,7 +884,7 @@ async function executeWorkflow(workflow, options, subGroup) {
881
884
  ...onMessage ? { onMessage } : {}
882
885
  },
883
886
  turnMetrics,
884
- agentStep.agentId ?? "planner",
887
+ agentStep.agentId ?? resolveDefaultAgentId(),
885
888
  append,
886
889
  {
887
890
  ...!firstEntryForStep.has(step.id) && !agentStep.prompt ? { injectKickoff: () => injectGenericKickoff(sessionId) } : {},
@@ -1638,12 +1641,14 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
1638
1641
  })
1639
1642
  );
1640
1643
  });
1641
- devServerManager.onStateChange((workdir, state, errorMessage) => {
1644
+ devServerManager.onStateChange((workdir, state, errorMessage, url, inspectProxyPort) => {
1642
1645
  broadcastAll(
1643
1646
  createServerMessage("devServer.state", {
1644
1647
  workdir,
1645
1648
  state,
1646
- errorMessage
1649
+ errorMessage,
1650
+ url,
1651
+ inspectProxyPort
1647
1652
  })
1648
1653
  );
1649
1654
  });
@@ -2217,4 +2222,4 @@ export {
2217
2222
  signalMcpReady,
2218
2223
  createWebSocketServer
2219
2224
  };
2220
- //# sourceMappingURL=chunk-XIVQNOXU.js.map
2225
+ //# sourceMappingURL=chunk-CK7G2JLY.js.map