openfox 2.0.120 → 2.0.122

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 (86) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/dist/CHANGELOG.md +31 -0
  3. package/dist/agent-defaults/code-reviewer.agent.md +3 -8
  4. package/dist/{chat-handler-TIR5CMWE.js → chat-handler-JQUVSZT3.js} +27 -28
  5. package/dist/{chunk-PI4X3Y6H.js → chunk-22D7ZR2X.js} +51 -46
  6. package/dist/{chunk-LNNBLB6G.js → chunk-2N7KFNMY.js} +3 -3
  7. package/dist/{chunk-XZGQZ42D.js → chunk-5A4YN6I7.js} +5 -5
  8. package/dist/{chunk-IQFPRQWM.js → chunk-62GUO2EG.js} +5 -3
  9. package/dist/{chunk-A5JAVQKG.js → chunk-6A2VIV36.js} +4 -4
  10. package/dist/{chunk-VUQCQXXJ.js → chunk-7OHXF5GW.js} +6 -3
  11. package/dist/{chunk-IW46BUOP.js → chunk-AIXVERRI.js} +6 -6
  12. package/dist/{chunk-3PG65AXG.js → chunk-DIALH34K.js} +2 -2
  13. package/dist/{chunk-AESOGRFK.js → chunk-EZ67GBEO.js} +2 -2
  14. package/dist/{chunk-HD6Y77RO.js → chunk-FGVMRFDW.js} +2 -2
  15. package/dist/{chunk-ZTOG6LJD.js → chunk-I22B6KWV.js} +3 -3
  16. package/dist/{chunk-JOCR4CF4.js → chunk-J3IJJ55E.js} +5 -5
  17. package/dist/{chunk-KFQKBXLO.js → chunk-J77SLE3M.js} +2 -2
  18. package/dist/{chunk-HWHWXLM5.js → chunk-KDC4QHE7.js} +17 -17
  19. package/dist/{chunk-2FCLCUVR.js → chunk-LSEHJ2WI.js} +3 -3
  20. package/dist/{chunk-3KBRMBTP.js → chunk-LWXLNE6M.js} +2 -2
  21. package/dist/{chunk-5PT4UMRR.js → chunk-NYQKSKDB.js} +9 -1
  22. package/dist/{chunk-M6X6AIEG.js → chunk-OXANSWVZ.js} +2 -2
  23. package/dist/{chunk-LTYL6ZGH.js → chunk-POTCPZJF.js} +2 -2
  24. package/dist/{chunk-O6DU226D.js → chunk-RMOKNQAS.js} +2 -2
  25. package/dist/{chunk-JDWJ2PJJ.js → chunk-SCP5KBNB.js} +122 -48
  26. package/dist/{chunk-KLQEL2DZ.js → chunk-SLW3KKPP.js} +26 -8
  27. package/dist/{chunk-AS7KAH66.js → chunk-STYGFTEB.js} +6 -5
  28. package/dist/{chunk-WN76RDRU.js → chunk-UJRWYZHM.js} +8 -2
  29. package/dist/{chunk-JDBIR2J7.js → chunk-UOEAKQBH.js} +16 -16
  30. package/dist/chunk-VC3YCHDO.js +7 -0
  31. package/dist/{chunk-54FTLSWS.js → chunk-WIZUASFY.js} +205 -184
  32. package/dist/{chunk-27NABDXB.js → chunk-Y7FGHKBW.js} +2 -2
  33. package/dist/{chunk-EQ5CGNOT.js → chunk-YBOU4ZFD.js} +3 -3
  34. package/dist/{chunk-USNG72WA.js → chunk-YDDBPKVP.js} +21 -16
  35. package/dist/{chunk-CYXAMXN5.js → chunk-ZT7YTM2U.js} +4 -4
  36. package/dist/cli/dev.js +1 -1
  37. package/dist/cli/index.js +1 -1
  38. package/dist/{client-GXRHODRQ.js → client-JKPDMJ7S.js} +5 -5
  39. package/dist/{compactor-TI352G7B.js → compactor-MKD3CAFM.js} +12 -12
  40. package/dist/{dynamic-context-C6HGUQTR.js → dynamic-context-IWFD7U3D.js} +9 -9
  41. package/dist/{events-KDFMBVP5.js → events-6P4TDTSD.js} +8 -8
  42. package/dist/{folding-RTGU63BW.js → folding-3LA2WX2B.js} +6 -6
  43. package/dist/http-client-IKOARXI7.js +11 -0
  44. package/dist/{inspect-proxy-WPEDMCG7.js → inspect-proxy-IDLUAQH5.js} +4 -4
  45. package/dist/launch-FOUIDMGW.js +52 -0
  46. package/dist/{manager-EMLSLMMT.js → manager-NFKTUR64.js} +5 -5
  47. package/dist/{orchestrator-SCH2T4JB.js → orchestrator-PEXLQK3T.js} +30 -31
  48. package/dist/package.json +1 -1
  49. package/dist/{path-security-L4AJJN2V.js → path-security-JUF56IB6.js} +10 -10
  50. package/dist/{platform-ECDDYMAR.js → platform-FM57ZJHA.js} +4 -4
  51. package/dist/{processor-GM4D26E6.js → processor-2GEVRLJP.js} +39 -40
  52. package/dist/{project-creator-PMQ65NKN.js → project-creator-J4ITWDZI.js} +3 -3
  53. package/dist/{projects-NDPNOV6D.js → projects-FHRTSV6N.js} +3 -3
  54. package/dist/{protocol-D5kJLGWy.d.ts → protocol-BLin669D.d.ts} +1 -1
  55. package/dist/provider/index.d.ts +4 -4
  56. package/dist/{provider-5V6RDVU2.js → provider-TAFJCWVP.js} +6 -6
  57. package/dist/{provider-manager-7QD5HAOL.js → provider-manager-EDJN6ARI.js} +6 -6
  58. package/dist/{registry-5QL3BOWN.js → registry-37GL3DAP.js} +5 -5
  59. package/dist/{serve-M7I3HWVQ.js → serve-3BPQGWYE.js} +31 -32
  60. package/dist/server/index.d.ts +31 -14
  61. package/dist/server/index.js +30 -31
  62. package/dist/server-HPIR55OH.js +55 -0
  63. package/dist/{service-A3YLLXW3.js → service-2IOCVEXQ.js} +8 -8
  64. package/dist/{session-overrides-CWBKPHMF.js → session-overrides-EOKSZO2X.js} +7 -7
  65. package/dist/{sessions-I7ELDIIP.js → sessions-XFNU4DZ6.js} +8 -6
  66. package/dist/{settings-FGXQHKUH.js → settings-SYYDPV43.js} +3 -3
  67. package/dist/shared/index.d.ts +6 -5
  68. package/dist/shared/index.js +1 -1
  69. package/dist/{tasks-X5U7DWZR.js → tasks-G7ACMQM2.js} +8 -8
  70. package/dist/{tools-GCBDO7TU.js → tools-IKMNLLAY.js} +22 -23
  71. package/dist/{types-B5CI_Ql3.d.ts → types-B5_9KtfJ.d.ts} +1 -1
  72. package/dist/{types-CZlj7ufS.d.ts → types-DeQIEC1U.d.ts} +2 -0
  73. package/dist/{update-TUGN3JJE.js → update-QX6IIUKB.js} +2 -2
  74. package/dist/web/assets/index-CJuw9bwD.js +324 -0
  75. package/dist/web/index.html +1 -1
  76. package/dist/web/sw.js +1 -1
  77. package/dist/workflow-defaults/default.workflow.json +3 -3
  78. package/dist/{workspace-IQLLHMYR.js → workspace-ZNZFEONU.js} +4 -4
  79. package/package.json +1 -1
  80. package/dist/chunk-JLAR2CMV.js +0 -72
  81. package/dist/chunk-PXEWE5YP.js +0 -7
  82. package/dist/http-client-IPUW2MSW.js +0 -11
  83. package/dist/launch-SRSMTDEM.js +0 -53
  84. package/dist/model-overrides-7F2EOA4U.js +0 -21
  85. package/dist/server-F72WN4KP.js +0 -56
  86. package/dist/web/assets/index-BlYcAqzD.js +0 -324
