openfox 1.6.44 → 1.6.45

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 (40) hide show
  1. package/dist/{auto-compaction-7SL3LN75.js → auto-compaction-2AI46SNC.js} +8 -8
  2. package/dist/{chat-handler-O2MS6N7K.js → chat-handler-ITVOWLJR.js} +12 -12
  3. package/dist/{chunk-P6GUT2QQ.js → chunk-4DNPYFL4.js} +3 -3
  4. package/dist/{chunk-Y6HBEACI.js → chunk-53DUI4MS.js} +1 -1
  5. package/dist/{chunk-BHSTSA7U.js → chunk-BF7JQWEL.js} +4 -4
  6. package/dist/{chunk-KSASIV4B.js → chunk-F2VWCCMC.js} +5 -5
  7. package/dist/{chunk-NBBX64KC.js → chunk-FBUTQPJ6.js} +5 -4
  8. package/dist/{chunk-LIMBYVO4.js → chunk-G6JKXYFE.js} +1 -58
  9. package/dist/{chunk-7F3V7C23.js → chunk-GY4TRYOG.js} +9 -7
  10. package/dist/{chunk-DZHZ3UUR.js → chunk-HSSXBW6N.js} +2 -14
  11. package/dist/{chunk-PYBB34ZK.js → chunk-HYIQFRYJ.js} +9 -6
  12. package/dist/{chunk-J6YKMO3O.js → chunk-KBEOYUA3.js} +6 -6
  13. package/dist/{chunk-57Q2NVVZ.js → chunk-RB576RLK.js} +70 -109
  14. package/dist/{chunk-IHBD5H7A.js → chunk-SMK6HIR5.js} +40 -21
  15. package/dist/{chunk-CJNQGEYG.js → chunk-VCALN543.js} +2 -2
  16. package/dist/{chunk-D4ZLSV6P.js → chunk-WNZIUQ2L.js} +8 -6
  17. package/dist/{chunk-YVQ6DP5Y.js → chunk-ZSQFDQPH.js} +5 -23
  18. package/dist/cli/dev.js +1 -1
  19. package/dist/cli/index.js +1 -1
  20. package/dist/{config-ACVEHBKG.js → config-3TU54V4X.js} +5 -5
  21. package/dist/{events-FHPSSSE4.js → events-DFDD4BRS.js} +3 -7
  22. package/dist/{folding-NEZWWL7K.js → folding-JSQFCDZO.js} +2 -4
  23. package/dist/{orchestrator-7TPFEM3P.js → orchestrator-7ZXXNEEC.js} +13 -9
  24. package/dist/package.json +1 -1
  25. package/dist/{processor-EFJ7OJEL.js → processor-6CITCUJR.js} +12 -11
  26. package/dist/{protocol-Ct6VfOIJ.d.ts → protocol-B4lesmg5.d.ts} +8 -15
  27. package/dist/{protocol-YNVBDNL7.js → protocol-IWXXOGWM.js} +3 -7
  28. package/dist/{provider-RLQMVV2Z.js → provider-J4G7XBDP.js} +7 -7
  29. package/dist/{serve-Z2THSAIR.js → serve-BCRWEL5U.js} +14 -14
  30. package/dist/server/index.d.ts +11 -11
  31. package/dist/server/index.js +12 -12
  32. package/dist/shared/index.d.ts +2 -2
  33. package/dist/shared/index.js +1 -1
  34. package/dist/{tools-A3NNFIKG.js → tools-K7TJWICQ.js} +8 -8
  35. package/dist/{vision-fallback-QJ26DCEF.js → vision-fallback-HXPTLQHN.js} +2 -2
  36. package/dist/web/assets/{index-BMZ3A90k.js → index-Bl-fM2P0.js} +65 -65
  37. package/dist/web/assets/{index-CM8X_jzI.css → index-DzPKzXc0.css} +1 -1
  38. package/dist/web/index.html +2 -2
  39. package/dist/web/sw.js +1 -1
  40. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeImageFromDataUrl
3
- } from "./chunk-CJNQGEYG.js";
3
+ } from "./chunk-VCALN543.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-PNBH3RAX.js";
@@ -382,8 +382,8 @@ function buildAttachmentContent(msgContent, attachments, modelSupportsVision) {
382
382
  }
383
383
  return content;
384
384
  }
