openfox 2.0.107 → 2.0.109

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 (74) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/CHANGELOG.md +33 -0
  3. package/dist/{chat-handler-A22X22VZ.js → chat-handler-UZ7WTT6D.js} +21 -21
  4. package/dist/{chunk-46KNPXY6.js → chunk-3HS72YIE.js} +3 -3
  5. package/dist/{chunk-P4APMCTX.js → chunk-4HIFB7F5.js} +16 -52
  6. package/dist/{chunk-IA4Y3CKA.js → chunk-4ZXRERIW.js} +2 -2
  7. package/dist/{chunk-SGJ3LSVA.js → chunk-5HMKLHTT.js} +2 -2
  8. package/dist/{chunk-UXQN7FGB.js → chunk-6EV7X5MP.js} +2 -2
  9. package/dist/{chunk-3C73IUUL.js → chunk-ACJNRPTO.js} +32 -4
  10. package/dist/{chunk-27SDWNKL.js → chunk-B5MH4HQ6.js} +12 -2
  11. package/dist/{chunk-6VNB4L4V.js → chunk-C5JJM72V.js} +3 -3
  12. package/dist/{chunk-26DEYDYV.js → chunk-CQKRZ4WV.js} +4 -4
  13. package/dist/{chunk-5LR4AMQH.js → chunk-DPDCOLL4.js} +4 -4
  14. package/dist/{chunk-TB7TTPYQ.js → chunk-E5HZKNTY.js} +2 -2
  15. package/dist/{chunk-RRTKVJMF.js → chunk-FR5LUTLQ.js} +12 -2
  16. package/dist/{chunk-LOHVZGCM.js → chunk-GNFDD6LN.js} +3 -3
  17. package/dist/{chunk-AYUUGKZU.js → chunk-HK75Q3EA.js} +11 -11
  18. package/dist/{chunk-5M45NHQ2.js → chunk-JR54MDZI.js} +2 -2
  19. package/dist/{chunk-UCIZV76E.js → chunk-KDQJOI2I.js} +3 -3
  20. package/dist/{chunk-WDJOSRIB.js → chunk-L737Y63F.js} +5 -2
  21. package/dist/{chunk-GXW4CRR5.js → chunk-LXYNP7LL.js} +130 -57
  22. package/dist/{chunk-V6Y6OLB4.js → chunk-MM46DJJL.js} +2 -2
  23. package/dist/{chunk-HU22EVEM.js → chunk-NORNB6IJ.js} +6 -6
  24. package/dist/{chunk-X3USQHHK.js → chunk-PU3IPUSW.js} +6 -6
  25. package/dist/{chunk-6M44ZHQA.js → chunk-UCYPPLVR.js} +40 -20
  26. package/dist/{chunk-SUTJJWUK.js → chunk-VJWWJEBX.js} +8 -8
  27. package/dist/{chunk-2GM6SUIQ.js → chunk-VT2X3DMC.js} +2 -2
  28. package/dist/{chunk-KIAKWUZ3.js → chunk-VXKPZUCT.js} +11 -1
  29. package/dist/{chunk-OEPRHAIO.js → chunk-WCQOHRUX.js} +2 -2
  30. package/dist/chunk-YM673D5U.js +7 -0
  31. package/dist/{chunk-SLFCV72V.js → chunk-Z5QAKEJH.js} +97 -146
  32. package/dist/cli/dev.js +1 -1
  33. package/dist/cli/index.js +1 -1
  34. package/dist/{client-MP3FSNN7.js → client-LPNFUOPV.js} +5 -5
  35. package/dist/{client-pure-USVHN4WG.js → client-pure-VFZIIK4S.js} +2 -2
  36. package/dist/{compactor-KK2BVJK5.js → compactor-OSDLCGRC.js} +11 -11
  37. package/dist/{dynamic-context-ZUXI5UTW.js → dynamic-context-WVA7HTEP.js} +7 -7
  38. package/dist/{events-OJ2R6OEM.js → events-26J7BUSY.js} +6 -6
  39. package/dist/{folding-DUZSKCZF.js → folding-ZD4AMFNR.js} +4 -4
  40. package/dist/{http-client-KJXFSK7A.js → http-client-MQARNFY3.js} +3 -3
  41. package/dist/{manager-N27WNW5B.js → manager-RJH7EYIG.js} +4 -4
  42. package/dist/{model-overrides-36SQR3JR.js → model-overrides-BXMFIT47.js} +3 -3
  43. package/dist/{orchestrator-VZORJ7KF.js → orchestrator-BW27C4K4.js} +20 -20
  44. package/dist/package.json +3 -1
  45. package/dist/{path-security-QCIA6YFV.js → path-security-AAZMH33K.js} +8 -8
  46. package/dist/{platform-Q6T3AUHA.js → platform-EZJABX5J.js} +3 -3
  47. package/dist/{processor-QYVHKRIV.js → processor-FTCPHWBM.js} +20 -20
  48. package/dist/{protocol-YDNGGADL.js → protocol-SPIJPOEN.js} +2 -2
  49. package/dist/{protocol-zRSsysOe.d.ts → protocol-_Gphic7p.d.ts} +1 -1
  50. package/dist/provider/index.d.ts +4 -4
  51. package/dist/{provider-RQQ5JN34.js → provider-JS5P3HQ2.js} +6 -6
  52. package/dist/{provider-manager-RUC5QQ75.js → provider-manager-MWAIOX2A.js} +6 -6
  53. package/dist/{registry-BDSTPV65.js → registry-JJB5GXOM.js} +3 -3
  54. package/dist/{serve-4F7O6FL3.js → serve-TRDQ6A5H.js} +28 -28
  55. package/dist/server/index.d.ts +3 -39
  56. package/dist/server/index.js +27 -27
  57. package/dist/server-R6DDJNF3.js +47 -0
  58. package/dist/{session-overrides-SFWPS5CT.js → session-overrides-T47KXDDS.js} +5 -5
  59. package/dist/{sessions-TZNUQJ2I.js → sessions-YTWCOHI3.js} +4 -4
  60. package/dist/{settings-5LG7IB3K.js → settings-2RZBMX5Y.js} +2 -2
  61. package/dist/shared/index.d.ts +3 -3
  62. package/dist/{tools-Y4F4HJPO.js → tools-KPIYFL5A.js} +18 -18
  63. package/dist/{types-CTl70hba.d.ts → types-BMEOlLT0.d.ts} +1 -0
  64. package/dist/{types-_uF_PRaD.d.ts → types-D0TgGL3t.d.ts} +1 -1
  65. package/dist/{update-PG2YJEVU.js → update-WGZZ5Q37.js} +2 -2
  66. package/dist/web/assets/index-CaG1FEjz.js +323 -0
  67. package/dist/web/assets/{index-B7wjVPjL.css → index-CyWbbpRP.css} +1 -1
  68. package/dist/web/index.html +2 -2
  69. package/dist/web/sw.js +1 -1
  70. package/dist/{workspace-2OG5VQG6.js → workspace-YDUQZ3HC.js} +4 -2
  71. package/package.json +3 -1
  72. package/dist/chunk-T5OFUWKZ.js +0 -7
  73. package/dist/server-CYE6XY7J.js +0 -47
  74. package/dist/web/assets/index-BxI3Y9C7.js +0 -323
