openfox 2.0.135 → 2.0.137

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 (87) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/CHANGELOG.md +33 -0
  3. package/dist/agent-defaults/builder.agent.md +1 -0
  4. package/dist/agent-defaults/planner.agent.md +1 -0
  5. package/dist/{ask-UBIRH3SO.js → ask-46J5WYRL.js} +2 -2
  6. package/dist/{auto-config-5VSNLVNI.js → auto-config-2A7Y2WOK.js} +25 -6
  7. package/dist/{backend-NDBY3DAQ.js → backend-24FTDSHF.js} +4 -2
  8. package/dist/{chat-handler-WGDFMOOD.js → chat-handler-ZCPFNHTE.js} +30 -26
  9. package/dist/{chunk-QZOV4OVN.js → chunk-2OO46UAW.js} +5 -5
  10. package/dist/{chunk-7QMWYNVF.js → chunk-4LLGI372.js} +2 -2
  11. package/dist/chunk-4SBVW4UH.js +24 -0
  12. package/dist/{chunk-ZMK4VX7V.js → chunk-64YDOCQR.js} +53 -21
  13. package/dist/{chunk-VHLD6PCZ.js → chunk-6TQNTFJW.js} +17 -11
  14. package/dist/{chunk-UV6IH6HK.js → chunk-AKWJMMEJ.js} +15 -1
  15. package/dist/{chunk-ORCQ3EXQ.js → chunk-BHVR2YS5.js} +2 -2
  16. package/dist/{chunk-S67WIWUG.js → chunk-DG2YSWMC.js} +40 -6
  17. package/dist/chunk-FG4G4EWB.js +7 -0
  18. package/dist/{chunk-NFEZATSN.js → chunk-FIQPKLDY.js} +8 -8
  19. package/dist/chunk-FSSUPWYO.js +336 -0
  20. package/dist/{chunk-5UQ4CKOA.js → chunk-G5GUQKLS.js} +27 -6
  21. package/dist/{chunk-7ET46SNE.js → chunk-HEYU7FAY.js} +3 -3
  22. package/dist/{chunk-4R5GV7RW.js → chunk-JIS6C6PA.js} +21 -21
  23. package/dist/{chunk-5H5NRWHA.js → chunk-LQPAM55V.js} +12 -10
  24. package/dist/{chunk-MEEUXRFL.js → chunk-MMGHIPBU.js} +72 -54
  25. package/dist/{chunk-O3RCSKUH.js → chunk-MOYWDP73.js} +2 -2
  26. package/dist/{chunk-J3NMNYGM.js → chunk-N5JKVNLH.js} +2 -2
  27. package/dist/{chunk-DWA4IE65.js → chunk-Q33DL67W.js} +2 -2
  28. package/dist/{chunk-OZWHRBDY.js → chunk-QBWJCO5K.js} +12 -29
  29. package/dist/{chunk-EUOWCVU6.js → chunk-QMU3ZY2C.js} +37 -341
  30. package/dist/{chunk-CTWZPN7G.js → chunk-QUAEH3MP.js} +29 -1
  31. package/dist/{chunk-BIZFY3QP.js → chunk-RS7I4W5A.js} +212 -148
  32. package/dist/{chunk-5UMXFLET.js → chunk-SAGDTQXD.js} +3 -3
  33. package/dist/{chunk-UKIUQAQZ.js → chunk-U7XCK7WL.js} +4 -4
  34. package/dist/{chunk-JURM3RPZ.js → chunk-V5AC2TV7.js} +8 -13
  35. package/dist/{chunk-JE7LW7Y6.js → chunk-VIJVLLPT.js} +12 -3
  36. package/dist/{chunk-2AI7VYPN.js → chunk-VKMPR25F.js} +9 -3
  37. package/dist/{chunk-IAT2LBIX.js → chunk-WOIQO7ZC.js} +4 -4
  38. package/dist/chunk-WQUCCHOY.js +1155 -0
  39. package/dist/{chunk-F2MOHHXB.js → chunk-X4PVR6AW.js} +2 -2
  40. package/dist/chunk-XG3AUMPI.js +72 -0
  41. package/dist/{chunk-I5ODJKYM.js → chunk-XWWRZSK7.js} +162 -6
  42. package/dist/{chunk-GP3CLMPQ.js → chunk-ZJ2IHOVN.js} +23 -23
  43. package/dist/{chunk-ESZQTFQP.js → chunk-ZQENKB7X.js} +86 -1010
  44. package/dist/cli/dev.js +1 -1
  45. package/dist/cli/index.js +1 -1
  46. package/dist/client-MVI3J7SN.js +18 -0
  47. package/dist/{client-pure-FLKP6PTI.js → client-pure-YZ4IGCU4.js} +4 -2
  48. package/dist/{compactor-454UEIEX.js → compactor-KDTY4ERE.js} +14 -12
  49. package/dist/describe-image-EFHMWGWI.js +30 -0
  50. package/dist/{dynamic-context-LKC6JYLQ.js → dynamic-context-HL4RGNHK.js} +12 -10
  51. package/dist/{events-335XAKFK.js → events-ADE2KEHI.js} +7 -9
  52. package/dist/{export-import-3WMRLO4A.js → export-import-6OUEANYH.js} +7 -7
  53. package/dist/{folding-H7JTX6KI.js → folding-CM63AVSB.js} +6 -6
  54. package/dist/{http-client-A445WYZU.js → http-client-C6UYWVWZ.js} +3 -3
  55. package/dist/launch-L5NSPAAX.js +58 -0
  56. package/dist/{manager-ZACEUL5P.js → manager-FSPRJCYT.js} +4 -4
  57. package/dist/{model-catalog-2PCKTYGW.js → model-catalog-Y5MA5OZP.js} +2 -2
  58. package/dist/{orchestrator-JGJWTRO5.js → orchestrator-FMWKMD54.js} +29 -25
  59. package/dist/package.json +1 -1
  60. package/dist/{path-security-4LROI7F4.js → path-security-DND2R3RP.js} +8 -8
  61. package/dist/{platform-XPMZKAUB.js → platform-KPKYBU54.js} +3 -3
  62. package/dist/{processor-MSQP63ML.js → processor-SB5X44PX.js} +29 -25
  63. package/dist/{provider-JWUNG2TD.js → provider-SOC6Z25R.js} +10 -8
  64. package/dist/{provider-manager-2KKZ37XJ.js → provider-manager-Y53SVVQ3.js} +10 -8
  65. package/dist/{registry-BEIR7Y5G.js → registry-FMDMGIUB.js} +3 -3
  66. package/dist/{serve-CW5C3CBZ.js → serve-VONTGJCK.js} +41 -32
  67. package/dist/server/index.d.ts +1 -0
  68. package/dist/server/index.js +34 -30
  69. package/dist/server-MI2LZK3W.js +61 -0
  70. package/dist/{service-XIUNS5XV.js → service-NKLQH647.js} +12 -9
  71. package/dist/{session-overrides-LYW5PJ3R.js → session-overrides-ANQBKV74.js} +11 -7
  72. package/dist/{sessions-AOK3AGHY.js → sessions-GLYACE5R.js} +4 -4
  73. package/dist/{settings-ZJPM6PQV.js → settings-WH6BVQCP.js} +4 -2
  74. package/dist/{tasks-3JJWJJ3X.js → tasks-GPM3JAE6.js} +14 -10
  75. package/dist/tool-adapter-ZY4FC4C4.js +9 -0
  76. package/dist/{tools-E63MOJBO.js → tools-WLJJ3ILO.js} +27 -23
  77. package/dist/{update-XVXNSSDK.js → update-6ZSQJQJB.js} +2 -2
  78. package/dist/web/assets/{index-wTFCxQAw.js → index-CfFwerN2.js} +84 -84
  79. package/dist/web/assets/{index-Bg_Z8i3F.css → index-ChJjYovg.css} +1 -1
  80. package/dist/web/index.html +2 -2
  81. package/dist/web/sw.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/chunk-WY3PWHWY.js +0 -7
  84. package/dist/client-VVYOWXRR.js +0 -16
  85. package/dist/launch-GJ7EHQRI.js +0 -54
  86. package/dist/server-ZHEB7XS2.js +0 -57
  87. package/dist/tool-adapter-FJAFLDZA.js +0 -8
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveDefaultAgentId
3
- } from "./chunk-ORCQ3EXQ.js";
3
+ } from "./chunk-BHVR2YS5.js";
4
4
  import {
5
5
  normalizeAskOptions
6
6
  } from "./chunk-LCLH6ZUL.js";
