openfox 2.0.116 → 2.0.118

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 (45) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/dist/CHANGELOG.md +40 -0
  3. package/dist/{chat-handler-Z6BEY66U.js → chat-handler-KNBP6WVI.js} +10 -10
  4. package/dist/{chunk-HYPXL7K5.js → chunk-45OS4H3L.js} +31 -128
  5. package/dist/{chunk-SQLJRO3J.js → chunk-5E5G3DLI.js} +3 -3
  6. package/dist/{chunk-QJWTBVJO.js → chunk-5ZR5O5GC.js} +3 -3
  7. package/dist/chunk-BSULZIPW.js +7 -0
  8. package/dist/{chunk-X3XKYGUN.js → chunk-CIYA6BNB.js} +3 -3
  9. package/dist/{chunk-U4HMAYAD.js → chunk-CX7UJZA5.js} +17 -12
  10. package/dist/{chunk-4HV3PDEK.js → chunk-IDUXGSQV.js} +173 -111
  11. package/dist/{chunk-TGVDUK4N.js → chunk-JOCR4CF4.js} +1 -1
  12. package/dist/{chunk-ZKLE2Q3I.js → chunk-KSDWQ6IZ.js} +1 -1
  13. package/dist/{chunk-6XHDNSA3.js → chunk-MTFLMNLN.js} +7 -4
  14. package/dist/{chunk-EQ7DK2TG.js → chunk-NP2SV2CX.js} +74 -6
  15. package/dist/{chunk-4E52GUXJ.js → chunk-RXIDGWNV.js} +35 -34
  16. package/dist/{chunk-4GHLULHB.js → chunk-XAAEP5XM.js} +8 -16
  17. package/dist/{chunk-QQVPUZQB.js → chunk-XZGQZ42D.js} +3 -3
  18. package/dist/{chunk-BH3BBUGB.js → chunk-Y6WWEQPC.js} +85 -23
  19. package/dist/cli/dev.js +1 -1
  20. package/dist/cli/index.js +1 -1
  21. package/dist/{compactor-LAXZLPPA.js → compactor-5ATICQ2A.js} +4 -4
  22. package/dist/{dynamic-context-YHWFFP53.js → dynamic-context-4SKLIPJ4.js} +2 -2
  23. package/dist/{events-IVPAMMR5.js → events-KDFMBVP5.js} +2 -2
  24. package/dist/{launch-PAVQAWGP.js → launch-Q6GUJ22H.js} +10 -10
  25. package/dist/{orchestrator-CS3KXLZE.js → orchestrator-DVCGWWNA.js} +9 -9
  26. package/dist/package.json +1 -1
  27. package/dist/{path-security-JTCHWYG3.js → path-security-L4AJJN2V.js} +5 -5
  28. package/dist/{processor-RZD4JRDX.js → processor-G6UJGA2K.js} +20 -9
  29. package/dist/{protocol-CfUkCYxF.d.ts → protocol-DzJrspsl.d.ts} +15 -8
  30. package/dist/{protocol-HYA5BYVN.js → protocol-TLODRZSB.js} +7 -7
  31. package/dist/{serve-KR22J37W.js → serve-23YIIMXH.js} +15 -15
  32. package/dist/server/index.d.ts +1 -1
  33. package/dist/server/index.js +14 -14
  34. package/dist/{server-ESKTIZL5.js → server-IDXIAC5L.js} +13 -13
  35. package/dist/shared/index.d.ts +1 -1
  36. package/dist/shared/index.js +1 -1
  37. package/dist/{tools-KBS6X3EN.js → tools-GOGLGTNV.js} +7 -7
  38. package/dist/{update-TDS6LP5N.js → update-T3YMIWQO.js} +2 -2
  39. package/dist/web/assets/index-BgENxR9h.js +324 -0
  40. package/dist/web/assets/{index-c43YT-4A.css → index-XTp1QlHA.css} +1 -1
  41. package/dist/web/index.html +2 -2
  42. package/dist/web/sw.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/chunk-HNHSUQCN.js +0 -7
  45. package/dist/web/assets/index-ChtRS33s.js +0 -324
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.118 - 2026-08-12
4
+
5
+ ### Features
6
+
7
+ - **LLM failures retry automatically** — chat, workflow steps, and sub-agents back off and retry, with a live countdown and "Retry now" to skip the wait
8
+ - **Searchable new-session modal in split view** — live case-insensitive project search with autofocus, arrow-key navigation, Enter to select, Esc to dismiss
9
+
10
+ ### Enhancements
11
+
12
+ - **LLM retries recover smoothly** — partial replies continue where they left off, provider switches apply on the next attempt, and failed calls leave no ghost messages
13
+
14
+ ### Bug Fixes
15
+
16
+ - **Paused workflow steps no longer vanish** — the choose-workspace pause survives late session refreshes
17
+ - **Composer no longer jumps while typing** — the input stays put on every keystroke
18
+
19
+ ## 2.0.117 - 2026-08-12
20
+
21
+ ### Features
22
+
23
+ - **New-session picker in split view** — pick any project, create a session, and open it as a pane
24
+ - **Project dropdown in split panes** — open the folder, manage tasks, or edit settings straight from a pane header
25
+
26
+ ### Enhancements
27
+
28
+ - **Live session list in split view** — the control panel refreshes automatically and on tab focus
29
+ - **Breadcrumb modal titles** — Tasks and Project Settings now read "project › action"
30
+
31
+ ### Bug Fixes
32
+
33
+ - **Tail smartness off for chained commands** — `&&`/`||` chains are no longer misread as piped output
34
+ - **Queued messages survive sub-agent runs** — no longer drained into a sub-agent context mid-run
35
+ - **Composer stays compact on narrow layouts** — and re-sizes when the pane width changes
36
+ - **Split-view actions target the owning pane** — launch, resume, retry, compact, and exit stay in their pane
37
+ - **Path confirmations land in the right pane** — allow/deny prompts appear instantly where they were asked
38
+ - **Each split pane shows its own workspace** — branch, git diff, and context no longer bleed between panes
39
+ - **Adding a split pane mid-stream no longer crashes** — the "maximum update depth" blank-screen error is gone
40
+ - **Project-scoped agents in the default agent list** — grouped by Project, User, and Built-in
41
+ - **Saving a new agent no longer hangs** — the settings modal no longer sticks on "saving"
42
+
3
43
  ## 2.0.116 - 2026-08-11