package/CHANGELOG.md CHANGED
@@ -1,8 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.109 - 2026-08-02
4
+
5
+ ### Enhancements
6
+
7
+ - **Feed virtualization is opt-in** — a "Virtualize long feeds" display setting mounts only recent messages on very long sessions
8
+
9
+ ### Bug Fixes
10
+
11
+ - **No more stranded history when scrolling up** — the experimental virtualized feed is off by default, so older messages render as before
12
+ - **Git `-n` respected for non-commit subcommands** — only commit/amend treat `-n` as no-verify
13
+
14
+ ## 2.0.108 - 2026-08-02
15
+
16
+ ### Features
17
+
18
+ - **New performance settings for long sessions** — use native scrollbars in tool calls and code blocks, auto-collapse large tool call outputs, and defer code highlighting while streaming, all off by default
19
+
20
+ ### Enhancements
21
+
22
+ - **Long chats virtualize** — only recent messages render; older ones load in batches as you scroll up
23
+ - **Sessions load faster** — data is prefetched at boot and served from a server-side snapshot cache
24
+ - **Streaming renders once per frame** — incoming deltas coalesce into a single render for smoother output
25
+ - **Rendered markdown is cached** — repeat renders skip re-parsing, and plain or oversized code blocks skip syntax highlighting
26
+ - **Finished tool call outputs trimmed to the last 1MB** — keeps session snapshots lean so long sessions load faster
27
+
28
+ ### Bug Fixes
29
+
30
+ - **Feed no longer snaps back to bottom** — scrolling up during streaming now disables auto-scroll instantly for good
31
+ - **Workflows no longer blocked by a mismatched branch** — the execution-context gate is gone
32
+ - **New workspaces inherit the session's branch** — no longer forking from the clone's default branch
33
+ - **Aborted mid-thinking content is preserved** — carried into the next LLM call when reasoning echo is enabled
34
+
3
35
  ## 2.0.107 - 2026-08-02