package/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.122 - 2026-08-16
4
+
5
+ ### Features
6
+
7
+ - **Live "time since your last prompt" counter** — the status bar ticks every second while the agent works
8
+ - **Right-click a message for its timestamp** — sent/received time in 24h format (2026/08/16 14:44)
9
+
10
+ ### Enhancements
11
+
12
+ - **Task moves and gate fills need your approval** — the agent no longer advances the board on its own
13
+ - **Status label is cleaner** — dropped the redundant phase suffix (it was always "Plan" outside workflows)
14
+
15
+ ## 2.0.121 - 2026-08-16
16
+
17
+ ### Features
18
+
19
+ - **New "Reset to default" action in the model selector** — undoes your manual model pick so the agent's own model or the global default applies again
20
+
21
+ ### Enhancements
22
+
23
+ - **Clearer workflow nudge** — builders are told to mark fixed criteria completed, not verified
24
+
25
+ ### Bug Fixes
26
+
27
+ - **Manual model pick is sticky** — switching agents or modes no longer overwrites your chosen model
28
+ - **Agent overrides survive model picks** — picking a model no longer deletes the agent's saved override
29
+ - **Sub-agents without overrides use the session model** — no longer inherit the parent agent's client
30
+ - **Prefill speed stats are cache-aware** — cached tokens are no longer counted as freshly processed
31
+ - **Compaction now counts as a prefill cache miss** — no longer reports zero tokens processed
32
+ - **Code review sees the raw diff again** — no longer re-verifies criteria from verifier notes
33
+
3
34
  ## 2.0.120 - 2026-08-15
4
35
 