4
44
 
5
45
  ### Features
package/dist/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.118 - 2026-08-12
4
+
5
+ ### Features
6
+
7
+ - **LLM failures retry automatically** — chat, workflow steps, and sub-agents back off and retry, with a live countdown and "Retry now" to skip the wait
8
+ - **Searchable new-session modal in split view** — live case-insensitive project search with autofocus, arrow-key navigation, Enter to select, Esc to dismiss
9
+
10
+ ### Enhancements
11
+
12
+ - **LLM retries recover smoothly** — partial replies continue where they left off, provider switches apply on the next attempt, and failed calls leave no ghost messages
13
+
14
+ ### Bug Fixes
15
+
16
+ - **Paused workflow steps no longer vanish** — the choose-workspace pause survives late session refreshes
17
+ - **Composer no longer jumps while typing** — the input stays put on every keystroke
18
+
19
+ ## 2.0.117 - 2026-08-12
20
+
21
+ ### Features
22
+
23
+ - **New-session picker in split view** — pick any project, create a session, and open it as a pane
24
+ - **Project dropdown in split panes** — open the folder, manage tasks, or edit settings straight from a pane header
25
+
26
+ ### Enhancements
27
+
28
+ - **Live session list in split view** — the control panel refreshes automatically and on tab focus
29
+ - **Breadcrumb modal titles** — Tasks and Project Settings now read "project › action"
30
+
31
+ ### Bug Fixes
32
+
33
+ - **Tail smartness off for chained commands** — `&&`/`||` chains are no longer misread as piped output
34
+ - **Queued messages survive sub-agent runs** — no longer drained into a sub-agent context mid-run
35
+ - **Composer stays compact on narrow layouts** — and re-sizes when the pane width changes
36
+ - **Split-view actions target the owning pane** — launch, resume, retry, compact, and exit stay in their pane
37
+ - **Path confirmations land in the right pane** — allow/deny prompts appear instantly where they were asked
38
+ - **Each split pane shows its own workspace** — branch, git diff, and context no longer bleed between panes
39
+ - **Adding a split pane mid-stream no longer crashes** — the "maximum update depth" blank-screen error is gone
40
+ - **Project-scoped agents in the default agent list** — grouped by Project, User, and Built-in
41
+ - **Saving a new agent no longer hangs** — the settings modal no longer sticks on "saving"
42
+
3
43
  ## 2.0.116 - 2026-08-11