4
36
 
5
37
  ### Bug Fixes
38
+
6
39
  - **npm install works again** — installing openfox no longer fails because the postinstall tried to build web deps inside the published package; that only happens in source checkouts now.
7
40
 
8
41
  ## 2.0.106 - 2026-08-02
package/dist/CHANGELOG.md CHANGED
@@ -1,8 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.109 - 2026-08-02
4
+
5
+ ### Enhancements
6
+
7
+ - **Feed virtualization is opt-in** — a "Virtualize long feeds" display setting mounts only recent messages on very long sessions
8
+
9
+ ### Bug Fixes
10
+
11
+ - **No more stranded history when scrolling up** — the experimental virtualized feed is off by default, so older messages render as before
12
+ - **Git `-n` respected for non-commit subcommands** — only commit/amend treat `-n` as no-verify
13
+
14
+ ## 2.0.108 - 2026-08-02
15
+
16
+ ### Features
17
+
18
+ - **New performance settings for long sessions** — use native scrollbars in tool calls and code blocks, auto-collapse large tool call outputs, and defer code highlighting while streaming, all off by default
19
+
20
+ ### Enhancements
21
+
22
+ - **Long chats virtualize** — only recent messages render; older ones load in batches as you scroll up
23
+ - **Sessions load faster** — data is prefetched at boot and served from a server-side snapshot cache
24
+ - **Streaming renders once per frame** — incoming deltas coalesce into a single render for smoother output
25
+ - **Rendered markdown is cached** — repeat renders skip re-parsing, and plain or oversized code blocks skip syntax highlighting
26
+ - **Finished tool call outputs trimmed to the last 1MB** — keeps session snapshots lean so long sessions load faster
27
+
28
+ ### Bug Fixes
29
+
30
+ - **Feed no longer snaps back to bottom** — scrolling up during streaming now disables auto-scroll instantly for good
31
+ - **Workflows no longer blocked by a mismatched branch** — the execution-context gate is gone
32
+ - **New workspaces inherit the session's branch** — no longer forking from the clone's default branch
33
+ - **Aborted mid-thinking content is preserved** — carried into the next LLM call when reasoning echo is enabled
34
+
3
35
  ## 2.0.107 - 2026-08-02
4
36
 
5
37
  ### Bug Fixes
38
+
6
39
  - **npm install works again** — installing openfox no longer fails because the postinstall tried to build web deps inside the published package; that only happens in source checkouts now.
7
40
 
8
41
  ## 2.0.106 - 2026-08-02
@@ -2,44 +2,44 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-SUTJJWUK.js";
5
+ } from "./chunk-VJWWJEBX.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-AYUUGKZU.js";
9
- import "./chunk-HU22EVEM.js";
10
- import "./chunk-6M44ZHQA.js";
11
- import "./chunk-LOHVZGCM.js";
12
- import "./chunk-5M45NHQ2.js";
13
- import "./chunk-SGJ3LSVA.js";
8
+ } from "./chunk-HK75Q3EA.js";
9
+ import "./chunk-NORNB6IJ.js";
10
+ import "./chunk-UCYPPLVR.js";
11
+ import "./chunk-GNFDD6LN.js";
12
+ import "./chunk-JR54MDZI.js";
13
+ import "./chunk-5HMKLHTT.js";
14
14
  import "./chunk-33Q7LCVD.js";
15
- import "./chunk-6VNB4L4V.js";
15
+ import "./chunk-C5JJM72V.js";
16
16
  import "./chunk-I72ACQ6R.js";
17
17
  import "./chunk-JE7LW7Y6.js";
18
18
  import "./chunk-VKWVPQJ5.js";
19
- import "./chunk-RRTKVJMF.js";
19
+ import "./chunk-FR5LUTLQ.js";
20
20
  import "./chunk-J7GAZGZT.js";