5
36
  ### Bug Fixes
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.122 - 2026-08-16
4
+
5
+ ### Features
6
+
7
+ - **Live "time since your last prompt" counter** — the status bar ticks every second while the agent works
8
+ - **Right-click a message for its timestamp** — sent/received time in 24h format (2026/08/16 14:44)
9
+
10
+ ### Enhancements
11
+
12
+ - **Task moves and gate fills need your approval** — the agent no longer advances the board on its own
13
+ - **Status label is cleaner** — dropped the redundant phase suffix (it was always "Plan" outside workflows)
14
+
15
+ ## 2.0.121 - 2026-08-16
16
+
17
+ ### Features
18
+
19
+ - **New "Reset to default" action in the model selector** — undoes your manual model pick so the agent's own model or the global default applies again
20
+
21
+ ### Enhancements
22
+
23
+ - **Clearer workflow nudge** — builders are told to mark fixed criteria completed, not verified
24
+
25
+ ### Bug Fixes
26
+
27
+ - **Manual model pick is sticky** — switching agents or modes no longer overwrites your chosen model
28
+ - **Agent overrides survive model picks** — picking a model no longer deletes the agent's saved override
29
+ - **Sub-agents without overrides use the session model** — no longer inherit the parent agent's client
30
+ - **Prefill speed stats are cache-aware** — cached tokens are no longer counted as freshly processed
31
+ - **Compaction now counts as a prefill cache miss** — no longer reports zero tokens processed
32
+ - **Code review sees the raw diff again** — no longer re-verifies criteria from verifier notes
33
+
3
34
  ## 2.0.120 - 2026-08-15
4
35
 
5
36
  ### Bug Fixes
@@ -11,19 +11,14 @@ allowedTools:
11
11
  - session_metadata
12
12
  ---
13
13
 
14
- You are a code reviewer. Your caller may provide situational context before the diff — **intended scope (criteria)**, **what the verifier already confirmed**, and the **modified files**. Review the **git diff** of the modified files rather than reading the full files.
15
-
16
- When context is provided, use it to judge the change against what was actually requested:
17
-
18
- - Read the intended scope (criteria) and check the diff delivers it faithfully — flag mismatches, partial implementations, or scope creep.
19
- - Treat the verifier's notes as already-confirmed ground truth. Don't re-verify what it covered; instead catch what it missed.
20
- - You're not looking for 100% perfection. Just something that feels good to use and doesn't bloat the software.
21
-
14
+ You are a code reviewer. Review the **git diff** of the modified files rather than reading the full files.
22
15
  You're mostly interested in:
23
16
 
24
17
  1. **For the user (UX interaction)** — does this feel good to use? Any rough edges, confusing behavior, or unnecessary friction?
25
18
  2. **For the project (code quality + guidelines)** — does this follow project conventions? Is it maintainable? Does it bloat the software?
26
19
 
20
+ You're not looking for 100% perfection. Just something that feels good to use and doesn't bloat the software.
21
+
27
22
  ## Managing Findings
28
23
 
29
24
  Use `session_metadata` to track your findings:
@@ -2,53 +2,52 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-USNG72WA.js";
5
+ } from "./chunk-YDDBPKVP.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-HWHWXLM5.js";
9
- import "./chunk-JDWJ2PJJ.js";
10
- import "./chunk-IW46BUOP.js";
11
- import "./chunk-2FCLCUVR.js";
12
- import "./chunk-IQFPRQWM.js";
13
- import "./chunk-27NABDXB.js";
14
- import "./chunk-M6X6AIEG.js";
15
- import "./chunk-ZTOG6LJD.js";
8
+ } from "./chunk-KDC4QHE7.js";
9
+ import "./chunk-AIXVERRI.js";
10
+ import "./chunk-SCP5KBNB.js";
11
+ import "./chunk-LSEHJ2WI.js";
12
+ import "./chunk-OXANSWVZ.js";
13
+ import "./chunk-I22B6KWV.js";
16
14
  import "./chunk-I72ACQ6R.js";
17
15
  import "./chunk-JE7LW7Y6.js";
18
16
  import "./chunk-OAN4BXEW.js";
19
- import "./chunk-O6DU226D.js";
17
+ import "./chunk-RMOKNQAS.js";
20
18
  import "./chunk-J7GAZGZT.js";
21
- import "./chunk-AS7KAH66.js";
22
- import "./chunk-EQ5CGNOT.js";
23
- import "./chunk-XZGQZ42D.js";
24
- import {
25
- getEventStore
26
- } from "./chunk-JOCR4CF4.js";
27
- import "./chunk-KLQEL2DZ.js";
19
+ import "./chunk-STYGFTEB.js";
20
+ import "./chunk-YBOU4ZFD.js";
21
+ import "./chunk-5A4YN6I7.js";
28
22
  import {
29
23
  createChatMessageMessage,
30
24
  createPhaseChangedMessage,
31
25
  createSessionRunningMessage
32
26
  } from "./chunk-XAAEP5XM.js";