4
44
 
5
45
  ### Features
@@ -2,14 +2,14 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  generateSessionNameForSession
5
- } from "./chunk-6XHDNSA3.js";
5
+ } from "./chunk-MTFLMNLN.js";
6
6
  import {
7
7
  runChatTurn
8
- } from "./chunk-U4HMAYAD.js";
9
- import "./chunk-4HV3PDEK.js";
10
- import "./chunk-SQLJRO3J.js";
8
+ } from "./chunk-CX7UJZA5.js";
9
+ import "./chunk-IDUXGSQV.js";
10
+ import "./chunk-5E5G3DLI.js";
11
11
  import "./chunk-2FCLCUVR.js";
12
- import "./chunk-EQ7DK2TG.js";
12
+ import "./chunk-NP2SV2CX.js";
13
13
  import "./chunk-27NABDXB.js";
14
14
  import "./chunk-M6X6AIEG.js";
15
15
  import "./chunk-ZTOG6LJD.js";
@@ -20,16 +20,16 @@ import "./chunk-O6DU226D.js";
20
20
  import "./chunk-J7GAZGZT.js";
21
21
  import "./chunk-HZSKKJHQ.js";
22
22
  import "./chunk-EQ5CGNOT.js";
23
- import "./chunk-QQVPUZQB.js";
23
+ import "./chunk-XZGQZ42D.js";
24
24
  import {
25
25
  getEventStore
26
- } from "./chunk-TGVDUK4N.js";
26
+ } from "./chunk-JOCR4CF4.js";
27
27
  import "./chunk-KLQEL2DZ.js";
28
28
  import {
29
29
  createChatMessageMessage,
30
30
  createPhaseChangedMessage,
31
31
  createSessionRunningMessage
32
- } from "./chunk-4GHLULHB.js";
32
+ } from "./chunk-XAAEP5XM.js";
33
33
  import "./chunk-AESOGRFK.js";
34
34
  import "./chunk-JURM3RPZ.js";
35
35
  import "./chunk-JLAR2CMV.js";
@@ -49,7 +49,7 @@ import "./chunk-LTYL6ZGH.js";
49
49
  import "./chunk-HD6Y77RO.js";
50
50
  import "./chunk-5PT4UMRR.js";
51
51
  import "./chunk-K44MW7JJ.js";
52
- import "./chunk-ZKLE2Q3I.js";
52
+ import "./chunk-KSDWQ6IZ.js";
53
53
  import "./chunk-KSXCOHHW.js";
54
54
  import "./chunk-CQGTEGKL.js";
55
55
  import "./chunk-YLJ4XMA6.js";
@@ -173,4 +173,4 @@ export {
173
173
  startChatSession,
174
174
  stopSessionExecution
175
175
  };