21
- import "./chunk-OEPRHAIO.js";
22
- import "./chunk-X3USQHHK.js";
21
+ import "./chunk-WCQOHRUX.js";
22
+ import "./chunk-PU3IPUSW.js";
23
23
  import {
24
24
  getEventStore
25
- } from "./chunk-GXW4CRR5.js";
25
+ } from "./chunk-LXYNP7LL.js";
26
26
  import {
27
27
  createChatMessageMessage,
28
28
  createPhaseChangedMessage,
29
29
  createSessionRunningMessage
30
- } from "./chunk-27SDWNKL.js";
30
+ } from "./chunk-B5MH4HQ6.js";
31
31
  import "./chunk-JAX5OEMM.js";
32
- import "./chunk-UXQN7FGB.js";
33
- import "./chunk-V6Y6OLB4.js";
32
+ import "./chunk-6EV7X5MP.js";
33
+ import "./chunk-MM46DJJL.js";
34
34
  import "./chunk-6FPGJR7O.js";
35
- import "./chunk-3C73IUUL.js";
36
- import "./chunk-IA4Y3CKA.js";
37
- import "./chunk-2GM6SUIQ.js";
35
+ import "./chunk-ACJNRPTO.js";
36
+ import "./chunk-4ZXRERIW.js";
37
+ import "./chunk-VT2X3DMC.js";
38
38
  import "./chunk-J2GP3J3X.js";
39
39
  import "./chunk-V4IE7HJY.js";
40
40
  import "./chunk-YHEQTVFV.js";
41
- import "./chunk-WDJOSRIB.js";
42
- import "./chunk-KIAKWUZ3.js";
41
+ import "./chunk-L737Y63F.js";
42
+ import "./chunk-VXKPZUCT.js";
43
43
  import "./chunk-LCQ5AN6Y.js";
44
44
  import "./chunk-K44MW7JJ.js";
45
45
  import "./chunk-4R7G5JB6.js";
@@ -166,4 +166,4 @@ export {
166
166
  startChatSession,
167
167
  stopSessionExecution
168
168
  };
169
- //# sourceMappingURL=chat-handler-A22X22VZ.js.map
169
+ //# sourceMappingURL=chat-handler-UZ7WTT6D.js.map
@@ -13,11 +13,11 @@ import {
13
13
  getThinking,
14
14
  mapFinishReason,
15
15
  parseToolArguments
16
- } from "./chunk-WDJOSRIB.js";
16
+ } from "./chunk-L737Y63F.js";
17
17
  import {
18
18
  LLMError,
19
19
  OpenAIHttpClient
20
- } from "./chunk-TB7TTPYQ.js";
20
+ } from "./chunk-E5HZKNTY.js";
21
21
  import {
22
22
  logger
23
23
  } from "./chunk-K44MW7JJ.js";
@@ -310,4 +310,4 @@ function createLLMClient(config, initialBackend = "unknown") {
310
310
  export {
311
311
  createLLMClient
312
312
  };
313
- //# sourceMappingURL=chunk-46KNPXY6.js.map
313
+ //# sourceMappingURL=chunk-3HS72YIE.js.map
@@ -2,33 +2,33 @@ import {
2
2
  generateSessionNameForSession,
3
3
  getSessionMessageCount,
4
4
  needsNameGeneration
5
- } from "./chunk-SUTJJWUK.js";
5
+ } from "./chunk-VJWWJEBX.js";
6
6
  import {
7
7
  runAgentTurn,
8
8
  runChatTurn
9
- } from "./chunk-AYUUGKZU.js";
9
+ } from "./chunk-HK75Q3EA.js";
10
10
  import {
11
11
  applyDynamicContext,
12
12
  computeSessionHash,
13
13
  computeUnifiedDiff
14
- } from "./chunk-HU22EVEM.js";
14
+ } from "./chunk-NORNB6IJ.js";
15
15
  import {
16
16
  appendCompactionPrompt
17
- } from "./chunk-26DEYDYV.js";
17
+ } from "./chunk-CQKRZ4WV.js";
18
18
  import {
19
19
  devServerManager,
20
20
  executeSubAgent,
21
21
  getToolRegistryForAgent
22
- } from "./chunk-6M44ZHQA.js";
22
+ } from "./chunk-UCYPPLVR.js";
23
23
  import {
24
24
  TurnMetrics,
25
25
  createMessageStartEvent
26
- } from "./chunk-5M45NHQ2.js";
26
+ } from "./chunk-JR54MDZI.js";
27
27
  import {
28
28
  checkAborted,
29
29
  onProcessEvent,
30
30
  spawnShellProcess
31
- } from "./chunk-6VNB4L4V.js";
31
+ } from "./chunk-C5JJM72V.js";
32
32
  import {
33
33
  killProcessTree,
34
34
  terminateProcessTree
@@ -40,7 +40,7 @@ import {
40
40
  combineEventsWithSnapshot,
41
41
  getCurrentContextWindowId,
42
42
  getEventStore
43
- } from "./chunk-GXW4CRR5.js";
43
+ } from "./chunk-LXYNP7LL.js";
44
44
  import {
45
45
  createChatErrorMessage,
46
46
  createChatMessageMessage,
@@ -55,18 +55,18 @@ import {
55
55
  parseClientMessage,
56
56
  serializeServerMessage,
57
57
  storedEventToServerMessage
58
- } from "./chunk-27SDWNKL.js";
58
+ } from "./chunk-B5MH4HQ6.js";
59
59
  import {
60
60
  getPendingQuestionsForSession,
61
61
  provideAnswer
62
62
  } from "./chunk-JAX5OEMM.js";