@@ -263,45 +263,68 @@ function snapshotMessageToMessage(message) {
263
263
  ...spreadOptionalMessageFields(message)
264
264
  });
265
265
  }
266
- function shouldIncludeContextMessage(message, windowId, options) {
267
- const includeVerifier = options?.includeVerifier ?? true;
268
- return message.role !== "system" && (windowId === void 0 || message.contextWindowId === windowId) && (includeVerifier || message.subAgentType !== "verifier") && !message.subAgentId;
269
- }
270
- function appendSnapshotMessageContext(result, message) {
271
- const contextMsg = {
272
- role: message.role,
273
- content: message.content
274
- };
275
- if (message.thinkingContent) {
276
- contextMsg.thinkingContent = message.thinkingContent;
277
- }
278
- if (message.toolCalls && message.toolCalls.length > 0) {
279
- const fulfilledToolCalls = message.toolCalls.filter((tc) => tc.result);
280
- if (fulfilledToolCalls.length > 0) {
281
- contextMsg.toolCalls = fulfilledToolCalls.map((toolCall) => ({
282
- id: toolCall.id,
283
- name: toolCall.name,
284
- arguments: toolCall.arguments
285
- }));
266
+ function snapshotMessagesToEvents(messages, sessionId = "") {
267
+ const events = [];
268
+ let syntheticSeq = -1;
269
+ const nextSeq = () => syntheticSeq--;
270
+ for (const message of messages) {
271
+ events.push({
272
+ seq: nextSeq(),
273
+ timestamp: message.timestamp,
274
+ sessionId,
275
+ type: "message.start",
276
+ data: {
277
+ messageId: message.id,
278
+ role: message.role,
279
+ // Only the fields the context fold consumes (window/subagent filtering,
280
+ // content, attachments) are carried — the rest are UI-only concerns.
281
+ ...message.content !== void 0 && { content: message.content },
282
+ ...message.contextWindowId !== void 0 && { contextWindowId: message.contextWindowId },
283
+ ...message.subAgentId !== void 0 && { subAgentId: message.subAgentId },
284
+ ...message.subAgentType !== void 0 && { subAgentType: message.subAgentType },
285
+ ...message.attachments !== void 0 && { attachments: message.attachments }
286
+ }
287
+ });
288
+ if (message.thinkingContent) {
289
+ events.push({
290
+ seq: nextSeq(),
291
+ timestamp: message.timestamp,
292
+ sessionId: "",
293
+ type: "message.thinking",
294
+ data: { messageId: message.id, content: message.thinkingContent }
295
+ });
286
296
  }
287
- }
288
- if (message.attachments !== void 0) {
289
- contextMsg.attachments = message.attachments;
290
- }
291
- result.push(contextMsg);
292
- if (!message.toolCalls) return;
293
- for (const toolCall of message.toolCalls) {
294
- if (!toolCall.result) continue;
295
- result.push({
296
- role: "tool",
297
- content: stripAnsi(
298
- toolCall.result.success ? toolCall.result.output ?? "Success" : toolCall.result.output ? `${toolCall.result.output}
299
-
300
- Error: ${toolCall.result.error}` : `Error: ${toolCall.result.error}`
301
- ),
302
- toolCallId: toolCall.id
297
+ for (const toolCall of message.toolCalls ?? []) {
298
+ events.push({
299
+ seq: nextSeq(),
300
+ timestamp: message.timestamp,
301
+ sessionId: "",
302
+ type: "tool.call",
303
+ data: {
304
+ messageId: message.id,
305
+ toolCall: { id: toolCall.id, name: toolCall.name, arguments: toolCall.arguments }
306
+ }
307
+ });
308
+ }
309
+ for (const toolCall of message.toolCalls ?? []) {
310
+ if (!toolCall.result) continue;
311
+ events.push({
312
+ seq: nextSeq(),
313
+ timestamp: message.timestamp,
314
+ sessionId: "",
315
+ type: "tool.result",
316
+ data: { messageId: message.id, toolCallId: toolCall.id, result: toolCall.result }
317
+ });
318
+ }
319
+ events.push({
320
+ seq: nextSeq(),
321
+ timestamp: message.timestamp,
322
+ sessionId: "",
323
+ type: "message.done",
324
+ data: { messageId: message.id }
303
325
  });
304
326
  }
327
+ return events;
305
328
  }
306
329
  function applyStoredMessageEvents(initialMessages, events) {
307
330
  return applyEvents(initialMessages, events, { timestampAsNumber: false });
@@ -497,13 +520,15 @@ function buildContextMessagesFromEventHistory(events, windowId, options) {
497
520
  return buildContextMessagesFromStoredEvents(events, windowId, options);
498
521
  }
499
522
  const snapshot = snapshotEvent.data;
500
- const snapshotMessages = snapshot.messages.reduce((result, message) => {
501
- if (!shouldIncludeContextMessage(message, windowId, options)) return result;
502
- appendSnapshotMessageContext(result, message);
503
- return result;
504
- }, []);
505
- const laterEvents = events.filter((event) => event.seq > snapshotEvent.seq);
506
- return [...snapshotMessages, ...buildContextMessagesFromStoredEvents(laterEvents, windowId, options)];
523
+ const snapshotMessageIds = new Set(snapshot.messages.map((message) => message.id));
524
+ const laterEvents = events.filter(
525
+ (event) => event.seq > snapshotEvent.seq && !("messageId" in event.data && snapshotMessageIds.has(event.data.messageId))
526
+ );
527
+ return buildContextMessagesFromStoredEvents(
528
+ [...snapshotMessagesToEvents(snapshot.messages, snapshotEvent.sessionId), ...laterEvents],
529
+ windowId,
530
+ options
531
+ );
507
532
  }
508
533
  function foldTurnEventsToSnapshotMessages(events) {
509
534
  return applyTurnEventsToSnapshotMessages([], events);
@@ -511,15 +536,8 @@ function foldTurnEventsToSnapshotMessages(events) {
511
536
  function foldTurnEventsToSnapshotMessagesFromInitial(events, initialMessages) {
512
537
  return applyTurnEventsToSnapshotMessages(initialMessages, events);
513
538
  }
514
- function getMessagesForWindow(messages, windowId) {
515
- return messages.filter((m) => m.contextWindowId === windowId);
516
- }
517
539
  function buildContextMessagesFromMessages(messages, windowId) {
518
- return getMessagesForWindow(messages, windowId).reduce((result, message) => {
519
- if (!shouldIncludeContextMessage(message, windowId)) return result;
520
- appendSnapshotMessageContext(result, message);
521
- return result;
522
- }, []);
540
+ return buildContextMessagesFromStoredEvents(snapshotMessagesToEvents(messages), windowId);
523
541
  }
524
542
 
525
543
  // src/server/events/fold-state.ts
@@ -938,6 +956,7 @@ function buildSnapshotFromSessionState(input) {
938
956
 
939
957
  export {
940
958
  spreadOptionalMessageFields,
959
+ snapshotMessagesToEvents,
941
960
  buildMessagesFromStoredEvents,
942
961
  buildContextMessagesFromStoredEvents,
943
962
  handleMessageThinking,
@@ -949,7 +968,6 @@ export {
949
968
  buildContextMessagesFromEventHistory,
950
969
  foldTurnEventsToSnapshotMessages,
951
970
  foldTurnEventsToSnapshotMessagesFromInitial,
952
- getMessagesForWindow,
953
971
  buildContextMessagesFromMessages,
954
972
  foldCriteria,
955
973
  foldTodos,
@@ -965,4 +983,4 @@ export {
965
983
  buildSnapshot,
966
984
  buildSnapshotFromSessionState
967
985
  };
968
- //# sourceMappingURL=chunk-MEEUXRFL.js.map
986
+ //# sourceMappingURL=chunk-MMGHIPBU.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-CTWZPN7G.js";
4
+ } from "./chunk-QUAEH3MP.js";
5
5
 
6
6
  // src/server/utils/platform.ts
7
7
  import os from "os";
@@ -63,4 +63,4 @@ export {
63
63
  isWindowsPath,
64
64
  isAbsolutePath
65
65
  };
66
- //# sourceMappingURL=chunk-O3RCSKUH.js.map
66
+ //# sourceMappingURL=chunk-MOYWDP73.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-CTWZPN7G.js";
4
+ } from "./chunk-QUAEH3MP.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-K44MW7JJ.js";
@@ -194,4 +194,4 @@ export {
194
194
  ChatHttpClient,
195
195
  OpenAIHttpClient
196
196
  };
197
- //# sourceMappingURL=chunk-J3NMNYGM.js.map
197
+ //# sourceMappingURL=chunk-N5JKVNLH.js.map
@@ -11,7 +11,7 @@ import {
11
11
  deleteSetting,
12
12
  getSetting,
13
13
  setSetting
14
- } from "./chunk-CTWZPN7G.js";
14
+ } from "./chunk-QUAEH3MP.js";
15
15
 
16
16
  // src/server/context/instructions.ts
17
17
  import { readFile, access } from "fs/promises";
@@ -452,4 +452,4 @@ export {
452
452
  deleteSkill,
453
453
  deleteProjectSkill
454
454
  };
455
- //# sourceMappingURL=chunk-DWA4IE65.js.map
455
+ //# sourceMappingURL=chunk-Q33DL67W.js.map
@@ -1,3 +1,6 @@
1
+ import {
2
+ serverT
3
+ } from "./chunk-4SBVW4UH.js";
1
4
  import {
2
5
  deleteItemFromDir,
3
6
  getDefaultIds,
@@ -8,25 +11,16 @@ import {
8
11
  } from "./chunk-OSXPQSLW.js";
9
12
  import {
10
13
  parseDefaultModelSelection
11
- } from "./chunk-5UQ4CKOA.js";
14
+ } from "./chunk-G5GUQKLS.js";
12
15
  import {
13
16
  getProject
14
17
  } from "./chunk-DPFET73G.js";
15
- import {
16
- SETTINGS_KEYS,
17
- getSetting
18
- } from "./chunk-CTWZPN7G.js";
19
18
  import {
20
19
  getDatabase
21
20
  } from "./chunk-JU757HVI.js";
22
21
  import {
23
22
  logger
24
23
  } from "./chunk-K44MW7JJ.js";
25
- import {
26
- getLocale,
27
- setLocale,
28
- t
29
- } from "./chunk-24YKXKCG.js";
30
24
 
31
25
  // src/server/commands/registry.ts
32
26
  import { writeFile, mkdir, unlink } from "fs/promises";
@@ -663,16 +657,6 @@ function safeParseAttachments(raw) {
663
657
  }
664
658
  }
665
659
 
666
- // src/server/i18n.ts
667
- function resolveLocale() {
668
- return getSetting(SETTINGS_KEYS.DISPLAY_LOCALE) === "fr" ? "fr" : "en";
669
- }
670
- function serverT(tx, vars) {
671
- const locale = resolveLocale();
672
- if (getLocale() !== locale) setLocale(locale);
673
- return t(tx, vars);
674
- }
675
-
676
660
  // src/server/tasks/service.ts
677
661
  function isTaskConflictError(err) {
678
662
  return err instanceof Error && err.code === "CONFLICT";
@@ -946,11 +930,11 @@ function createTasksService(deps) {
946
930
  return computeCounts(listTasks(projectId));
947
931
  }
948
932
  function computeCounts(tasks) {
949
- const todo = tasks.filter((t2) => t2.status === "todo").length;
950
- const inProgress = tasks.filter((t2) => t2.status === "in_progress").length;
951
- const running = tasks.filter((t2) => t2.status === "in_progress" && t2.runState === "running").length;
952
- const queued = tasks.filter((t2) => t2.status === "in_progress" && t2.runState === "queued").length;
953
- const done = tasks.filter((t2) => t2.status === "done").length;
933
+ const todo = tasks.filter((t) => t.status === "todo").length;
934
+ const inProgress = tasks.filter((t) => t.status === "in_progress").length;
935
+ const running = tasks.filter((t) => t.status === "in_progress" && t.runState === "running").length;
936
+ const queued = tasks.filter((t) => t.status === "in_progress" && t.runState === "queued").length;
937
+ const done = tasks.filter((t) => t.status === "done").length;
954
938
  return { open: todo + inProgress, todo, inProgress, running, queued, done };
955
939
  }
956
940
  function requiredGates(projectId, variant) {
@@ -976,7 +960,7 @@ function createTasksService(deps) {
976
960
  return err;
977
961
  }
978
962
  function activeCount(projectId) {
979
- return listTasks(projectId).filter((t2) => t2.status === "in_progress" && t2.runState === "running").length;
963
+ return listTasks(projectId).filter((t) => t.status === "in_progress" && t.runState === "running").length;
980
964
  }
981
965
  async function seedSession(projectId, task, from, targetSessionId) {
982
966
  let session;
@@ -1035,7 +1019,7 @@ function createTasksService(deps) {
1035
1019
  const settings = getTaskSettings(projectId);
1036
1020
  if (settings.queuePaused) return void 0;
1037
1021
  if (activeCount(projectId) >= settings.slotLimit) return void 0;
1038
- const queued = listTasks(projectId).filter((t2) => t2.status === "in_progress" && t2.runState === "queued").sort((a, b) => a.position - b.position);
1022
+ const queued = listTasks(projectId).filter((t) => t.status === "in_progress" && t.runState === "queued").sort((a, b) => a.position - b.position);
1039
1023
  const next = queued[0];
1040
1024
  if (!next) return void 0;
1041
1025
  setTaskRunState(next.id, "running");
@@ -1133,7 +1117,6 @@ function promptLabel(prompt) {
1133
1117
  }
1134
1118
 
1135
1119
  export {
1136
- serverT,
1137
1120
  loadDefaultCommands,
1138
1121
  loadUserCommands,
1139
1122
  loadProjectCommands,
@@ -1166,4 +1149,4 @@ export {
1166
1149
  isTaskGateError,
1167
1150
  createTasksService
1168
1151
  };
1169
- //# sourceMappingURL=chunk-OZWHRBDY.js.map
1152
+ //# sourceMappingURL=chunk-QBWJCO5K.js.map