176
- //# sourceMappingURL=chat-handler-Z6BEY66U.js.map
176
+ //# sourceMappingURL=chat-handler-KNBP6WVI.js.map
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  runAgentTurn
3
- } from "./chunk-U4HMAYAD.js";
3
+ } from "./chunk-CX7UJZA5.js";
4
4
  import {
5
5
  executeSubAgent,
6
6
  getToolRegistryForAgent
7
- } from "./chunk-4HV3PDEK.js";
7
+ } from "./chunk-IDUXGSQV.js";
8
8
  import {
9
9
  TurnMetrics,
10
10
  createMessageStartEvent
11
- } from "./chunk-EQ7DK2TG.js";
11
+ } from "./chunk-NP2SV2CX.js";
12
12
  import {
13
13
  checkAborted,
14
14
  decodeUtf8,
@@ -31,11 +31,11 @@ import {
31
31
  import {
32
32
  getCurrentContextWindowId,
33
33
  getEventStore
34
- } from "./chunk-TGVDUK4N.js";
34
+ } from "./chunk-JOCR4CF4.js";
35
35
  import {
36
36
  createChatMessageMessage,
37
37
  createSessionRunningMessage
38
- } from "./chunk-4GHLULHB.js";
38
+ } from "./chunk-XAAEP5XM.js";
39
39
  import {
40
40
  findAgentById,
41
41
  getRuntimeConfig,
@@ -53,19 +53,11 @@ import {
53
53
  } from "./chunk-VUQCQXXJ.js";
54
54
  import {
55
55
  createServerMessage
56
- } from "./chunk-ZKLE2Q3I.js";
56
+ } from "./chunk-KSDWQ6IZ.js";
57
57
  import {
58
58
  getGlobalConfigDir
59
59
  } from "./chunk-CQGTEGKL.js";
60
60
 
61
- // src/server/runner/types.ts
62
- var DEFAULT_LLM_RETRY_POLICY = {
63
- backoffMs: [1e3, 5e3, 3e4],
64
- minIntervalMs: 6e4,
65
- maxDurationMs: 30 * 6e4,
66
- maxAttempts: 40
67
- };
68
-
69
61
  // src/server/workflows/types.ts
70
62
  var TERMINAL_DONE = "$done";
71
63
  var TERMINAL_BLOCKED = "$blocked";
@@ -347,64 +339,6 @@ function getCurrentWindowMessageOptions(sessionId) {
347
339
  const contextWindowId = getCurrentContextWindowId(sessionId);
348
340
  return contextWindowId ? { contextWindowId } : void 0;
349
341
  }