33
- import "./chunk-AESOGRFK.js";
34
27
  import "./chunk-JURM3RPZ.js";
35
- import "./chunk-JLAR2CMV.js";
36
- import "./chunk-3KBRMBTP.js";
28
+ import "./chunk-62GUO2EG.js";
29
+ import "./chunk-Y7FGHKBW.js";
30
+ import {
31
+ getEventStore
32
+ } from "./chunk-J3IJJ55E.js";
33
+ import "./chunk-SLW3KKPP.js";
34
+ import "./chunk-EZ67GBEO.js";
35
+ import "./chunk-LWXLNE6M.js";
37
36
  import "./chunk-LCLH6ZUL.js";
38
- import "./chunk-LNNBLB6G.js";
37
+ import "./chunk-2N7KFNMY.js";
39
38
  import "./chunk-OSXPQSLW.js";
40
- import "./chunk-3PG65AXG.js";
41
- import "./chunk-WN76RDRU.js";
39
+ import "./chunk-DIALH34K.js";
40
+ import "./chunk-UJRWYZHM.js";
42
41
  import "./chunk-K2QKX4ZJ.js";
43
42
  import "./chunk-J2GP3J3X.js";
44
- import "./chunk-KFQKBXLO.js";
43
+ import "./chunk-J77SLE3M.js";
45
44
  import "./chunk-GJL3QSMP.js";
46
45
  import "./chunk-AZHWLLPP.js";
47
46
  import "./chunk-HNCM3D7Y.js";
48
47
  import "./chunk-MIPQOHWS.js";
49
- import "./chunk-LTYL6ZGH.js";
50
- import "./chunk-HD6Y77RO.js";
51
- import "./chunk-5PT4UMRR.js";
48
+ import "./chunk-POTCPZJF.js";
49
+ import "./chunk-FGVMRFDW.js";
50
+ import "./chunk-NYQKSKDB.js";
52
51
  import "./chunk-K44MW7JJ.js";
53
52
  import "./chunk-KSDWQ6IZ.js";
54
53
  import "./chunk-KSXCOHHW.js";
@@ -174,4 +173,4 @@ export {
174
173
  startChatSession,
175
174
  stopSessionExecution
176
175
  };
177
- //# sourceMappingURL=chat-handler-TIR5CMWE.js.map
176
+ //# sourceMappingURL=chat-handler-JQUVSZT3.js.map
@@ -2,41 +2,30 @@ import {
2
2
  generateSessionNameForSession,
3
3
  getSessionMessageCount,
4
4
  needsNameGeneration
5
- } from "./chunk-USNG72WA.js";
5
+ } from "./chunk-YDDBPKVP.js";
6
6
  import {
7
7
  launchWorkflowRun
8
- } from "./chunk-JDBIR2J7.js";
8
+ } from "./chunk-UOEAKQBH.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-HWHWXLM5.js";
12
- import {
13
- devServerManager
14
- } from "./chunk-JDWJ2PJJ.js";
11
+ } from "./chunk-KDC4QHE7.js";
15
12
  import {
16
13
  applyDynamicContext,
17
14
  computeSessionHash,
18
15
  computeUnifiedDiff
19
- } from "./chunk-IW46BUOP.js";
20
- import {
21
- appendCompactionPrompt
22
- } from "./chunk-A5JAVQKG.js";
16
+ } from "./chunk-AIXVERRI.js";
23
17
  import {
24
- hasRecentLLMFailure,
25
- interruptLLMRetryWait
26
- } from "./chunk-IQFPRQWM.js";
18
+ devServerManager
19
+ } from "./chunk-SCP5KBNB.js";
27
20
  import {
28
21
  onProcessEvent
29
- } from "./chunk-ZTOG6LJD.js";
22
+ } from "./chunk-I22B6KWV.js";
30
23
  import {
31
24
  killProcessTree
32
25
  } from "./chunk-I72ACQ6R.js";
33
26
  import {
34
27
  gitSpawnEnv
35
28
  } from "./chunk-J7GAZGZT.js";