63
63
  import {
64
64
  getPlatformShell
65
- } from "./chunk-UXQN7FGB.js";
65
+ } from "./chunk-6EV7X5MP.js";
66
66
  import {
67
67
  buildMessagesFromStoredEvents,
68
68
  foldPendingConfirmations
69
- } from "./chunk-3C73IUUL.js";
69
+ } from "./chunk-ACJNRPTO.js";
70
70
  import {
71
71
  deleteItemFromDir,
72
72
  findAgentById,
@@ -75,10 +75,10 @@ import {
75
75
  loadAllAgentsDefault,
76
76
  resolveDefaultAgentId,
77
77
  saveItemToDir
78
- } from "./chunk-2GM6SUIQ.js";
78
+ } from "./chunk-VT2X3DMC.js";
79
79
  import {
80
80
  getMaxVisibleItems
81
- } from "./chunk-KIAKWUZ3.js";
81
+ } from "./chunk-VXKPZUCT.js";
82
82
  import {
83
83
  logger
84
84
  } from "./chunk-K44MW7JJ.js";
@@ -796,42 +796,6 @@ async function executeWorkflow(workflow, options, subGroup) {
796
796
  executionId = activeExec.id;
797
797
  }
798
798
  }
799
- const ctxCheck = await sessionManager.assertExecutionGitContext(sessionId);
800
- if (!ctxCheck.ok) {
801
- logger.warn("Workflow blocked: git context drift detected", {
802
- sessionId,
803
- workflow: workflow.metadata.id,
804
- workdir: ctxCheck.workdir,
805
- expectedBranch: ctxCheck.expectedBranch,
806
- actualBranch: ctxCheck.actualBranch
807
- });
808
- emitWorkflowMessage(
809
- eventStore,
810
- sessionId,
811
- `Runner blocked: ${ctxCheck.reason}`,
812
- getCurrentWindowMessageOptions(sessionId),
813
- onMessage
814
- );
815
- if (executionId) {
816
- sessionManager.blockWorkflow(
817
- sessionId,
818
- executionId,
819
- workflow.metadata.id,
820
- workflow.metadata.name,
821
- workflow.metadata.color
822
- );
823
- }
824
- sessionManager.setPhase(sessionId, "blocked");
825
- return {
826
- finalAction: {
827
- type: "BLOCKED",
828
- reason: ctxCheck.reason,
829
- blockedCriteria: []
830
- },
831
- iterations: 0,
832
- totalTime: (performance.now() - startTime) / 1e3
833
- };
834
- }
835
799
  if (workflow.startCondition && workflow.startCondition.type !== "always") {
836
800
  const session = sessionManager.requireSession(sessionId);
837
801
  const conditionMet = evaluateCondition(
@@ -2225,8 +2189,8 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
2225
2189
  const sessionId = client.activeSessionId;
2226
2190
  const session = sessionManager.requireSession(sessionId);
2227
2191
  try {
2228
- const { buildCachedPrompt } = await import("./dynamic-context-ZUXI5UTW.js");
2229
- const allAgents = await import("./registry-BDSTPV65.js");
2192
+ const { buildCachedPrompt } = await import("./dynamic-context-WVA7HTEP.js");
2193
+ const allAgents = await import("./registry-JJB5GXOM.js");
2230
2194
  const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
2231
2195
  const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
2232
2196
  const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
@@ -2549,4 +2513,4 @@ export {
2549
2513
  signalMcpReady,
2550
2514
  createWebSocketServer
2551
2515
  };
2552
- //# sourceMappingURL=chunk-P4APMCTX.js.map
2516
+ //# sourceMappingURL=chunk-4HIFB7F5.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveDefaultAgentId
3
- } from "./chunk-2GM6SUIQ.js";
3
+ } from "./chunk-VT2X3DMC.js";
4
4
  import {
5
5
  getDatabase
6
6
  } from "./chunk-LCQ5AN6Y.js";
@@ -368,4 +368,4 @@ export {
368
368
  getActiveWorkflowExecution,
369
369
  clearWorkflowExecution
370
370
  };
371
- //# sourceMappingURL=chunk-IA4Y3CKA.js.map
371
+ //# sourceMappingURL=chunk-4ZXRERIW.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getPlatformShell
3
- } from "./chunk-UXQN7FGB.js";
3
+ } from "./chunk-6EV7X5MP.js";
4
4
 