385
- async function convertMessagesWithOptions(messages, profile, visionFallbackEnabled, signal, onVisionFallbackStart, onVisionFallbackDone) {
386
- const modelSupportsVision = profile.supportsVision ?? false;
385
+ async function convertMessagesWithOptions(messages, profile, visionFallbackEnabled, userVisionOverride, signal, onVisionFallbackStart, onVisionFallbackDone) {
386
+ const modelSupportsVision = userVisionOverride ?? profile.supportsVision ?? false;
387
387
  const options = {
388
388
  modelSupportsVision,
389
389
  visionFallbackEnabled,
@@ -576,10 +576,12 @@ function needsVisionFallback(messages, modelSupportsVision, visionFallbackEnable
576
576
  return result;
577
577
  }
578
578
  async function buildChatCompletionCreateParams(model, request, profile, capabilities, disableThinking, visionFallbackEnabled, isStreaming, onVisionFallbackStart, onVisionFallbackDone) {
579
+ const userVisionOverride = request.modelSettings?.supportsVision;
579
580
  const convertedMessages = await convertMessagesWithOptions(
580
581
  request.messages,
581
582
  profile,
582
583
  visionFallbackEnabled,
584
+ userVisionOverride,
583
585
  request.signal,
584
586
  onVisionFallbackStart,
585
587
  onVisionFallbackDone
@@ -591,7 +593,7 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
591
593
  const params = {
592
594
  model,
593
595
  messages: convertedMessages,
594
- ...request.tools ? { tools: convertTools(request.tools) } : {},
596
+ ...request.tools?.length ? { tools: convertTools(request.tools) } : {},
595
597
  ...request.toolChoice ? { tool_choice: request.toolChoice } : {},
596
598
  temperature,
597
599
  max_tokens: maxTokens,
@@ -603,7 +605,7 @@ async function buildChatCompletionCreateParams(model, request, profile, capabili
603
605
  ;
604
606
  params["top_k"] = topK;
605
607
  }
606
- const shouldDisableThinking = isStreaming ? disableThinking || request.disableThinking : disableThinking;
608
+ const shouldDisableThinking = disableThinking || request.disableThinking;
607
609
  if (capabilities.supportsChatTemplateKwargs && profile.supportsReasoning && shouldDisableThinking) {
608
610
  ;
609
611
  params["chat_template_kwargs"] = { enable_thinking: false };
@@ -771,4 +773,4 @@ export {
771
773
  extractThinking,
772
774
  streamWithSegments
773
775
  };
774
- //# sourceMappingURL=chunk-D4ZLSV6P.js.map
776
+ //# sourceMappingURL=chunk-WNZIUQ2L.js.map
@@ -6,7 +6,7 @@ import {
6
6
  foldSessionState,
7
7
  spreadOptionalMessageFields,
8
8
  stripPromptContextMessages
9
- } from "./chunk-LIMBYVO4.js";
9
+ } from "./chunk-G6JKXYFE.js";
10
10
  import {
11
11
  getDatabase
12
12
  } from "./chunk-BLNFJ22S.js";
@@ -320,7 +320,7 @@ var EventStore = class {
320
320
  * Clean up old events, keeping only:
321
321
  * - session.initialized event (seq 1)
322
322
  * - All snapshot events
323
- * - State-changing events (criteria.set, criterion.updated, mode.changed, phase.changed, context.state, etc.)
323
+ * - State-changing events (criteria.set, criterion.updated, phase.changed, context.state, etc.)
324
324
  * - Events after the latest snapshot (current window)
325
325
  *
326
326
  * This is the recommended cleanup method that preserves all snapshots and state.
@@ -339,7 +339,6 @@ var EventStore = class {
339
339
  AND event_type NOT IN (
340
340
  'criteria.set',
341
341
  'criterion.updated',
342
- 'mode.changed',
343
342
  'phase.changed',
344
343
  'todo.updated',
345
344
  'context.state'
@@ -545,14 +544,13 @@ function createSession(projectId, workdir, title, providerId, providerModel) {
545
544
  const now = (/* @__PURE__ */ new Date()).toISOString();
546
545
  const id = crypto.randomUUID();
547
546
  db.prepare(`
548
- INSERT INTO sessions (id, project_id, workdir, phase, mode, workflow_phase, is_running, created_at, updated_at, title, provider_id, provider_model, danger_level)
549
- VALUES (?, ?, ?, 'idle', 'planner', 'plan', 0, ?, ?, ?, ?, ?, 'normal')
547
+ INSERT INTO sessions (id, project_id, workdir, phase, workflow_phase, is_running, created_at, updated_at, title, provider_id, provider_model, danger_level)
548
+ VALUES (?, ?, ?, 'idle', 'plan', 0, ?, ?, ?, ?, ?, 'normal')
550
549
  `).run(id, projectId, workdir, now, now, title ?? null, providerId ?? null, providerModel ?? null);
551
550
  return {
552
551
  id,
553
552
  projectId,
554
553
  workdir,
555
- mode: "planner",
556
554
  phase: "plan",
557
555
  isRunning: false,
558
556
  summary: null,
@@ -585,7 +583,6 @@ function getSession(id) {
585
583
  id: row.id,
586
584
  projectId: row.project_id,
587
585
  workdir: row.workdir,
588
- mode: row.mode ?? "planner",
589
586
  phase: row.workflow_phase ?? "plan",
590
587
  isRunning: Boolean(row.is_running),
591
588
  summary: row.summary ?? null,
@@ -677,7 +674,6 @@ function listSessions() {
677
674
  s.id,
678
675
  s.project_id,
679
676
  s.workdir,
680
- s.mode,
681
677
  s.workflow_phase,
682
678
  s.is_running,
683
679
  s.created_at,
@@ -698,7 +694,6 @@ function listSessionsByProject(projectId, limit = 20, offset = 0) {
698
694
  s.id,
699
695
  s.project_id,
700
696
  s.workdir,
701
- s.mode,
702
697
  s.workflow_phase,
703
698
  s.is_running,
704
699
  s.created_at,
@@ -726,7 +721,6 @@ function mapSessionSummaryRow(row) {
726
721
  projectId: row.project_id,
727
722
  ...row.title ? { title: row.title } : {},
728
723
  workdir: row.workdir,
729
- mode: row.mode ?? "planner",
730
724
  phase: row.workflow_phase ?? "plan",
731
725
  isRunning: Boolean(row.is_running),
732
726
  providerId: row.provider_id ?? null,
@@ -918,17 +912,6 @@ function emitToolResult(sessionId, messageId, toolCallId, result) {
918
912
  data: { messageId, toolCallId, result }
919
913
  });
920
914
  }
921
- function emitModeChanged(sessionId, mode, auto, reason) {
922
- const eventStore = getEventStore();
923
- eventStore.append(sessionId, {
924
- type: "mode.changed",
925
- data: {
926
- mode,
927
- auto,
928
- ...reason !== void 0 && { reason }
929
- }
930
- });
931
- }
932
915
  function emitPhaseChanged(sessionId, phase) {
933
916
  const eventStore = getEventStore();
934
917
  eventStore.append(sessionId, {
@@ -1142,7 +1125,6 @@ export {
1142
1125
  emitToolCall,
1143
1126
  emitToolOutput,
1144
1127
  emitToolResult,
1145
- emitModeChanged,
1146
1128
  emitPhaseChanged,
1147
1129
  emitRunningChanged,
1148
1130
  emitCriteriaSet,
@@ -1158,4 +1140,4 @@ export {
1158
1140
  compactContext,
1159
1141
  getRecentUserPromptsForSession
1160
1142
  };
1161
- //# sourceMappingURL=chunk-YVQ6DP5Y.js.map
1143
+ //# sourceMappingURL=chunk-ZSQFDQPH.js.map
package/dist/cli/dev.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-J6YKMO3O.js";
4
+ } from "../chunk-KBEOYUA3.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCli
4
- } from "../chunk-J6YKMO3O.js";
4
+ } from "../chunk-KBEOYUA3.js";
5
5
  import {
6
6
  logger
7
7
  } from "../chunk-PNBH3RAX.js";
@@ -13,11 +13,11 @@ import {
13
13
  saveGlobalConfig,
14
14
  setDefaultModelSelection,
15
15
  trySmartDefaults
16
- } from "./chunk-P6GUT2QQ.js";
17
- import "./chunk-KSASIV4B.js";
18
- import "./chunk-D4ZLSV6P.js";
16
+ } from "./chunk-4DNPYFL4.js";
17
+ import "./chunk-F2VWCCMC.js";
18
+ import "./chunk-WNZIUQ2L.js";
19
19
  import "./chunk-R4HADRYO.js";
20
- import "./chunk-CJNQGEYG.js";
20
+ import "./chunk-VCALN543.js";
21
21
  import "./chunk-PNBH3RAX.js";
22
22
  export {
23
23
  activateProvider,
@@ -35,4 +35,4 @@ export {
35
35
  setDefaultModelSelection,
36
36
  trySmartDefaults
37
37
  };
38
- //# sourceMappingURL=config-ACVEHBKG.js.map
38
+ //# sourceMappingURL=config-3TU54V4X.js.map
@@ -14,7 +14,6 @@ import {
14
14
  emitMessageDelta,
15
15
  emitMessageDone,
16
16
  emitMessageThinking,
17
- emitModeChanged,
18
17
  emitPhaseChanged,
19
18
  emitRunningChanged,
20
19
  emitSessionInitialized,
@@ -36,7 +35,7 @@ import {
36
35
  isFileInCache,
37
36
  isStoredEvent,
38
37
  isTurnEvent
39
- } from "./chunk-YVQ6DP5Y.js";
38
+ } from "./chunk-ZSQFDQPH.js";
40
39
  import {
41
40
  buildContextMessagesFromEventHistory,
42
41
  buildContextMessagesFromMessages,
@@ -47,13 +46,12 @@ import {
47
46
  foldContextState,
48
47
  foldCriteria,
49
48
  foldIsRunning,
50
- foldMode,
51
49
  foldPhase,
52
50
  foldSessionState,
53
51
  foldTodos,
54
52
  foldTurnEventsToSnapshotMessages,
55
53
  getMessagesForWindow
56
- } from "./chunk-LIMBYVO4.js";
54
+ } from "./chunk-G6JKXYFE.js";
57
55
  import "./chunk-BLNFJ22S.js";
58
56
  import "./chunk-TVQOONDR.js";
59
57
  import "./chunk-PNBH3RAX.js";
@@ -79,7 +77,6 @@ export {
79
77
  emitMessageDelta,
80
78
  emitMessageDone,
81
79
  emitMessageThinking,
82
- emitModeChanged,
83
80
  emitPhaseChanged,
84
81
  emitRunningChanged,
85
82
  emitSessionInitialized,
@@ -93,7 +90,6 @@ export {
93
90
  foldContextState,
94
91
  foldCriteria,
95
92
  foldIsRunning,
96
- foldMode,
97
93
  foldPhase,
98
94
  foldSessionState,
99
95
  foldTodos,
@@ -111,4 +107,4 @@ export {
111
107
  isStoredEvent,
112
108
  isTurnEvent
113
109
  };
114
- //# sourceMappingURL=events-FHPSSSE4.js.map
110
+ //# sourceMappingURL=events-DFDD4BRS.js.map
@@ -8,7 +8,6 @@ import {
8
8
  foldContextState,
9
9
  foldCriteria,
10
10
  foldIsRunning,
11
- foldMode,
12
11
  foldPendingConfirmations,
13
12
  foldPhase,
14
13
  foldSessionState,
@@ -17,7 +16,7 @@ import {
17
16
  foldTurnEventsToSnapshotMessagesFromInitial,
18
17
  getMessagesForWindow,
19
18
  spreadOptionalMessageFields
20
- } from "./chunk-LIMBYVO4.js";
19
+ } from "./chunk-G6JKXYFE.js";
21
20
  export {
22
21
  buildContextMessagesFromEventHistory,
23
22
  buildContextMessagesFromMessages,
@@ -28,7 +27,6 @@ export {
28
27
  foldContextState,
29
28
  foldCriteria,
30
29
  foldIsRunning,
31
- foldMode,
32
30
  foldPendingConfirmations,
33
31
  foldPhase,
34
32
  foldSessionState,
@@ -38,4 +36,4 @@ export {
38
36
  getMessagesForWindow,
39
37
  spreadOptionalMessageFields
40
38
  };
41
- //# sourceMappingURL=folding-NEZWWL7K.js.map
39
+ //# sourceMappingURL=folding-JSQFCDZO.js.map
@@ -1,9 +1,11 @@
1
1
  import {
2
2
  filterToolRegistryForStepDone,
3
+ hasReminderInCurrentWindow,
4
+ injectModeReminderIfNeeded,
3
5
  runBuilderTurn,
4
6
  runChatTurn,
5
7
  runVerifierTurn
6
- } from "./chunk-IHBD5H7A.js";
8
+ } from "./chunk-SMK6HIR5.js";
7
9
  import {
8
10
  TurnMetrics,
9
11
  createChatDoneEvent,
@@ -11,21 +13,21 @@ import {
11
13
  createMessageStartEvent,
12
14
  createToolCallEvent,
13
15
  createToolResultEvent
14
- } from "./chunk-7F3V7C23.js";
16
+ } from "./chunk-GY4TRYOG.js";
15
17
  import "./chunk-NBU6KIOD.js";
16
18
  import "./chunk-574HZVLE.js";
17
19
  import "./chunk-7JPKRM6M.js";
18
- import "./chunk-D4ZLSV6P.js";
19
- import "./chunk-YVQ6DP5Y.js";
20
- import "./chunk-LIMBYVO4.js";
21
- import "./chunk-DZHZ3UUR.js";
20
+ import "./chunk-WNZIUQ2L.js";
21
+ import "./chunk-ZSQFDQPH.js";
22
+ import "./chunk-G6JKXYFE.js";
23
+ import "./chunk-HSSXBW6N.js";
22
24
  import "./chunk-22CTURMH.js";
23
25
  import "./chunk-GQZGIMJO.js";
24
26
  import "./chunk-BLNFJ22S.js";
25
- import "./chunk-Y6HBEACI.js";
27
+ import "./chunk-53DUI4MS.js";
26
28
  import "./chunk-R4HADRYO.js";
27
29
  import "./chunk-TVQOONDR.js";
28
- import "./chunk-CJNQGEYG.js";
30
+ import "./chunk-VCALN543.js";
29
31
  import "./chunk-PNBH3RAX.js";
30
32
  export {
31
33
  TurnMetrics,
@@ -35,8 +37,10 @@ export {
35
37
  createToolCallEvent,
36
38
  createToolResultEvent,
37
39
  filterToolRegistryForStepDone,
40
+ hasReminderInCurrentWindow,
41
+ injectModeReminderIfNeeded,
38
42
  runBuilderTurn,
39
43
  runChatTurn,
40
44
  runVerifierTurn
41
45
  };
42
- //# sourceMappingURL=orchestrator-7TPFEM3P.js.map
46
+ //# sourceMappingURL=orchestrator-7ZXXNEEC.js.map
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openfox",
3
- "version": "1.6.44",
3
+ "version": "1.6.45",
4
4
  "description": "Local-LLM-first agentic coding assistant",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,22 +2,22 @@ import {
2
2
  buildRunChatTurnParams,
3
3
  finalizeTurnCompletion,
4
4
  getSessionMessageCount
5
- } from "./chunk-NBBX64KC.js";
5
+ } from "./chunk-FBUTQPJ6.js";
6
6
  import {
7
7
  applyGeneratedSessionName,
8
8
  generateSessionName,
9
9
  needsNameGenerationCheck
10
- } from "./chunk-BHSTSA7U.js";
10
+ } from "./chunk-BF7JQWEL.js";
11
11
  import {
12
12
  getEventStore
13
- } from "./chunk-YVQ6DP5Y.js";
14
- import "./chunk-LIMBYVO4.js";
13
+ } from "./chunk-ZSQFDQPH.js";
14
+ import "./chunk-G6JKXYFE.js";
15
15
  import {
16
16
  createChatMessageMessage,
17
17
  createSessionRunningMessage
18
- } from "./chunk-DZHZ3UUR.js";
18
+ } from "./chunk-HSSXBW6N.js";
19
19
  import "./chunk-BLNFJ22S.js";
20
- import "./chunk-Y6HBEACI.js";
20
+ import "./chunk-53DUI4MS.js";
21
21
  import "./chunk-TVQOONDR.js";
22
22
  import {
23
23
  logger
@@ -145,9 +145,9 @@ var QueueProcessor = class {
145
145
  });
146
146
  }
147
147
  }
148
- this.runTurn(sessionId, controller);
148
+ this.runTurn(sessionId, controller, nextAsap?.agentId);
149
149
  }
150
- async runTurn(sessionId, controller) {
150
+ async runTurn(sessionId, controller, agentId) {
151
151
  const { sessionManager, getLLMClient, getActiveProvider, broadcastForSession, providerManager } = this.deps;
152
152
  const session = sessionManager.getSession(sessionId);
153
153
  if (session?.providerId && session.providerModel) {
@@ -175,14 +175,15 @@ var QueueProcessor = class {
175
175
  backend: provider?.backend ?? llmClient.getBackend(),
176
176
  model: llmClient.getModel()
177
177
  };
178
- const { runChatTurn } = await import("./orchestrator-7TPFEM3P.js");
178
+ const { runChatTurn } = await import("./orchestrator-7ZXXNEEC.js");
179
179
  const runChatTurnParams = buildRunChatTurnParams({
180
180
  sessionManager,
181
181
  sessionId,
182
182
  llmClient,
183
183
  statsIdentity,
184
184
  signal: controller.signal,
185
- onMessage: (msg) => broadcastForSession(sessionId, msg)
185
+ onMessage: (msg) => broadcastForSession(sessionId, msg),
186
+ ...agentId ? { agentId } : {}
186
187
  });
187
188
  runChatTurn(runChatTurnParams).catch((error) => {
188
189
  if (error instanceof Error && error.message === "Aborted") {
@@ -208,4 +209,4 @@ var QueueProcessor = class {
208
209
  export {
209
210
  QueueProcessor
210
211
  };
211
- //# sourceMappingURL=processor-EFJ7OJEL.js.map
212
+ //# sourceMappingURL=processor-6CITCUJR.js.map
@@ -6,7 +6,6 @@ interface Project {
6
6
  createdAt: string;
7
7
  updatedAt: string;
8
8
  }
9
- type SessionMode = string;
10
9
  type ToolMode = string;
11
10
  type SessionPhase = 'plan' | 'build' | 'verification' | 'blocked' | 'done';
12
11
  type DangerLevel = 'normal' | 'dangerous';
@@ -14,7 +13,6 @@ interface Session {
14
13
  id: string;
15
14
  projectId: string;
16
15
  workdir: string;
17
- mode: SessionMode;
18
16
  phase: SessionPhase;
19
17
  isRunning: boolean;
20
18
  summary: string | null;
@@ -55,7 +53,6 @@ interface SessionSummary {
55
53
  projectId: string;
56
54
  title?: string;
57
55
  workdir: string;
58
- mode: SessionMode;
59
56
  phase: SessionPhase;
60
57
  isRunning: boolean;
61
58
  providerId?: string | null;
@@ -369,7 +366,6 @@ interface ExecutionState {
369
366
  compactionCount: number;
370
367
  startedAt: string;
371
368
  lastActivityAt: string;
372
- lastModeWithReminder?: string;
373
369
  }
374
370
  interface ContextState {
375
371
  currentTokens: number;
@@ -418,6 +414,7 @@ interface ModelConfig {
418
414
  topP?: number;
419
415
  topK?: number;
420
416
  maxTokens?: number;
417
+ supportsVision?: boolean;
421
418
  }
422
419
  /** LLM provider configuration */
423
420
  interface Provider {
@@ -478,7 +475,7 @@ interface Config {
478
475
  activeWorkflowId?: string | undefined;
479
476
  }
480
477
 
481
- type ClientMessageType = 'session.load' | 'chat.send' | 'chat.stop' | 'chat.continue' | 'mode.switch' | 'mode.accept' | 'criteria.edit' | 'context.compact' | 'runner.launch' | 'path.confirm' | 'ask.answer' | 'queue.asap' | 'queue.completion' | 'queue.cancel';
478
+ type ClientMessageType = 'session.load' | 'chat.send' | 'chat.stop' | 'chat.continue' | 'mode.accept' | 'criteria.edit' | 'context.compact' | 'runner.launch' | 'path.confirm' | 'ask.answer' | 'queue.asap' | 'queue.completion' | 'queue.cancel';
482
479
  interface ClientMessage<T = unknown> {
483
480
  id: string;
484
481
  type: ClientMessageType;
@@ -493,9 +490,7 @@ interface ChatSendPayload {
493
490
  attachments?: Attachment[];
494
491
  messageKind?: 'command';
495
492
  isSystemGenerated?: boolean;
496
- }
497
- interface ModeSwitchPayload {
498
- mode: SessionMode;
493
+ agentId?: string;
499
494
  }
500
495
  interface CriteriaEditPayload {
501
496
  criteria: Criterion[];
@@ -503,10 +498,12 @@ interface CriteriaEditPayload {
503
498
  interface QueueAsapPayload {
504
499
  content: string;
505
500
  attachments?: Attachment[];
501
+ agentId?: string;
506
502
  }
507
503
  interface QueueCompletionPayload {
508
504
  content: string;
509
505
  attachments?: Attachment[];
506
+ agentId?: string;
510
507
  }
511
508
  interface QueueCancelPayload {
512
509
  queueId: string;
@@ -522,8 +519,9 @@ interface QueuedMessage {
522
519
  attachments?: Attachment[];
523
520
  queuedAt: string;
524
521
  messageKind?: string;
522
+ agentId?: string;
525
523
  }
526
- type ServerMessageType = 'project.state' | 'project.list' | 'project.deleted' | 'session.state' | 'session.list' | 'session.deleted' | 'session.deletedAll' | 'session.running' | 'session.name_generated' | 'chat.delta' | 'chat.thinking' | 'chat.tool_preparing' | 'chat.tool_call' | 'chat.tool_output' | 'chat.tool_result' | 'chat.todo' | 'chat.summary' | 'chat.progress' | 'chat.format_retry' | 'chat.message' | 'chat.message_updated' | 'chat.done' | 'chat.vision_fallback' | 'chat.error' | 'chat.path_confirmation' | 'chat.ask_user' | 'mode.changed' | 'phase.changed' | 'task.completed' | 'criteria.updated' | 'context.state' | 'settings.value' | 'provider.changed' | 'queue.state' | 'devServer.output' | 'devServer.state' | 'backgroundProcess.started' | 'backgroundProcess.output' | 'backgroundProcess.exited' | 'backgroundProcess.removed' | 'lsp.diagnostics' | 'error' | 'ack';
524
+ type ServerMessageType = 'project.state' | 'project.list' | 'project.deleted' | 'session.state' | 'session.list' | 'session.deleted' | 'session.deletedAll' | 'session.running' | 'session.name_generated' | 'chat.delta' | 'chat.thinking' | 'chat.tool_preparing' | 'chat.tool_call' | 'chat.tool_output' | 'chat.tool_result' | 'chat.todo' | 'chat.summary' | 'chat.progress' | 'chat.format_retry' | 'chat.message' | 'chat.message_updated' | 'chat.done' | 'chat.vision_fallback' | 'chat.error' | 'chat.path_confirmation' | 'chat.ask_user' | 'phase.changed' | 'task.completed' | 'criteria.updated' | 'context.state' | 'settings.value' | 'provider.changed' | 'queue.state' | 'devServer.output' | 'devServer.state' | 'backgroundProcess.started' | 'backgroundProcess.output' | 'backgroundProcess.exited' | 'backgroundProcess.removed' | 'lsp.diagnostics' | 'error' | 'ack';
527
525
  interface ServerMessage<T = unknown> {
528
526
  id?: string;
529
527
  type: ServerMessageType;
@@ -656,11 +654,6 @@ interface ChatAskUserPayload {
656
654
  callId: string;
657
655
  question: string;
658
656
  }
659
- interface ModeChangedPayload {
660
- mode: SessionMode;
661
- auto: boolean;
662
- reason?: string;
663
- }
664
657
  interface PhaseChangedPayload {
665
658
  phase: SessionPhase;
666
659
  }
@@ -844,4 +837,4 @@ interface QueueCancelledEvent {
844
837
  }
845
838
  type QueueEvent = QueueAddedEvent | QueueDrainedEvent | QueueCancelledEvent;
846
839
 
847
- export { type FileReadEntry as $, type AgentEvent as A, type BackgroundProcess as B, type CallStatsDataPoint as C, type ClientMessage as D, type ClientMessageType as E, type Config as F, type ContextCompactionEvent as G, type ContextState as H, type ContextStatePayload as I, type ContextWindow as J, type CriteriaEditPayload as K, type CriteriaUpdatedPayload as L, type Message as M, type Criterion as N, type CriterionAttempt as O, type CriterionStatus as P, type CriterionValidation as Q, type DangerLevel as R, type SessionStats as S, type DevServerOutputPayload as T, type DevServerStatePayload as U, type Diagnostic as V, type EditContextEdit as W, type EditContextLine as X, type EditContextRegion as Y, type ErrorPayload as Z, type ExecutionState as _, type AskAnswerPayload as a, isServerMessage as a$, type InjectedFile as a0, type LLMCallStats as a1, type LlmBackend as a2, type LogLine as a3, type LspDiagnosticsPayload as a4, type MessageRole as a5, type MessageSegment as a6, type MessageStats as a7, type ModeChangedPayload as a8, type ModeSwitchPayload as a9, type QueueStatePayload as aA, type QueuedMessage as aB, type RecentUserPrompt as aC, type ServerMessage as aD, type ServerMessageType as aE, type Session as aF, type SessionListPayload as aG, type SessionLoadPayload as aH, type SessionMetadata as aI, type SessionMode as aJ, type SessionNameGeneratedPayload as aK, type SessionPhase as aL, type SessionRunningPayload as aM, type SessionStatePayload as aN, type SessionSummary as aO, type StatsDataPoint as aP, type StatsIdentity as aQ, type TaskCompletedPayload as aR, type Todo as aS, type ToolCall as aT, type ToolMode as aU, type ToolName as aV, type ToolResult as aW, type ValidationResult as aX, createClientMessage as aY, createServerMessage as aZ, isClientMessage as a_, type ModelConfig as aa, type ModelSessionStats as ab, type PathConfirmPayload as ac, type PathConfirmationReason as ad, type PendingPathConfirmationPayload as ae, type PhaseChangedPayload as af, type PreparingToolCall as ag, type Project as ah, type ProjectDeletedPayload as ai, type ProjectListPayload as aj, type ProjectStatePayload as ak, type PromptContext as al, type PromptContextMessage as am, type PromptContextTool as an, type PromptRequestOptions as ao, type Provider as ap, type ProviderBackend as aq, type ProviderChangedPayload as ar, type QueueAddedEvent as as, type QueueAsapPayload as at, type QueueCancelPayload as au, type QueueCancelledEvent as av, type QueueCompletionPayload as aw, type QueueDrainedEvent as ax, type QueueEvent as ay, type QueueEventType as az, type AskUserEvent as b, type Attachment as c, type BackgroundProcessExitedPayload as d, type BackgroundProcessOutputPayload as e, type BackgroundProcessRemovedPayload as f, type BackgroundProcessStartedPayload as g, type BackgroundProcessStatus as h, type ChatAskUserPayload as i, type ChatDeltaPayload as j, type ChatDonePayload as k, type ChatErrorPayload as l, type ChatFormatRetryPayload as m, type ChatMessagePayload as n, type ChatMessageUpdatedPayload as o, type ChatPathConfirmationPayload as p, type ChatProgressPayload as q, type ChatSendPayload as r, type ChatSummaryPayload as s, type ChatThinkingPayload as t, type ChatTodoPayload as u, type ChatToolCallPayload as v, type ChatToolOutputPayload as w, type ChatToolPreparingPayload as x, type ChatToolResultPayload as y, type ChatVisionFallbackPayload as z };
840
+ export { type FileReadEntry as $, type AgentEvent as A, type BackgroundProcess as B, type CallStatsDataPoint as C, type ClientMessage as D, type ClientMessageType as E, type Config as F, type ContextCompactionEvent as G, type ContextState as H, type ContextStatePayload as I, type ContextWindow as J, type CriteriaEditPayload as K, type CriteriaUpdatedPayload as L, type Message as M, type Criterion as N, type CriterionAttempt as O, type CriterionStatus as P, type CriterionValidation as Q, type DangerLevel as R, type SessionStats as S, type DevServerOutputPayload as T, type DevServerStatePayload as U, type Diagnostic as V, type EditContextEdit as W, type EditContextLine as X, type EditContextRegion as Y, type ErrorPayload as Z, type ExecutionState as _, type AskAnswerPayload as a, type InjectedFile as a0, type LLMCallStats as a1, type LlmBackend as a2, type LogLine as a3, type LspDiagnosticsPayload as a4, type MessageRole as a5, type MessageSegment as a6, type MessageStats as a7, type ModelConfig as a8, type ModelSessionStats as a9, type RecentUserPrompt as aA, type ServerMessage as aB, type ServerMessageType as aC, type Session as aD, type SessionListPayload as aE, type SessionLoadPayload as aF, type SessionMetadata as aG, type SessionNameGeneratedPayload as aH, type SessionPhase as aI, type SessionRunningPayload as aJ, type SessionStatePayload as aK, type SessionSummary as aL, type StatsDataPoint as aM, type StatsIdentity as aN, type TaskCompletedPayload as aO, type Todo as aP, type ToolCall as aQ, type ToolMode as aR, type ToolName as aS, type ToolResult as aT, type ValidationResult as aU, createClientMessage as aV, createServerMessage as aW, isClientMessage as aX, isServerMessage as aY, type PathConfirmPayload as aa, type PathConfirmationReason as ab, type PendingPathConfirmationPayload as ac, type PhaseChangedPayload as ad, type PreparingToolCall as ae, type Project as af, type ProjectDeletedPayload as ag, type ProjectListPayload as ah, type ProjectStatePayload as ai, type PromptContext as aj, type PromptContextMessage as ak, type PromptContextTool as al, type PromptRequestOptions as am, type Provider as an, type ProviderBackend as ao, type ProviderChangedPayload as ap, type QueueAddedEvent as aq, type QueueAsapPayload as ar, type QueueCancelPayload as as, type QueueCancelledEvent as at, type QueueCompletionPayload as au, type QueueDrainedEvent as av, type QueueEvent as aw, type QueueEventType as ax, type QueueStatePayload as ay, type QueuedMessage as az, type AskUserEvent as b, type Attachment as c, type BackgroundProcessExitedPayload as d, type BackgroundProcessOutputPayload as e, type BackgroundProcessRemovedPayload as f, type BackgroundProcessStartedPayload as g, type BackgroundProcessStatus as h, type ChatAskUserPayload as i, type ChatDeltaPayload as j, type ChatDonePayload as k, type ChatErrorPayload as l, type ChatFormatRetryPayload as m, type ChatMessagePayload as n, type ChatMessageUpdatedPayload as o, type ChatPathConfirmationPayload as p, type ChatProgressPayload as q, type ChatSendPayload as r, type ChatSummaryPayload as s, type ChatThinkingPayload as t, type ChatTodoPayload as u, type ChatToolCallPayload as v, type ChatToolOutputPayload as w, type ChatToolPreparingPayload as x, type ChatToolResultPayload as y, type ChatVisionFallbackPayload as z };
@@ -19,7 +19,6 @@ import {
19
19
  createContextStateMessage,
20
20
  createCriteriaUpdatedMessage,
21
21
  createErrorMessage,
22
- createModeChangedMessage,
23
22
  createPhaseChangedMessage,
24
23
  createProjectListMessage,
25
24
  createProjectStateMessage,
@@ -31,7 +30,6 @@ import {
31
30
  isAskAnswerPayload,
32
31
  isChatSendPayload,
33
32
  isCriteriaEditPayload,
34
- isModeSwitchPayload,
35
33
  isPathConfirmPayload,
36
34
  isQueueAsapPayload,
37
35
  isQueueCancelPayload,
@@ -40,8 +38,8 @@ import {
40
38
  parseClientMessage,
41
39
  serializeServerMessage,
42
40
  storedEventToServerMessage
43
- } from "./chunk-DZHZ3UUR.js";
44
- import "./chunk-Y6HBEACI.js";
41
+ } from "./chunk-HSSXBW6N.js";
42
+ import "./chunk-53DUI4MS.js";
45
43
  export {
46
44
  createChatAskUserMessage,
47
45
  createChatDeltaMessage,
@@ -63,7 +61,6 @@ export {
63
61
  createContextStateMessage,
64
62
  createCriteriaUpdatedMessage,
65
63
  createErrorMessage,
66
- createModeChangedMessage,
67
64
  createPhaseChangedMessage,
68
65
  createProjectListMessage,
69
66
  createProjectStateMessage,
@@ -75,7 +72,6 @@ export {
75
72
  isAskAnswerPayload,
76
73
  isChatSendPayload,
77
74
  isCriteriaEditPayload,
78
- isModeSwitchPayload,
79
75
  isPathConfirmPayload,
80
76
  isQueueAsapPayload,
81
77
  isQueueCancelPayload,
@@ -85,4 +81,4 @@ export {
85
81
  serializeServerMessage,
86
82
  storedEventToServerMessage
87
83
  };
88
- //# sourceMappingURL=protocol-YNVBDNL7.js.map
84
+ //# sourceMappingURL=protocol-IWXXOGWM.js.map
@@ -5,18 +5,18 @@ import {
5
5
  loadGlobalConfig,
6
6
  removeProvider,
7
7
  saveGlobalConfig
8
- } from "./chunk-P6GUT2QQ.js";
8
+ } from "./chunk-4DNPYFL4.js";
9
9
  import {
10
10
  fetchAvailableModelsFromBackend
11
- } from "./chunk-PYBB34ZK.js";
11
+ } from "./chunk-HYIQFRYJ.js";
12
12
  import {
13
13
  detectModel
14
- } from "./chunk-KSASIV4B.js";
14
+ } from "./chunk-F2VWCCMC.js";
15
15
  import {
16
16
  detectBackend
17
- } from "./chunk-D4ZLSV6P.js";
17
+ } from "./chunk-WNZIUQ2L.js";
18
18
  import "./chunk-R4HADRYO.js";
19
- import "./chunk-CJNQGEYG.js";
19
+ import "./chunk-VCALN543.js";
20
20
  import "./chunk-PNBH3RAX.js";
21
21
 
22
22
  // src/cli/provider.ts
@@ -249,7 +249,7 @@ async function runProviderAdd(mode) {
249
249
  isActive: makeActive
250
250
  });
251
251
  if (makeActive) {
252
- const { setDefaultModelSelection } = await import("./config-ACVEHBKG.js");
252
+ const { setDefaultModelSelection } = await import("./config-3TU54V4X.js");
253
253
  newConfig = setDefaultModelSelection(newConfig, newConfig.providers[newConfig.providers.length - 1].id, selectedModel);
254
254
  }
255
255
  await saveGlobalConfig(mode, newConfig);
@@ -373,4 +373,4 @@ export {
373
373
  runProviderRemove,
374
374
  runProviderUse
375
375
  };
376
- //# sourceMappingURL=provider-RLQMVV2Z.js.map
376
+ //# sourceMappingURL=provider-J4G7XBDP.js.map
@@ -2,28 +2,28 @@ import {
2
2
  getActiveProvider,
3
3
  getDefaultModel,
4
4
  loadGlobalConfig
5
- } from "./chunk-P6GUT2QQ.js";
5
+ } from "./chunk-4DNPYFL4.js";
6
6
  import {
7
7
  VERSION,
8
8
  createServer
9
- } from "./chunk-57Q2NVVZ.js";
10
- import "./chunk-BHSTSA7U.js";
11
- import "./chunk-IHBD5H7A.js";
12
- import "./chunk-7F3V7C23.js";
9
+ } from "./chunk-RB576RLK.js";
10
+ import "./chunk-BF7JQWEL.js";
11
+ import "./chunk-SMK6HIR5.js";
12
+ import "./chunk-GY4TRYOG.js";
13
13
  import "./chunk-NBU6KIOD.js";
14
14
  import "./chunk-574HZVLE.js";
15
15
  import "./chunk-7JPKRM6M.js";
16
- import "./chunk-PYBB34ZK.js";
17
- import "./chunk-KSASIV4B.js";
18
- import "./chunk-D4ZLSV6P.js";
19
- import "./chunk-YVQ6DP5Y.js";
20
- import "./chunk-LIMBYVO4.js";
21
- import "./chunk-DZHZ3UUR.js";
16
+ import "./chunk-HYIQFRYJ.js";
17
+ import "./chunk-F2VWCCMC.js";
18
+ import "./chunk-WNZIUQ2L.js";
19
+ import "./chunk-ZSQFDQPH.js";
20
+ import "./chunk-G6JKXYFE.js";
21
+ import "./chunk-HSSXBW6N.js";
22
22
  import "./chunk-22CTURMH.js";
23
23
  import "./chunk-GQZGIMJO.js";
24
24
  import "./chunk-BLNFJ22S.js";
25
25
  import "./chunk-B7E3BICY.js";
26
- import "./chunk-Y6HBEACI.js";
26
+ import "./chunk-53DUI4MS.js";
27
27
  import {
28
28
  ensureDataDirExists,
29
29
  getDatabasePath,
@@ -32,7 +32,7 @@ import {
32
32
  import {
33
33
  loadConfig
34
34
  } from "./chunk-TVQOONDR.js";
35
- import "./chunk-CJNQGEYG.js";
35
+ import "./chunk-VCALN543.js";
36
36
  import {
37
37
  logger
38
38
  } from "./chunk-PNBH3RAX.js";
@@ -188,4 +188,4 @@ async function runServe(options) {
188
188
  export {
189
189
  runServe
190
190
  };
191
- //# sourceMappingURL=serve-Z2THSAIR.js.map
191
+ //# sourceMappingURL=serve-BCRWEL5U.js.map