36
- import {
37
- combineEventsWithSnapshot,
38
- getEventStore
39
- } from "./chunk-JOCR4CF4.js";
40
29
  import {
41
30
  createChatErrorMessage,
42
31
  createChatMessageMessage,
@@ -52,23 +41,34 @@ import {
52
41
  serializeServerMessage,
53
42
  storedEventToServerMessage
54
43
  } from "./chunk-XAAEP5XM.js";
55
- import {
56
- getPlatformShell
57
- } from "./chunk-AESOGRFK.js";
58
44
  import {
59
45
  getPendingQuestionsForSession,
60
46
  provideAnswer
61
47
  } from "./chunk-JURM3RPZ.js";
48
+ import {
49
+ appendCompactionPrompt
50
+ } from "./chunk-6A2VIV36.js";
51
+ import {
52
+ hasRecentLLMFailure,
53
+ interruptLLMRetryWait
54
+ } from "./chunk-62GUO2EG.js";
55
+ import {
56
+ combineEventsWithSnapshot,
57
+ getEventStore
58
+ } from "./chunk-J3IJJ55E.js";
59
+ import {
60
+ getPlatformShell
61
+ } from "./chunk-EZ67GBEO.js";
62
62
  import {
63
63
  buildMessagesFromStoredEvents,
64
64
  foldPendingConfirmations
65
- } from "./chunk-3KBRMBTP.js";
65
+ } from "./chunk-LWXLNE6M.js";
66
66
  import {
67
67
  getRuntimeConfig
68
- } from "./chunk-LNNBLB6G.js";
68
+ } from "./chunk-2N7KFNMY.js";
69
69
  import {
70
70
  getMaxVisibleItems
71
- } from "./chunk-HD6Y77RO.js";
71
+ } from "./chunk-FGVMRFDW.js";
72
72
  import {
73
73
  logger
74
74
  } from "./chunk-K44MW7JJ.js";