350
- function sleepWithSignal(ms, signal) {
351
- return new Promise((resolve, reject) => {
352
- if (signal?.aborted) {
353
- reject(new Error("Aborted"));
354
- return;
355
- }
356
- const onAbort = () => {
357
- clearTimeout(timer);
358
- signal?.removeEventListener("abort", onAbort);
359
- reject(new Error("Aborted"));
360
- };
361
- const timer = setTimeout(() => {
362
- signal?.removeEventListener("abort", onAbort);
363
- resolve();
364
- }, ms);
365
- signal?.addEventListener("abort", onAbort, { once: true });
366
- });
367
- }
368
- function evaluateLLMRetry(failures, firstFailureAt, now, policy) {
369
- if (now - firstFailureAt >= policy.maxDurationMs) return { retry: false };
370
- if (failures >= policy.maxAttempts) return { retry: false };
371
- const delayMs = failures <= policy.backoffMs.length ? policy.backoffMs[failures - 1] : policy.minIntervalMs;
372
- return { retry: true, delayMs, attempt: failures + 1 };
373
- }
374
- function rollbackFailedAttempt(sessionId, turnStartSeq) {
375
- const eventStore = getEventStore();
376
- const fromSeq = Math.max(1, turnStartSeq);
377
- const events = eventStore.getEvents(sessionId, fromSeq + 1);
378
- const assistantIds = new Set(
379
- events.filter((e) => e.type === "message.start" && e.data.role === "assistant").map((e) => e.data.messageId)
380
- );
381
- const tombstoneSeqs = events.filter((e) => {
382
- switch (e.type) {
383
- case "message.start":
384
- return e.data.role === "assistant";
385
- case "message.delta":
386
- case "message.thinking":
387
- case "message.done":
388
- case "chat.done":
389
- return assistantIds.has(e.data.messageId);
390
- case "chat.error":
391
- case "pattern.retry":
392
- case "tool.preparing":
393
- case "tool.call":
394
- case "tool.output":
395
- case "tool.result":
396
- return true;
397
- default:
398
- return false;
399
- }
400
- }).map((e) => e.seq);
401
- if (tombstoneSeqs.length > 0) {
402
- eventStore.tombstoneEvents(sessionId, tombstoneSeqs);
403
- }
404
- if (assistantIds.size > 0) {
405
- eventStore.append(sessionId, { type: "message.removed", data: { messageIds: [...assistantIds] } });
406
- }
407
- }
408
342
  function buildReason(metadataEntries) {
409
343
  const entries = metadataEntries?.["criteria"] ?? [];
410
344
  const remaining = entries.filter((e) => e.status !== "passed");
@@ -422,8 +356,6 @@ async function executeWorkflow(workflow, options, subGroup) {
422
356
  let currentStepId = isResume ? resumeFromStep : subGroup ? activeSteps[0]?.id ?? workflow.entryStep : workflow.entryStep;
423
357
  let lastStepOutput = options.initialStepOutput ?? {};
424
358
  const firstEntryForStep = /* @__PURE__ */ new Set();
425
- const stepLLMFailures = /* @__PURE__ */ new Map();
426
- const stepLLMDeadlines = /* @__PURE__ */ new Map();
427
359
  const messagesBeforeWorkflow = sessionManager.requireSession(sessionId).messages.length;
428
360
  const activeStepIds = new Set(activeSteps.map((s) => s.id));
429
361
  const activeSubGroups = /* @__PURE__ */ new Set();
@@ -569,7 +501,6 @@ async function executeWorkflow(workflow, options, subGroup) {
569
501
  const STEP_DONE_PROMPT = "\n\nOnce you're done, call step_done()";
570
502
  const STEP_DONE_NUDGE = "You haven't called step_done(). If you haven't finished the task, continue and when you're finished call step_done()";
571
503
  const isResumingCurrentStep = isResume && step.id === resumeFromStep && !resumeConsumed;
572
- const isLLMFailedRetry = firstEntryForStep.has(step.id) && (stepLLMFailures.get(step.id) ?? 0) > 0;
573
504
  let promptContent;
574
505
  let nudgeContent;
575
506
  if (!firstEntryForStep.has(step.id) && agentStep.prompt && !isResumingCurrentStep) {
@@ -600,7 +531,7 @@ async function executeWorkflow(workflow, options, subGroup) {
600
531
  })
601
532
  );
602
533
  }
603
- } else if (firstEntryForStep.has(step.id) && !isResumingCurrentStep && !isLLMFailedRetry) {
534
+ } else if (firstEntryForStep.has(step.id) && !isResumingCurrentStep) {
604
535
  const parts = [];
605
536
  if (agentStep.nudgePrompt) {
606
537
  const resolvedNudge = resolveTemplate(agentStep.nudgePrompt, templateCtx);
@@ -610,29 +541,7 @@ async function executeWorkflow(workflow, options, subGroup) {
610
541
  nudgeContent = parts.join("\n\n");
611
542
  emitWorkflowMessage(eventStore, sessionId, nudgeContent, currentWindowMessageOptions, onMessage);
612
543
  }
613
- const turnStartSeq = eventStore.getLatestSeq(sessionId) ?? 0;
614
- let retryBlocked = null;
615
- let blockedReason = "";
616
- const retryPolicy = { ...DEFAULT_LLM_RETRY_POLICY, ...options.llmRetryPolicy };
617
- const handleLLMFailure = async (errorMessage) => {
618
- const failures = (stepLLMFailures.get(step.id) ?? 0) + 1;
619
- stepLLMFailures.set(step.id, failures);
620
- const firstFailureAt = stepLLMDeadlines.get(step.id) ?? Date.now();
621
- stepLLMDeadlines.set(step.id, firstFailureAt);
622
- const decision = evaluateLLMRetry(failures, firstFailureAt, Date.now(), retryPolicy);
623
- if (decision.retry) {
624
- rollbackFailedAttempt(sessionId, turnStartSeq);
625
- firstEntryForStep.add(step.id);
626
- resumeConsumed = true;
627
- eventStore.append(sessionId, {
628
- type: "workflow.step_retry",
629
- data: { stepName: step.name, attempt: decision.attempt, retryInMs: decision.delayMs }
630
- });
631
- retryBlocked = "retry";
632
- await sleepWithSignal(decision.delayMs, signal);
633
- return;
634
- }
635
- rollbackFailedAttempt(sessionId, turnStartSeq);
544
+ const blockOnLLMFailure = (errorMessage) => {
636
545
  sessionManager.setPhase(sessionId, "blocked");
637
546
  if (executionId) {
638
547
  sessionManager.blockWorkflow(
@@ -643,9 +552,12 @@ async function executeWorkflow(workflow, options, subGroup) {
643
552
  workflow.metadata.color
644
553
  );
645
554
  }
646
- blockedReason = `Step "${step.name}" failed after ${failures} attempts: ${errorMessage}`;
647
- eventStore.append(sessionId, { type: "chat.error", data: { error: blockedReason, recoverable: false } });
648
- retryBlocked = "blocked";
555
+ const reason = `Step "${step.name}" failed: ${errorMessage}`;
556
+ return {
557
+ finalAction: { type: "BLOCKED", reason, blockedCriteria: [] },
558
+ iterations,
559
+ totalTime: (performance.now() - startTime) / 1e3
560
+ };
649
561
  };
650
562
  const turnMetrics = new TurnMetrics();
651
563
  const es = getEventStore();
@@ -658,11 +570,12 @@ async function executeWorkflow(workflow, options, subGroup) {
658
570
  sessionManager,
659
571
  sessionId,
660
572
  llmClient,
573
+ ...options.getSessionLLMClient ? { getSessionLLMClient: options.getSessionLLMClient } : {},
661
574
  ...options.statsIdentity ? { statsIdentity: options.statsIdentity } : {},
662
575
  ...signal ? { signal } : {},
663
576
  ...onMessage ? { onMessage } : {},
664
- suppressRecoverableErrors: true,
665
- ...isLLMFailedRetry || isResumingCurrentStep ? { skipAgentReminder: true } : {}
577
+ ...options.llmRetryPolicy ? { llmRetryPolicy: options.llmRetryPolicy } : {},
578
+ ...isResumingCurrentStep ? { skipAgentReminder: true } : {}
666
579
  },
667
580
  turnMetrics,
668
581
  agentStep.agentId ?? resolveDefaultAgentId(),
@@ -683,32 +596,12 @@ async function executeWorkflow(workflow, options, subGroup) {
683
596
  if (!(error instanceof LLMError)) {
684
597
  throw error;
685
598
  }
686
- await handleLLMFailure(error.message);
687
- if (retryBlocked === "retry") {
688
- iterations -= 1;
689
- continue;
690
- }
691
- return {
692
- finalAction: { type: "BLOCKED", reason: blockedReason, blockedCriteria: [] },
693
- iterations,
694
- totalTime: (performance.now() - startTime) / 1e3
695
- };
599
+ return blockOnLLMFailure(error.message);
696
600
  }
697
601
  if (agentResult.failed) {
698
- await handleLLMFailure(agentResult.failed.error);
699
- if (retryBlocked === "retry") {
700
- iterations -= 1;
701
- continue;
702
- }
703
- return {
704
- finalAction: { type: "BLOCKED", reason: blockedReason, blockedCriteria: [] },
705
- iterations,
706
- totalTime: (performance.now() - startTime) / 1e3
707
- };
602
+ return blockOnLLMFailure(agentResult.failed.error);
708
603
  }
709
604
  firstEntryForStep.add(step.id);
710
- stepLLMFailures.delete(step.id);
711
- stepLLMDeadlines.delete(step.id);
712
605
  resumeConsumed = true;
713
606
  const agentReturnValue = agentResult.returnValueResult ?? "completed";
714
607
  lastStepOutput = {
@@ -1018,7 +911,16 @@ function abortRunnerRun(sessionId) {
1018
911
  return true;
1019
912
  }
1020
913
  function launchWorkflowRun(deps, payload) {
1021
- const { sessionManager, sessionId, controller, llmClient, statsIdentity, broadcastForSession, onFinished } = deps;
914
+ const {
915
+ sessionManager,
916
+ sessionId,
917
+ controller,
918
+ llmClient,
919
+ getSessionLLMClient,
920
+ statsIdentity,
921
+ broadcastForSession,
922
+ onFinished
923
+ } = deps;
1022
924
  const signal = controller.signal;
1023
925
  activeRuns.set(sessionId, controller);
1024
926
  sessionManager.setRunning(sessionId, true);
@@ -1030,6 +932,7 @@ function launchWorkflowRun(deps, payload) {
1030
932
  sessionManager,
1031
933
  sessionId,
1032
934
  llmClient,
935
+ ...getSessionLLMClient ? { getSessionLLMClient } : {},
1033
936
  statsIdentity,
1034
937
  scope: normalizeWorkflowScope(payload.scope),
1035
938
  ...payload.workflowId ? { workflowId: payload.workflowId } : {},
@@ -1099,4 +1002,4 @@ export {
1099
1002
  abortRunnerRun,
1100
1003
  launchWorkflowRun
1101
1004
  };
1102
- //# sourceMappingURL=chunk-HYPXL7K5.js.map
1005
+ //# sourceMappingURL=chunk-45OS4H3L.js.map
@@ -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-KBS6X3EN.js");
108
+ const { getToolRegistryForAgent } = await import("./tools-GOGLGTNV.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-KBS6X3EN.js");
127
+ const { getToolRegistryForAgent } = await import("./tools-GOGLGTNV.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-SQLJRO3J.js.map
151
+ //# sourceMappingURL=chunk-5E5G3DLI.js.map
@@ -200,7 +200,7 @@ async function runCli(options) {
200
200
  break;
201
201
  }
202
202
  case "update": {
203
- const { runUpdate } = await import("./update-TDS6LP5N.js");
203
+ const { runUpdate } = await import("./update-T3YMIWQO.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-KR22J37W.js");
216
+ const { runServe } = await import("./serve-23YIIMXH.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-QJWTBVJO.js.map
228
+ //# sourceMappingURL=chunk-5ZR5O5GC.js.map
@@ -0,0 +1,7 @@
1
+ // src/constants.ts
2
+ var VERSION = "2.0.118";
3
+
4
+ export {
5
+ VERSION
6
+ };
7
+ //# sourceMappingURL=chunk-BSULZIPW.js.map
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createMessageStartEvent
3
- } from "./chunk-EQ7DK2TG.js";
3
+ } from "./chunk-NP2SV2CX.js";
4
4
  import {
5
5
  COMPACTION_PROMPT
6
6
  } from "./chunk-27NABDXB.js";
7
7
  import {
8
8
  getCurrentWindowMessageOptions
9
- } from "./chunk-TGVDUK4N.js";
9
+ } from "./chunk-JOCR4CF4.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-X3XKYGUN.js.map
39
+ //# sourceMappingURL=chunk-CIYA6BNB.js.map
@@ -4,12 +4,12 @@ import {
4
4
  getToolRegistryForAgent,
5
5
  processEventsForConversation,
6
6
  runTopLevelAgentLoop
7
- } from "./chunk-4HV3PDEK.js";
7
+ } from "./chunk-IDUXGSQV.js";
8
8
  import {
9
9
  buildCachedPrompt,
10
10
  computeDynamicContextHash,
11
11
  getToolFingerprint
12
- } from "./chunk-SQLJRO3J.js";
12
+ } from "./chunk-5E5G3DLI.js";
13
13
  import {
14
14
  getAllInstructions,
15
15
  getEnabledSkillMetadata
@@ -18,19 +18,19 @@ import {
18
18
  TurnMetrics,
19
19
  createChatDoneEvent,
20
20
  createMessageStartEvent
21
- } from "./chunk-EQ7DK2TG.js";
21
+ } from "./chunk-NP2SV2CX.js";
22
22
  import {
23
23
  buildAgentReminder,
24
24
  buildAgentSmallReminder
25
25
  } from "./chunk-27NABDXB.js";
26
26
  import {
27
27
  PathAccessDeniedError
28
- } from "./chunk-QQVPUZQB.js";
28
+ } from "./chunk-XZGQZ42D.js";
29
29
  import {
30
30
  getCurrentContextWindowId,
31
31
  getCurrentWindowMessageOptions,
32
32
  getEventStore
33
- } from "./chunk-TGVDUK4N.js";
33
+ } from "./chunk-JOCR4CF4.js";
34
34
  import {
35
35
  buildSnapshotFromSessionState
36
36
  } from "./chunk-3KBRMBTP.js";
@@ -72,9 +72,9 @@ async function buildRetryPatterns() {
72
72
  return { retryPatterns: [], maxRetriesPerTurn: 10 };
73
73
  }
74
74
  }
75
- function buildGetConversationMessages(sessionId, llmClient, append) {
75
+ function buildGetConversationMessages(sessionId, resolveLLMClient, append) {
76
76
  return async () => {
77
- const processedEvents = await processEventsForConversation(sessionId, llmClient, (event) => append(event));
77
+ const processedEvents = await processEventsForConversation(sessionId, resolveLLMClient(), (event) => append(event));
78
78
  return getConversationMessages({ type: "toplevel", sessionId }, { events: processedEvents });
79
79
  };
80
80
  }
@@ -226,7 +226,11 @@ function injectAgentReminder(sessionId, agentDef) {
226
226
  async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
227
227
  const allAgents = await loadAllAgentsDefault(options.sessionManager.getProjectWorkdir(options.sessionId));
228
228
  const agentDef = findAgentById(agentId, allAgents) ?? findAgentById(resolveDefaultAgentId(), allAgents);
229
- const agentLlmClient = options.sessionManager.createClientForAgent(agentId, options.llmClient);
229
+ const resolveAgentClient = () => options.sessionManager.createClientForAgent(
230
+ agentId,
231
+ options.getSessionLLMClient ? options.getSessionLLMClient() : options.llmClient
232
+ );
233
+ const agentLlmClient = resolveAgentClient();
230
234
  const statsIdentity = resolveStatsIdentity({ ...options, llmClient: agentLlmClient });
231
235
  if (!options.warmup && !options.skipAgentReminder) {
232
236
  injectAgentReminder(options.sessionId, agentDef);
@@ -244,6 +248,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
244
248
  sessionManager: options.sessionManager,
245
249
  sessionId: options.sessionId,
246
250
  llmClient: agentLlmClient,
251
+ getLLMClient: resolveAgentClient,
247
252
  statsIdentity,
248
253
  providerManager: options.sessionManager.getProviderManager(),
249
254
  signal: options.signal,
@@ -256,7 +261,7 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
256
261
  instructionContent ?? "",
257
262
  skills,
258
263
  toolFingerprint,
259
- agentLlmClient.getModel()
264
+ resolveAgentClient().getModel()
260
265
  );
261
266
  if (cached.hash !== currentHash) {
262
267
  logger.debug("assembleRequest: hash mismatch", {
@@ -291,12 +296,12 @@ async function runAgentTurn(options, turnMetrics, agentId, append, callbacks) {
291
296
  });
292
297
  },
293
298
  getToolRegistry: () => getToolRegistryForAgent(agentDef, options.sessionId),
294
- getConversationMessages: buildGetConversationMessages(options.sessionId, agentLlmClient, append),
299
+ getConversationMessages: buildGetConversationMessages(options.sessionId, resolveAgentClient, append),
295
300
  injectAgentReminder: () => injectAgentReminder(options.sessionId, agentDef),
296
301
  ...options.initialCompacting ? { initialCompacting: true } : {},
297
302
  ...callbacks?.injectKickoff ? { injectKickoff: callbacks.injectKickoff } : {},
298
303
  ...callbacks?.onToolExecuted ? { onToolExecuted: callbacks.onToolExecuted } : {},
299
- ...options.suppressRecoverableErrors ? { suppressChatError: true } : {},
304
+ ...options.llmRetryPolicy ? { llmRetryPolicy: options.llmRetryPolicy } : {},
300
305
  ...options.warmup ? { warmup: true } : {}
301
306
  },
302
307
  turnMetrics
@@ -320,4 +325,4 @@ export {
320
325
  runChatTurn,
321
326
  runAgentTurn
322
327
  };
323
- //# sourceMappingURL=chunk-U4HMAYAD.js.map
328
+ //# sourceMappingURL=chunk-CX7UJZA5.js.map