5
5
  // src/server/tools/tool-policy.ts
6
6
  var ALWAYS_ALLOWED = /* @__PURE__ */ new Set(["step_done"]);
@@ -246,4 +246,4 @@ export {
246
246
  buildAgentSmallReminder,
247
247
  COMPACTION_PROMPT
248
248
  };
249
- //# sourceMappingURL=chunk-SGJ3LSVA.js.map
249
+ //# sourceMappingURL=chunk-5HMKLHTT.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-KIAKWUZ3.js";
4
+ } from "./chunk-VXKPZUCT.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-UXQN7FGB.js.map
66
+ //# sourceMappingURL=chunk-6EV7X5MP.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  resolveDefaultAgentId
3
- } from "./chunk-2GM6SUIQ.js";
3
+ } from "./chunk-VT2X3DMC.js";
4
4
 
5
5
  // src/server/events/apply-events.ts
6
6
  function markComplete(msg, reason) {
@@ -828,12 +828,39 @@ function foldWaitingWorkflow(events) {
828
828
  }
829
829
  return waitingWorkflow;
830
830
  }
831
+ var SNAPSHOT_STREAMING_TAIL_BYTES = 1024 * 1024;
832
+ function truncateSnapshotStreamingOutput(messages) {
833
+ return messages.map((message) => {
834
+ const toolCalls = message.toolCalls;
835
+ if (!toolCalls) return message;
836
+ let changed = false;
837
+ const newToolCalls = toolCalls.map((tc) => {
838
+ if (!tc.streamingOutput || tc.streamingOutput.length === 0) return tc;
839
+ if (tc.result === void 0) return tc;
840
+ let total = 0;
841
+ for (const chunk of tc.streamingOutput) total += chunk.content.length;
842
+ if (total <= SNAPSHOT_STREAMING_TAIL_BYTES) return tc;
843
+ const kept = [];
844
+ let keptBytes = 0;
845
+ for (let i = tc.streamingOutput.length - 1; i >= 0 && keptBytes < SNAPSHOT_STREAMING_TAIL_BYTES; i--) {
846
+ const chunk = tc.streamingOutput[i];
847
+ kept.unshift(chunk);
848
+ keptBytes += chunk.content.length;
849
+ }
850
+ changed = true;
851
+ return { ...tc, streamingOutput: kept, streamingOutputTruncated: true };
852
+ });
853
+ if (!changed) return message;
854
+ return { ...message, toolCalls: newToolCalls };
855
+ });
856
+ }
831
857
  function buildSnapshot(foldedState, latestSeq, snapshotAt = Date.now()) {
858
+ const messages = truncateSnapshotStreamingOutput(foldedState.messages);
832
859
  return {
833
860
  mode: foldedState.mode,
834
861
  phase: foldedState.phase,
835
862
  isRunning: foldedState.isRunning,
836
- messages: foldedState.messages,
863
+ messages,
837
864
  criteria: foldedState.criteria,
838
865
  metadataEntries: foldedState.metadataEntries,
839
866
  contextState: foldedState.contextState,
@@ -874,11 +901,12 @@ function buildSnapshotFromSessionState(input) {
874
901
  latestSnapshotEvent.data.messages,
875
902
  events.slice(latestSnapshotIndex + 1)
876
903
  ) : foldedState.messages;
904
+ const trimmedMessages = truncateSnapshotStreamingOutput(messages);
877
905
  return {
878
906
  mode: session.mode,
879
907
  phase: session.phase,
880
908
  isRunning: session.isRunning,
881
- messages,
909
+ messages: trimmedMessages,
882
910
  criteria: session.criteria,
883
911
  metadataEntries: foldedState.metadataEntries,
884
912
  contextState: {
@@ -929,4 +957,4 @@ export {
929
957
  buildSnapshot,
930
958
  buildSnapshotFromSessionState
931
959
  };
932
- //# sourceMappingURL=chunk-3C73IUUL.js.map
960
+ //# sourceMappingURL=chunk-ACJNRPTO.js.map
@@ -3,6 +3,15 @@ import {
3
3
  isClientMessage
4
4
  } from "./chunk-4R7G5JB6.js";
5
5
 
6
+ // src/server/session/client-session.ts
7
+ function toClientSession(session) {
8
+ return {
9
+ ...session,
10
+ messageCount: session.messageCount ?? session.messages.length,
11
+ messages: []
12
+ };
13
+ }
14
+
6
15
  // src/server/ws/protocol.ts
7
16
  function enrichMessagesWithToolResults(messages) {
8
17
  const resultMap = /* @__PURE__ */ new Map();
@@ -48,7 +57,7 @@ function createSessionStateMessage(session, messages, pendingConfirmations = [],
48
57
  return createServerMessage(
49
58
  "session.state",
50
59
  {
51
- session,
60
+ session: toClientSession(session),
52
61
  messages: enrichedMessages,
53
62
  pendingConfirmations,
54
63
  ...pendingQuestions ? { pendingQuestions } : {},
@@ -315,6 +324,7 @@ function storedEventToServerMessage(event) {
315
324
  }
316
325
 
317
326
  export {
327
+ toClientSession,
318
328
  parseClientMessage,
319
329
  serializeServerMessage,
320
330
  createErrorMessage,
@@ -352,4 +362,4 @@ export {
352
362
  createQueueStateMessage,
353
363
  storedEventToServerMessage
354
364
  };
355
- //# sourceMappingURL=chunk-27SDWNKL.js.map
365
+ //# sourceMappingURL=chunk-B5MH4HQ6.js.map
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-I72ACQ6R.js";
12
12
  import {
13
13
  getPlatformShell
14
- } from "./chunk-UXQN7FGB.js";
14
+ } from "./chunk-6EV7X5MP.js";
15
15
  import {
16
16
  SETTINGS_KEYS,
17
17
  getSetting
18
- } from "./chunk-KIAKWUZ3.js";
18
+ } from "./chunk-VXKPZUCT.js";
19
19
 
20
20
  // src/server/utils/shell.ts
21
21
  import { spawn } from "child_process";
@@ -163,4 +163,4 @@ export {
163
163
  getSessionProcesses2 as getSessionProcesses,
164
164
  getProcessLogs
165
165
  };
166
- //# sourceMappingURL=chunk-6VNB4L4V.js.map
166
+ //# sourceMappingURL=chunk-C5JJM72V.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMessageStartEvent
3
- } from "./chunk-5M45NHQ2.js";
3
+ } from "./chunk-JR54MDZI.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
- } from "./chunk-SGJ3LSVA.js";
6
+ } from "./chunk-5HMKLHTT.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-GXW4CRR5.js";
9
+ } from "./chunk-LXYNP7LL.js";
10
10
 
11
11
  // src/server/context/compactor.ts
12
12
  function appendCompactionPrompt(sessionId, append) {
@@ -36,4 +36,4 @@ export {
36
36
  COMPACTION_MAX_RATIO,
37
37
  shouldCompact
38
38
  };
39
- //# sourceMappingURL=chunk-26DEYDYV.js.map
39
+ //# sourceMappingURL=chunk-CQKRZ4WV.js.map
@@ -163,7 +163,7 @@ async function runCli(options) {
163
163
  break;
164
164
  }
165
165
  case "provider": {
166
- const { runProviderCommand } = await import("./provider-RQQ5JN34.js");
166
+ const { runProviderCommand } = await import("./provider-JS5P3HQ2.js");
167
167
  const [, subcommand] = positionals;
168
168
  await runProviderCommand(mode, subcommand);
169
169
  break;
@@ -200,7 +200,7 @@ async function runCli(options) {
200
200
  break;
201
201
  }
202
202
  case "update": {
203
- const { runUpdate } = await import("./update-PG2YJEVU.js");
203
+ const { runUpdate } = await import("./update-WGZZ5Q37.js");
204
204
  const code = await runUpdate();
205
205
  if (code !== 0) {
206
206
  process.exit(code);
@@ -213,7 +213,7 @@ async function runCli(options) {
213
213
  if (!configExists) {
214
214
  await runNetworkSetup(mode);
215
215
  }
216
- const { runServe } = await import("./serve-4F7O6FL3.js");
216
+ const { runServe } = await import("./serve-TRDQ6A5H.js");
217
217
  const serveOptions = { mode };
218
218
  if (values.port) serveOptions.port = parseInt(values.port);
219
219
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -225,4 +225,4 @@ async function runCli(options) {
225
225
  export {
226
226
  runCli
227
227
  };
228
- //# sourceMappingURL=chunk-5LR4AMQH.js.map
228
+ //# sourceMappingURL=chunk-DPDCOLL4.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-KIAKWUZ3.js";
4
+ } from "./chunk-VXKPZUCT.js";
5
5
  import {
6
6
  logger
7
7
  } from "./chunk-K44MW7JJ.js";
@@ -164,4 +164,4 @@ export {
164
164
  WorkspaceInUseError,
165
165
  OpenAIHttpClient
166
166
  };
167
- //# sourceMappingURL=chunk-TB7TTPYQ.js.map
167
+ //# sourceMappingURL=chunk-E5HZKNTY.js.map
@@ -190,6 +190,15 @@ function createBranch(cwd, name, sourceBranch) {
190
190
  const args = sourceBranch ? ["checkout", "-b", name, sourceBranch] : ["checkout", "-b", name];
191
191
  return runGit(cwd, args);
192
192
  }
193
+ async function checkoutBranchFromSharedSource(wsPath, branch) {
194
+ const created = await runGit(wsPath, ["checkout", "-b", branch, `origin/${branch}`]).then(
195
+ () => true,
196
+ () => false
197
+ );
198
+ if (!created) {
199
+ await runGit(wsPath, ["checkout", "-b", branch]);
200
+ }
201
+ }
193
202
  async function workspaceExists(projectName, name, projectDir) {
194
203
  const dir = await getWorkspacesDir(projectName, projectDir);
195
204
  const wsPath = resolve2(dir, name);
@@ -244,7 +253,7 @@ async function ensureWorkspace(projectDir, name, projectName, branch, sourceBran
244
253
  const sb = await resolveAndValidateSourceBranch(wsPath, sourceBranch, projectDir);
245
254
  await runGit(wsPath, ["checkout", "-b", branch, sb]);
246
255
  } else {
247
- await runGit(wsPath, ["checkout", "-b", branch]);
256
+ await checkoutBranchFromSharedSource(wsPath, branch);
248
257
  }
249
258
  } catch (innerErr) {
250
259
  throw new Error(
@@ -313,10 +322,11 @@ export {
313
322
  validateWorkspaceName,
314
323
  checkoutBranch,
315
324
  createBranch,
325
+ checkoutBranchFromSharedSource,
316
326
  workspaceExists,
317
327
  listWorkspaces,
318
328
  ensureWorkspace,
319
329
  deleteWorkspace,
320
330
  isGitRepository
321
331
  };
322
- //# sourceMappingURL=chunk-RRTKVJMF.js.map
332
+ //# sourceMappingURL=chunk-FR5LUTLQ.js.map
@@ -5,13 +5,13 @@ import {
5
5
  deleteItemFromDir,
6
6
  loadItemsFromDir,
7
7
  pathExists
8
- } from "./chunk-2GM6SUIQ.js";
8
+ } from "./chunk-VT2X3DMC.js";
9
9
  import {
10
10
  SETTINGS_KEYS,
11
11
  deleteSetting,
12
12
  getSetting,
13
13
  setSetting
14
- } from "./chunk-KIAKWUZ3.js";
14
+ } from "./chunk-VXKPZUCT.js";
15
15
 
16
16
  // src/server/context/instructions.ts
17
17
  import { readFile, access } from "fs/promises";
@@ -440,4 +440,4 @@ export {
440
440
  deleteSkill,
441
441
  deleteProjectSkill
442
442
  };
443
- //# sourceMappingURL=chunk-LOHVZGCM.js.map
443
+ //# sourceMappingURL=chunk-GNFDD6LN.js.map