@@ -669,52 +669,57 @@ function createWebSocketServer(httpServer, _config, getLLMClient, getActiveProvi
669
669
  moduleClients = clients;
670
670
  const sessionLLMClients = /* @__PURE__ */ new Map();
671
671
  function getSessionLLMClient(sessionId) {
672
- const session = sessionManager.getSession(sessionId);
673
- if (!session?.providerId || !session?.providerModel || !providerManager) {
672
+ const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
673
+ if (!effective.providerId || !effective.model || !providerManager) {
674
674
  return getLLMClient();
675
675
  }
676
- const resolvedModel = providerManager.resolveModel(session.providerId, session.providerModel);
677
- const effectiveModel = resolvedModel ?? session.providerModel;
678
- const cacheKey = `${session.providerId}:${effectiveModel}`;
676
+ const resolvedModel = providerManager.resolveModel(effective.providerId, effective.model);
677
+ const effectiveModel = resolvedModel ?? effective.model;
678
+ const cacheKey = `${effective.providerId}:${effectiveModel}`;
679
679
  const cached = sessionLLMClients.get(sessionId);
680
680
  if (cached && cached.key === cacheKey) {
681
681
  return cached.client;
682
682
  }
683
- const provider = providerManager.getProviders().find((p) => p.id === session.providerId);
683
+ const provider = providerManager.getProviders().find((p) => p.id === effective.providerId);
684
684
  if (!provider) {
685
- logger.warn("Session references deleted provider, falling back to global", {
685
+ logger.warn("Session references missing provider, falling back to global", {
686
686
  sessionId,
687
- providerId: session.providerId
687
+ providerId: effective.providerId
688
688
  });
689
- sessionManager.setSessionProvider(sessionId, null, null);
689
+ const session2 = sessionManager.getSession(sessionId);
690
+ if (session2?.providerId === effective.providerId) {
691
+ sessionManager.setSessionProvider(sessionId, null, null, false);
692
+ sessionManager.setSessionProviderActive(sessionId, true);
693
+ }
690
694
  sessionLLMClients.delete(sessionId);
691
695
  return getLLMClient();
692
696
  }
693
- const client = providerManager.createClient(session.providerId, effectiveModel);
697
+ const client = providerManager.createClient(effective.providerId, effectiveModel);
694
698
  if (!client) {
695
699
  logger.warn("Could not create session provider client, falling back to global", {
696
700
  sessionId,
697
- providerId: session.providerId,
698
- model: session.providerModel
701
+ providerId: effective.providerId,
702
+ model: effective.model
699
703
  });
700
704
  return getLLMClient();
701
705
  }
702
706
  const concreteModel = client.getModel();
703
- if (session.providerModel !== concreteModel) {
704
- sessionManager.setSessionProvider(sessionId, session.providerId, concreteModel);
707
+ const session = sessionManager.getSession(sessionId);
708
+ if (session?.providerId === effective.providerId && session.providerModel === effective.model && session.providerModel !== concreteModel) {
709
+ sessionManager.setSessionProvider(sessionId, effective.providerId, concreteModel);
705
710
  }
706
- sessionLLMClients.set(sessionId, { key: `${session.providerId}:${concreteModel}`, client });
711
+ sessionLLMClients.set(sessionId, { key: `${effective.providerId}:${concreteModel}`, client });
707
712
  return client;
708
713
  }
709
714
  function getSessionStatsIdentity(sessionId) {
710
- const session = sessionManager.getSession(sessionId);
711
- if (!session?.providerId || !providerManager) {
715
+ const effective = sessionManager.resolveEffectiveProviderModel(sessionId);
716
+ if (!effective.providerId || !providerManager) {
712
717
  return resolveStatsIdentity(getLLMClient(), getActiveProvider);
713
718
  }
714
- const provider = providerManager.getProviders().find((p) => p.id === session.providerId);
719
+ const provider = providerManager.getProviders().find((p) => p.id === effective.providerId);
715
720
  const client = getSessionLLMClient(sessionId);
716
721
  return {
717
- providerId: provider?.id ?? session.providerId,
722
+ providerId: provider?.id ?? effective.providerId,
718
723
  providerName: provider?.name ?? "Unknown Provider",
719
724
  backend: provider?.backend ?? client.getBackend(),
720
725
  model: client.getModel()
@@ -1281,8 +1286,8 @@ async function handleClientMessage(ws, client, message, _getLLMClient, _getActiv
1281
1286
  }
1282
1287
  const session = sessionManager.requireSession(sessionId);
1283
1288
  try {
1284
- const { buildCachedPrompt } = await import("./dynamic-context-C6HGUQTR.js");
1285
- const allAgents = await import("./registry-5QL3BOWN.js");
1289
+ const { buildCachedPrompt } = await import("./dynamic-context-IWFD7U3D.js");
1290
+ const allAgents = await import("./registry-37GL3DAP.js");
1286
1291
  const agentDef = allAgents.findAgentById(session.mode, await allAgents.loadAllAgentsDefault()) ?? allAgents.findAgentById("planner", await allAgents.loadAllAgentsDefault());
1287
1292
  const modelName = session.providerModel ?? _providerManager?.getCurrentModel();
1288
1293
  const { systemPrompt: newPrompt, hash: newHash } = await buildCachedPrompt(
@@ -1606,4 +1611,4 @@ export {
1606
1611
  signalMcpReady,
1607
1612
  createWebSocketServer
1608
1613
  };
1609
- //# sourceMappingURL=chunk-PI4X3Y6H.js.map
1614
+ //# sourceMappingURL=chunk-22D7ZR2X.js.map
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-OSXPQSLW.js";
4
4
  import {
5
5
  getProjectDefaultAgent
6
- } from "./chunk-3PG65AXG.js";
6
+ } from "./chunk-DIALH34K.js";
7
7
  import {
8
8
  SETTINGS_KEYS,
9
9
  getSetting
10
- } from "./chunk-HD6Y77RO.js";
10
+ } from "./chunk-FGVMRFDW.js";
11
11
  import {
12
12
  logger
13
13
  } from "./chunk-K44MW7JJ.js";
@@ -352,4 +352,4 @@ export {
352
352
  getOverrideAgentIds,
353
353
  resolveDefaultAgentId
354
354
  };
355
- //# sourceMappingURL=chunk-LNNBLB6G.js.map
355
+ //# sourceMappingURL=chunk-2N7KFNMY.js.map
@@ -1,12 +1,12 @@
1
- import {
2
- getEventStore
3
- } from "./chunk-JOCR4CF4.js";
4
1
  import {
5
2
  createChatPathConfirmationMessage
6
3
  } from "./chunk-XAAEP5XM.js";
4
+ import {
5
+ getEventStore
6
+ } from "./chunk-J3IJJ55E.js";
7
7
  import {
8
8
  getPlatformShell
9
- } from "./chunk-AESOGRFK.js";
9
+ } from "./chunk-EZ67GBEO.js";
10
10
 
11
11
  // src/server/tools/path-security.ts
12
12
  import { realpath } from "fs/promises";
@@ -671,4 +671,4 @@ export {
671
671
  getConfirmationSessionId,
672
672
  getPendingConfirmationsBySession
673
673
  };
674
- //# sourceMappingURL=chunk-XZGQZ42D.js.map
674
+ //# sourceMappingURL=chunk-5A4YN6I7.js.map
@@ -363,6 +363,7 @@ var TurnMetrics = class {
363
363
  startTime;
364
364
  totalPrefillTokens = 0;
365
365
  totalPrefillIncrement = 0;
366
+ hasPrefillIncrement = false;
366
367
  totalPrefillTime = 0;
367
368
  // seconds
368
369
  totalGenTokens = 0;
@@ -387,9 +388,10 @@ var TurnMetrics = class {
387
388
  if (modelParams) {
388
389
  this.modelParams = modelParams;
389
390
  }
390
- const prefTokenIncrement = previousContextTokens !== void 0 ? Math.max(0, promptTokens - previousContextTokens) : void 0;
391
+ const prefTokenIncrement = previousContextTokens !== void 0 ? promptTokens >= previousContextTokens ? promptTokens - previousContextTokens : promptTokens : void 0;
391
392
  if (prefTokenIncrement !== void 0) {
392
393
  this.totalPrefillIncrement += prefTokenIncrement;
394
+ this.hasPrefillIncrement = true;
393
395
  }
394
396
  const prefillSource = prefTokenIncrement ?? promptTokens;
395
397
  this.llmCalls = [
@@ -426,7 +428,7 @@ var TurnMetrics = class {
426
428
  identity,
427
429
  mode,
428
430
  totalPrefillTokens: this.totalPrefillTokens,
429
- ...this.totalPrefillIncrement > 0 && { totalPrefillIncrement: this.totalPrefillIncrement },
431
+ ...this.hasPrefillIncrement && { totalPrefillIncrement: this.totalPrefillIncrement },
430
432
  totalGenTokens: this.totalGenTokens,
431
433
  totalPrefillTime: this.totalPrefillTime,
432
434
  totalGenTime: this.totalGenTime,
@@ -516,4 +518,4 @@ export {
516
518
  createChatDoneEvent,
517
519
  consumeStreamGenerator
518
520
  };
519
- //# sourceMappingURL=chunk-IQFPRQWM.js.map
521
+ //# sourceMappingURL=chunk-62GUO2EG.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMessageStartEvent
3
- } from "./chunk-IQFPRQWM.js";
3
+ } from "./chunk-62GUO2EG.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
- } from "./chunk-27NABDXB.js";
6
+ } from "./chunk-Y7FGHKBW.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-JOCR4CF4.js";
9
+ } from "./chunk-J3IJJ55E.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-A5JAVQKG.js.map
39
+ //# sourceMappingURL=chunk-6A2VIV36.js.map
@@ -22,6 +22,7 @@ function buildSessionStats(messagesWithStats) {
22
22
  let toolTime = 0;
23
23
  let prefillTokens = 0;
24
24
  let generationTokens = 0;
25
+ let totalPrefillSource = 0;
25
26
  let totalPrefillTime = 0;
26
27
  let totalGenTime = 0;
27
28
  const dataPoints = [];
@@ -34,8 +35,10 @@ function buildSessionStats(messagesWithStats) {
34
35
  toolTime += stats.toolTime;
35
36
  prefillTokens += stats.prefillTokens;
36
37
  generationTokens += stats.generationTokens;
37
- const prefillTime = stats.prefillSpeed > 0 ? stats.prefillTokens / stats.prefillSpeed : 0;
38
+ const prefillSource = stats.prefTokenIncrement ?? stats.prefillTokens;
39
+ const prefillTime = stats.prefillSpeed > 0 ? prefillSource / stats.prefillSpeed : 0;
38
40
  const genTime = stats.generationSpeed > 0 ? stats.generationTokens / stats.generationSpeed : 0;
41
+ totalPrefillSource += prefillSource;
39
42
  totalPrefillTime += prefillTime;
40
43
  totalGenTime += genTime;
41
44
  dataPoints.push({
@@ -80,7 +83,7 @@ function buildSessionStats(messagesWithStats) {
80
83
  });
81
84
  }
82
85
  }
83
- const avgPrefillSpeed = totalPrefillTime > 0 ? roundTo1(prefillTokens / totalPrefillTime) : 0;
86
+ const avgPrefillSpeed = totalPrefillTime > 0 ? roundTo1(totalPrefillSource / totalPrefillTime) : 0;
84
87
  const avgGenerationSpeed = totalGenTime > 0 ? roundTo1(generationTokens / totalGenTime) : 0;
85
88
  return {
86
89
  totalTime: roundTo1(totalTime),
@@ -126,4 +129,4 @@ function computeSessionStats(messages) {
126
129
  export {
127
130
  computeSessionStats
128
131
  };
129
- //# sourceMappingURL=chunk-VUQCQXXJ.js.map
132
+ //# sourceMappingURL=chunk-7OHXF5GW.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  getAllInstructions,
3
3
  getEnabledSkillMetadata
4
- } from "./chunk-2FCLCUVR.js";
4
+ } from "./chunk-LSEHJ2WI.js";
5
5
  import {
6
6
  buildTopLevelSystemPrompt
7
- } from "./chunk-27NABDXB.js";
7
+ } from "./chunk-Y7FGHKBW.js";
8
8
  import {
9
9
  findAgentById,
10
10
  getRuntimeConfig,
11
11
  getSubAgents,
12
12
  loadAllAgentsDefault,
13
13
  resolveDefaultAgentId
14
- } from "./chunk-LNNBLB6G.js";
14
+ } from "./chunk-2N7KFNMY.js";
15
15
  import {
16
16
  logger
17
17
  } from "./chunk-K44MW7JJ.js";
@@ -105,7 +105,7 @@ function resolveAgentDef(sessionManager, sessionId) {
105
105
  }
106
106
  async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName) {
107
107
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
108
- const { getToolRegistryForAgent } = await import("./tools-GCBDO7TU.js");
108
+ const { getToolRegistryForAgent } = await import("./tools-IKMNLLAY.js");
109
109
  const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
110
110
  const toolFingerprint = getToolFingerprint(tools);
111
111
  const allAgents = await loadAllAgentsDefault(sessionManager.getProjectWorkdir(sessionId));
@@ -124,7 +124,7 @@ async function buildCachedPrompt(sessionManager, sessionId, agentDef, modelName)
124
124
  async function computeSessionHash(sessionManager, sessionId, modelName) {
125
125
  const { instructionContent, skills } = await loadSessionContext(sessionManager, sessionId);
126
126
  const agentDef = await resolveAgentDef(sessionManager, sessionId);
127
- const { getToolRegistryForAgent } = await import("./tools-GCBDO7TU.js");
127
+ const { getToolRegistryForAgent } = await import("./tools-IKMNLLAY.js");
128
128
  const tools = getToolRegistryForAgent(agentDef, sessionId).definitions;
129
129
  const toolFingerprint = getToolFingerprint(tools);
130
130
  return computeDynamicContextHash(instructionContent, skills, toolFingerprint, modelName);
@@ -148,4 +148,4 @@ export {
148
148
  computeSessionHash,
149
149
  applyDynamicContext
150
150
  };
151
- //# sourceMappingURL=chunk-IW46BUOP.js.map
151
+ //# sourceMappingURL=chunk-AIXVERRI.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-5PT4UMRR.js";
3
+ } from "./chunk-NYQKSKDB.js";
4
4
 
5
5
  // src/server/db/projects.ts
6
6
  function createProject(name, workdir) {
@@ -144,4 +144,4 @@ export {
144
144
  toggleStar,
145
145
  getProjectDefaultAgent
146
146
  };
147
- //# sourceMappingURL=chunk-3PG65AXG.js.map
147
+ //# sourceMappingURL=chunk-DIALH34K.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  SETTINGS_KEYS,
3
3
  getSetting
4
- } from "./chunk-HD6Y77RO.js";
4
+ } from "./chunk-FGVMRFDW.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-AESOGRFK.js.map
66
+ //# sourceMappingURL=chunk-EZ67GBEO.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getDatabase
3
- } from "./chunk-5PT4UMRR.js";
3
+ } from "./chunk-NYQKSKDB.js";
4
4
 
5
5
  // src/server/db/settings.ts
6
6
  var SETTINGS_KEYS = {
@@ -131,4 +131,4 @@ export {
131
131
  getAllSettings,
132
132
  getMaxVisibleItems
133
133
  };
134
- //# sourceMappingURL=chunk-HD6Y77RO.js.map
134
+ //# sourceMappingURL=chunk-FGVMRFDW.js.map
@@ -11,11 +11,11 @@ import {
11
11
  } from "./chunk-I72ACQ6R.js";
12
12
  import {
13
13
  getPlatformShell
14
- } from "./chunk-AESOGRFK.js";
14
+ } from "./chunk-EZ67GBEO.js";
15
15
  import {
16
16
  SETTINGS_KEYS,
17
17
  getSetting
18
- } from "./chunk-HD6Y77RO.js";
18
+ } from "./chunk-FGVMRFDW.js";
19
19
 
20
20
  // src/server/utils/shell.ts
21
21
  import { spawn } from "child_process";
@@ -214,4 +214,4 @@ export {
214
214
  getSessionProcesses2 as getSessionProcesses,
215
215
  getProcessLogs
216
216
  };
217
- //# sourceMappingURL=chunk-ZTOG6LJD.js.map
217
+ //# sourceMappingURL=chunk-I22B6KWV.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateSessionMessageCount
3
- } from "./chunk-KLQEL2DZ.js";
3
+ } from "./chunk-SLW3KKPP.js";
4
4
  import {
5
5
  buildContextMessagesFromEventHistory,
6
6
  buildMessagesFromStoredEvents,
@@ -9,13 +9,13 @@ import {
9
9
  foldSessionState,
10
10
  spreadOptionalMessageFields,
11
11
  trimSnapshotStreamingOutput
12
- } from "./chunk-3KBRMBTP.js";
12
+ } from "./chunk-LWXLNE6M.js";
13
13
  import {
14
14
  getRuntimeConfig
15
- } from "./chunk-LNNBLB6G.js";
15
+ } from "./chunk-2N7KFNMY.js";
16
16
  import {
17
17
  SETTINGS_KEYS
18
- } from "./chunk-HD6Y77RO.js";
18
+ } from "./chunk-FGVMRFDW.js";
19
19
  import {
20
20
  logger
21
21
  } from "./chunk-K44MW7JJ.js";
@@ -1465,4 +1465,4 @@ export {
1465
1465
  truncateSessionMessages,
1466
1466
  getRecentUserPromptsForSession
1467
1467
  };
1468
- //# sourceMappingURL=chunk-JOCR4CF4.js.map
1468
+ //# sourceMappingURL=chunk-J3IJJ55E.js.map
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  LLMError,
19
19
  OpenAIHttpClient
20
- } from "./chunk-LTYL6ZGH.js";
20
+ } from "./chunk-POTCPZJF.js";
21
21
  import {
22
22
  logger
23
23
  } from "./chunk-K44MW7JJ.js";
@@ -316,4 +316,4 @@ function createLLMClient(config, initialBackend = "unknown") {
316
316
  export {
317
317
  createLLMClient
318
318
  };
319
- //# sourceMappingURL=chunk-KFQKBXLO.js.map
319
+ //# sourceMappingURL=chunk-J77SLE3M.js.map