@causyne/agent 1.20.124 → 1.20.127

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 (235) hide show
  1. package/bin/causyne.js +1 -1
  2. package/package.json +4 -4
  3. package/src/acp/protocol.ts +19 -1
  4. package/src/acp/server.js +282 -8
  5. package/src/acp/server.ts +284 -8
  6. package/src/agent/abortableDelay.js +2 -2
  7. package/src/agent/abortableDelay.ts +2 -2
  8. package/src/agent/errorClassifier.js +9 -1
  9. package/src/agent/errorClassifier.ts +8 -1
  10. package/src/agentLoop.js +83 -27
  11. package/src/agentLoop.ts +92 -26
  12. package/src/approvalPolicy.js +34 -10
  13. package/src/approvalPolicy.ts +42 -11
  14. package/src/browser/causyneBrowser.js +30 -3
  15. package/src/browser/causyneBrowser.ts +33 -3
  16. package/src/browser/urlPolicy.js +14 -1
  17. package/src/browser/urlPolicy.ts +12 -1
  18. package/src/cliMode.js +21 -9
  19. package/src/cliMode.ts +20 -8
  20. package/src/commands.js +188 -32
  21. package/src/commands.ts +209 -32
  22. package/src/config.js +19 -4
  23. package/src/config.ts +18 -4
  24. package/src/core/contextCompactor.js +54 -7
  25. package/src/core/contextCompactor.ts +63 -7
  26. package/src/core/goalLoop.js +257 -0
  27. package/src/core/goalLoop.ts +310 -0
  28. package/src/entrypoint.js +135 -3
  29. package/src/entrypoint.ts +136 -3
  30. package/src/game/causyneCoreBridge.js +686 -0
  31. package/src/game/causyneCoreBridge.ts +702 -0
  32. package/src/game/gameLauncher.js +287 -0
  33. package/src/game/gameLauncher.ts +352 -0
  34. package/src/game/gameProvisioner.js +425 -0
  35. package/src/game/gameProvisioner.ts +488 -0
  36. package/src/headlessCli.js +19 -12
  37. package/src/headlessCli.ts +22 -8
  38. package/src/infra/atomicWriter.js +40 -4
  39. package/src/infra/atomicWriter.ts +36 -4
  40. package/src/launchIntent.js +73 -3
  41. package/src/launchIntent.ts +76 -3
  42. package/src/lsp/lspClient.js +83 -12
  43. package/src/lsp/lspClient.ts +75 -12
  44. package/src/mcp/mcpRegistry.js +75 -8
  45. package/src/mcp/mcpRegistry.ts +70 -7
  46. package/src/memory/contextBudget.js +2 -0
  47. package/src/memory/contextBudget.ts +1 -0
  48. package/src/modelVariants.js +45 -0
  49. package/src/modelVariants.ts +54 -0
  50. package/src/outputRecovery.js +3 -2
  51. package/src/outputRecovery.ts +4 -2
  52. package/src/permissionPresets.js +327 -0
  53. package/src/permissionPresets.ts +361 -0
  54. package/src/providers/antigravity.js +62 -9
  55. package/src/providers/antigravity.ts +73 -9
  56. package/src/providers/byokHttp.js +7 -1
  57. package/src/providers/byokHttp.ts +6 -1
  58. package/src/providers/byokStream.js +21 -8
  59. package/src/providers/byokStream.ts +17 -7
  60. package/src/providers/dashscope-byok.js +21 -5
  61. package/src/providers/dashscope-byok.ts +29 -11
  62. package/src/providers/moonshot.js +26 -7
  63. package/src/providers/moonshot.ts +34 -13
  64. package/src/providers/muse.js +6 -0
  65. package/src/providers/muse.ts +8 -0
  66. package/src/providers/ollama.js +39 -7
  67. package/src/providers/ollama.ts +36 -7
  68. package/src/providers/openai-compatible.js +16 -3
  69. package/src/providers/openai-compatible.ts +13 -3
  70. package/src/providers/openai.js +62 -4
  71. package/src/providers/openai.ts +50 -4
  72. package/src/providers/openrouter.js +19 -4
  73. package/src/providers/openrouter.ts +21 -4
  74. package/src/providers/qwen-byok.js +21 -5
  75. package/src/providers/qwen-byok.ts +29 -11
  76. package/src/providers/xai.js +26 -10
  77. package/src/providers/xai.ts +34 -16
  78. package/src/reporting.js +4 -2
  79. package/src/reporting.ts +4 -2
  80. package/src/sandbox.js +34 -0
  81. package/src/sandbox.ts +43 -0
  82. package/src/scheduler/scheduler.js +372 -0
  83. package/src/scheduler/scheduler.ts +433 -0
  84. package/src/sessionSearchIndex.js +267 -0
  85. package/src/sessionSearchIndex.ts +311 -0
  86. package/src/skillsManager.js +2 -3
  87. package/src/skillsManager.ts +2 -3
  88. package/src/toolPacks.js +6 -0
  89. package/src/toolPacks.ts +6 -0
  90. package/src/tools/applyPatch.js +1 -1
  91. package/src/tools/applyPatch.ts +1 -1
  92. package/src/tools/generateMediaViaApi.js +4 -3
  93. package/src/tools/generateMediaViaApi.ts +4 -3
  94. package/src/tools/nativeEngine.js +2 -2
  95. package/src/tools/nativeEngine.ts +2 -2
  96. package/src/tools/openSourceToolProvisioner.js +2 -2
  97. package/src/tools/openSourceToolProvisioner.ts +2 -2
  98. package/src/tools/payloadSanitizer.js +0 -1
  99. package/src/tools/payloadSanitizer.ts +0 -1
  100. package/src/tools/pdfReader.js +122 -20
  101. package/src/tools/pdfReader.ts +111 -20
  102. package/src/tools/presentDeliverable.js +103 -0
  103. package/src/tools/presentDeliverable.ts +127 -0
  104. package/src/tools/ptcRuntime.js +444 -0
  105. package/src/tools/ptcRuntime.ts +490 -0
  106. package/src/tools/ptyTerminal.js +1096 -0
  107. package/src/tools/ptyTerminal.ts +1231 -0
  108. package/src/tools/registry.js +21 -12
  109. package/src/tools/registry.ts +21 -12
  110. package/src/tools/toolOutputStore.js +26 -4
  111. package/src/tools/toolOutputStore.ts +22 -4
  112. package/src/tools/webFetch.js +158 -11
  113. package/src/tools/webFetch.ts +145 -11
  114. package/src/tools/webSearch.js +123 -36
  115. package/src/tools/webSearch.ts +124 -33
  116. package/src/tui/banner.js +5 -1
  117. package/src/tui/banner.ts +6 -1
  118. package/src/tui/chatRenderer.js +1 -2
  119. package/src/tui/chatRenderer.ts +1 -2
  120. package/src/tui/completion.js +1 -0
  121. package/src/tui/completion.ts +1 -0
  122. package/src/tui/composerControls.js +111 -27
  123. package/src/tui/composerControls.ts +124 -28
  124. package/src/tui/dialogs.js +3 -16
  125. package/src/tui/dialogs.ts +3 -16
  126. package/src/tui/home.js +1 -0
  127. package/src/tui/home.ts +1 -0
  128. package/src/tui/invocation.js +1 -2
  129. package/src/tui/invocation.ts +1 -2
  130. package/src/tui/modelPicker.js +22 -12
  131. package/src/tui/modelPicker.ts +22 -12
  132. package/src/tui/overlay.js +2 -5
  133. package/src/tui/overlay.ts +2 -5
  134. package/src/tui/prompt.js +6 -4
  135. package/src/tui/prompt.ts +6 -4
  136. package/src/tui/selectList.js +4 -12
  137. package/src/tui/selectList.ts +4 -12
  138. package/src/tui/setup.js +22 -9
  139. package/src/tui/setup.ts +26 -9
  140. package/src/tui/statusLine.ts +2 -0
  141. package/src/web/client/browserPanel.js +702 -0
  142. package/src/web/client/browserPanel.ts +663 -0
  143. package/src/web/client/chatStream.js +309 -0
  144. package/src/web/client/chatStream.ts +289 -0
  145. package/src/web/client/cliPanel.js +165 -0
  146. package/src/web/client/cliPanel.ts +171 -0
  147. package/src/web/client/composer.js +204 -0
  148. package/src/web/client/composer.ts +209 -0
  149. package/src/web/client/diffPanel.js +176 -0
  150. package/src/web/client/diffPanel.ts +203 -0
  151. package/src/web/client/dom.js +220 -0
  152. package/src/web/client/dom.ts +221 -0
  153. package/src/web/client/filesAndCanvas.js +231 -0
  154. package/src/web/client/filesAndCanvas.ts +238 -0
  155. package/src/web/client/gameLauncherUi.js +78 -0
  156. package/src/web/client/gameLauncherUi.ts +78 -0
  157. package/src/web/client/main.js +301 -0
  158. package/src/web/client/main.ts +368 -0
  159. package/src/web/client/markdown.js +364 -0
  160. package/src/web/client/markdown.ts +373 -0
  161. package/src/web/client/modelPicker.js +455 -0
  162. package/src/web/client/modelPicker.ts +451 -0
  163. package/src/web/client/permissionPresetsUi.js +307 -0
  164. package/src/web/client/permissionPresetsUi.ts +333 -0
  165. package/src/web/client/sessions.js +353 -0
  166. package/src/web/client/sessions.ts +372 -0
  167. package/src/web/client/settingsModal.js +191 -0
  168. package/src/web/client/settingsModal.ts +176 -0
  169. package/src/web/client/state.js +250 -0
  170. package/src/web/client/state.ts +233 -0
  171. package/src/web/client/streamSmoother.js +127 -0
  172. package/src/web/client/streamSmoother.ts +119 -0
  173. package/src/web/client/studioLayout.js +54 -0
  174. package/src/web/client/studioLayout.ts +60 -0
  175. package/src/web/client/studioShell.js +327 -0
  176. package/src/web/client/studioShell.ts +340 -0
  177. package/src/web/client/studioStart.js +77 -0
  178. package/src/web/client/studioStart.ts +89 -0
  179. package/src/web/client/terminalPanel.js +357 -0
  180. package/src/web/client/terminalPanel.ts +345 -0
  181. package/src/web/client/turnView.js +934 -0
  182. package/src/web/client/turnView.ts +981 -0
  183. package/src/web/client/types.js +1 -0
  184. package/src/web/client/types.ts +319 -0
  185. package/src/web/client/validators.js +106 -0
  186. package/src/web/client/validators.ts +96 -0
  187. package/src/web/server/activeRuns.js +152 -0
  188. package/src/web/server/activeRuns.ts +171 -0
  189. package/src/web/server/routesBrowser.js +355 -0
  190. package/src/web/server/routesBrowser.ts +386 -0
  191. package/src/web/server/routesChat.js +304 -0
  192. package/src/web/server/routesChat.ts +347 -0
  193. package/src/web/server/routesCore.js +472 -0
  194. package/src/web/server/routesCore.ts +522 -0
  195. package/src/web/server/routesTerminal.js +162 -0
  196. package/src/web/server/routesTerminal.ts +182 -0
  197. package/src/web/server/routesWorkspace.js +510 -0
  198. package/src/web/server/routesWorkspace.ts +546 -0
  199. package/src/web/server/security.js +98 -0
  200. package/src/web/server/security.ts +108 -0
  201. package/src/web/server/sessionTranscript.js +586 -0
  202. package/src/web/server/sessionTranscript.ts +566 -0
  203. package/src/web/server/staticAssets.js +80 -0
  204. package/src/web/server/staticAssets.ts +91 -0
  205. package/src/web/server/types.js +1 -0
  206. package/src/web/server/types.ts +135 -0
  207. package/src/web/server/workspaceFiles.js +368 -0
  208. package/src/web/server/workspaceFiles.ts +363 -0
  209. package/src/web/skybridgeServer.js +76 -2449
  210. package/src/web/skybridgeServer.ts +118 -2600
  211. package/src/web/skybridgeUi.js +16 -450
  212. package/src/web/skybridgeUi.ts +16 -454
  213. package/src/web/styles/agent.css +380 -0
  214. package/src/web/styles/composer.css +193 -0
  215. package/src/web/styles/overlays.css +436 -0
  216. package/src/web/styles/shell.css +387 -0
  217. package/src/web/styles/studio.css +723 -0
  218. package/src/web/styles/thread.css +221 -0
  219. package/src/web/styles/tokens.css +94 -0
  220. package/src/web/ui/brandMark.js +73 -0
  221. package/src/web/ui/brandMark.ts +82 -0
  222. package/src/web/ui/modalsTemplate.js +139 -0
  223. package/src/web/ui/modalsTemplate.ts +139 -0
  224. package/src/web/ui/sidebarTemplate.js +63 -0
  225. package/src/web/ui/sidebarTemplate.ts +64 -0
  226. package/src/web/ui/studioTemplate.js +258 -0
  227. package/src/web/ui/studioTemplate.ts +258 -0
  228. package/src/web/ui/workspaceTemplate.js +72 -0
  229. package/src/web/ui/workspaceTemplate.ts +73 -0
  230. package/src/worktreeManager.js +16 -1
  231. package/src/worktreeManager.ts +22 -1
  232. package/src/web/skybridgeClientScript.js +0 -3951
  233. package/src/web/skybridgeClientScript.ts +0 -3952
  234. package/src/web/skybridgeStyles.js +0 -827
  235. package/src/web/skybridgeStyles.ts +0 -828
@@ -6,6 +6,7 @@ import { SelectLayer, InputLayer } from './dialogs.js';
6
6
  import { paint, bold, dim, GLYPHS } from './theme.js';
7
7
  import { fuzzyFilter } from './selectList.js';
8
8
  import { loadConfig, saveConfig } from '../config.js';
9
+ import { reconcileConfigVariant } from '../modelVariants.js';
9
10
  import { startLoopbackAuth, saveOpenRouterKey, disconnectOpenRouter } from '../auth/openrouterAuth.js';
10
11
  import { setTransientNotice } from './consoleGuard.js';
11
12
  import { truncate } from './text.js';
@@ -457,12 +458,13 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
457
458
  }).catch(() => { });
458
459
  }
459
460
  });
460
- const notifyPrompt = (providerId, modelId) => {
461
+ const notifyPrompt = (providerId, modelId, variant = '') => {
461
462
  if (typeof prompt.updateModel === 'function') {
462
- prompt.updateModel(providerId, modelId);
463
+ prompt.updateModel(providerId, modelId, variant);
463
464
  }
464
465
  else if (prompt.renderer?.status) {
465
- prompt.renderer.status.setSession({ provider: providerId, model: modelId });
466
+ prompt.renderer.status.setSession({ provider: providerId, model: modelId, variant });
467
+ prompt.surface?.setSessionInfo?.({ provider: providerId, model: modelId, variant });
466
468
  if (typeof prompt.scheduleDraw === 'function')
467
469
  prompt.scheduleDraw();
468
470
  }
@@ -482,6 +484,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
482
484
  config['model'] = target.modelId;
483
485
  config['apiKey'] = '';
484
486
  delete config['baseUrl'];
487
+ const nextVariant = reconcileConfigVariant(config);
485
488
  store.saveConfig(config);
486
489
  if (options.loop) {
487
490
  options.loop.config = config;
@@ -489,19 +492,21 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
489
492
  options.loop.updateTierLimits();
490
493
  }
491
494
  }
492
- notifyPrompt(target.providerId, target.modelId);
495
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
493
496
  return `Now using ${target.providerLabel} / ${target.modelId}.`;
494
497
  }
495
498
  // Case 2: Disconnect / Unlink action (e.g. Disconnect OpenRouter)
496
499
  if (target.action === 'disconnect' || target.modelId === 'disconnect') {
497
500
  const updatedConfig = disconnectOpenRouter(store);
501
+ const nextVariant = reconcileConfigVariant(updatedConfig);
502
+ store.saveConfig(updatedConfig);
498
503
  if (options.loop) {
499
504
  options.loop.config = updatedConfig;
500
505
  if (typeof options.loop.updateTierLimits === 'function') {
501
506
  options.loop.updateTierLimits();
502
507
  }
503
508
  }
504
- notifyPrompt(updatedConfig.provider || 'antigravity', updatedConfig.model || 'Gemini 3.8 Flash (Low)');
509
+ notifyPrompt(updatedConfig.provider || 'antigravity', updatedConfig.model || 'Gemini 3.8 Flash (Low)', nextVariant);
505
510
  return (`✓ Disconnected OpenRouter. Account and API credentials have been unlinked from Causyne Agent.\n` +
506
511
  `Active model reverted to ${updatedConfig.provider || 'antigravity'} / ${updatedConfig.model || 'Gemini 3.8 Flash (Low)'}.`);
507
512
  }
@@ -524,6 +529,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
524
529
  config['apiKey'] = existingKey;
525
530
  config['providerKeys'] = providerKeys;
526
531
  config['providerKeys']['openrouter'] = existingKey;
532
+ const nextVariant = reconcileConfigVariant(config);
527
533
  store.saveConfig(config);
528
534
  void resolveAvailableModels('openrouter', { ...config, apiKey: existingKey }, true).catch(() => { });
529
535
  if (options.loop) {
@@ -532,7 +538,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
532
538
  options.loop.updateTierLimits();
533
539
  }
534
540
  }
535
- notifyPrompt('openrouter', target.modelId);
541
+ notifyPrompt('openrouter', target.modelId, nextVariant);
536
542
  return `Now using OpenRouter Free / ${target.modelId}.`;
537
543
  }
538
544
  // Unconfigured OpenRouter: prompt where pressing Enter once immediately starts OAuth redirect
@@ -563,15 +569,16 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
563
569
  const updatedConfig = store.loadConfig();
564
570
  if (target.modelId && updatedConfig.model !== target.modelId) {
565
571
  updatedConfig.model = target.modelId;
566
- store.saveConfig(updatedConfig);
567
572
  }
573
+ const nextVariant = reconcileConfigVariant(updatedConfig);
574
+ store.saveConfig(updatedConfig);
568
575
  if (options.loop) {
569
576
  options.loop.config = updatedConfig;
570
577
  if (typeof options.loop.updateTierLimits === 'function') {
571
578
  options.loop.updateTierLimits();
572
579
  }
573
580
  }
574
- notifyPrompt('openrouter', target.modelId);
581
+ notifyPrompt('openrouter', target.modelId, nextVariant);
575
582
  setTransientNotice(prompt, `✓ Connected to OpenRouter successfully! Using OpenRouter Free / ${target.modelId}.`, 5000);
576
583
  if (prompt.surface?.stage) {
577
584
  prompt.surface.stage.invalidate();
@@ -597,15 +604,16 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
597
604
  const updatedConfig = store.loadConfig();
598
605
  if (target.modelId && updatedConfig.model !== target.modelId) {
599
606
  updatedConfig.model = target.modelId;
600
- store.saveConfig(updatedConfig);
601
607
  }
608
+ const nextVariant = reconcileConfigVariant(updatedConfig);
609
+ store.saveConfig(updatedConfig);
602
610
  if (options.loop) {
603
611
  options.loop.config = updatedConfig;
604
612
  if (typeof options.loop.updateTierLimits === 'function') {
605
613
  options.loop.updateTierLimits();
606
614
  }
607
615
  }
608
- notifyPrompt('openrouter', target.modelId);
616
+ notifyPrompt('openrouter', target.modelId, nextVariant);
609
617
  return `✓ Saved API key. Now using OpenRouter Free / ${target.modelId}.`;
610
618
  }
611
619
  // Case 3: BYOK Provider (Cloud or Local API)
@@ -629,6 +637,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
629
637
  config['providerKeys'] = providerKeys;
630
638
  config['providerKeys'][target.providerId] = existingKey;
631
639
  }
640
+ const nextVariant = reconcileConfigVariant(config);
632
641
  store.saveConfig(config);
633
642
  // Proactively refresh live models in the background for this active provider
634
643
  if (existingKey || target.providerId === 'ollama') {
@@ -640,7 +649,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
640
649
  options.loop.updateTierLimits();
641
650
  }
642
651
  }
643
- notifyPrompt(target.providerId, target.modelId);
652
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
644
653
  return `Now using ${target.providerLabel} / ${target.modelId}.`;
645
654
  }
646
655
  // Key is required: open modal input dialog (InputLayer)
@@ -668,6 +677,7 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
668
677
  config['apiKey'] = cleanKey;
669
678
  config['providerKeys'] = providerKeys;
670
679
  config['providerKeys'][target.providerId] = cleanKey;
680
+ const nextVariant = reconcileConfigVariant(config);
671
681
  store.saveConfig(config);
672
682
  // Proactively refresh live models in the background with the newly saved key
673
683
  void resolveAvailableModels(target.providerId, { ...config, apiKey: cleanKey }, true).catch(() => { });
@@ -677,6 +687,6 @@ export async function runInteractiveModelPicker(prompt, store = { loadConfig, sa
677
687
  options.loop.updateTierLimits();
678
688
  }
679
689
  }
680
- notifyPrompt(target.providerId, target.modelId);
690
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
681
691
  return `Saved API key. Now using ${target.providerLabel} / ${target.modelId}.`;
682
692
  }
@@ -7,6 +7,7 @@ import { SelectLayer, InputLayer } from './dialogs.js';
7
7
  import { paint, bold, dim, GLYPHS } from './theme.js';
8
8
  import { fuzzyFilter } from './selectList.js';
9
9
  import { loadConfig, saveConfig } from '../config.js';
10
+ import { reconcileConfigVariant } from '../modelVariants.js';
10
11
  import { startLoopbackAuth, saveOpenRouterKey, disconnectOpenRouter } from '../auth/openrouterAuth.js';
11
12
  import { setTransientNotice } from './consoleGuard.js';
12
13
  import { truncate } from './text.js';
@@ -558,11 +559,12 @@ export async function runInteractiveModelPicker(
558
559
  }
559
560
  });
560
561
 
561
- const notifyPrompt = (providerId: string, modelId: string) => {
562
+ const notifyPrompt = (providerId: string, modelId: string, variant = '') => {
562
563
  if (typeof (prompt as any).updateModel === 'function') {
563
- (prompt as any).updateModel(providerId, modelId);
564
+ (prompt as any).updateModel(providerId, modelId, variant);
564
565
  } else if ((prompt as any).renderer?.status) {
565
- (prompt as any).renderer.status.setSession({ provider: providerId, model: modelId });
566
+ (prompt as any).renderer.status.setSession({ provider: providerId, model: modelId, variant });
567
+ (prompt as any).surface?.setSessionInfo?.({ provider: providerId, model: modelId, variant });
566
568
  if (typeof (prompt as any).scheduleDraw === 'function') (prompt as any).scheduleDraw();
567
569
  }
568
570
  };
@@ -587,6 +589,7 @@ export async function runInteractiveModelPicker(
587
589
  config['model'] = target.modelId;
588
590
  config['apiKey'] = '';
589
591
  delete config['baseUrl'];
592
+ const nextVariant = reconcileConfigVariant(config);
590
593
  store.saveConfig(config);
591
594
 
592
595
  if (options.loop) {
@@ -595,20 +598,22 @@ export async function runInteractiveModelPicker(
595
598
  options.loop.updateTierLimits();
596
599
  }
597
600
  }
598
- notifyPrompt(target.providerId, target.modelId);
601
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
599
602
  return `Now using ${target.providerLabel} / ${target.modelId}.`;
600
603
  }
601
604
 
602
605
  // Case 2: Disconnect / Unlink action (e.g. Disconnect OpenRouter)
603
606
  if (target.action === 'disconnect' || target.modelId === 'disconnect') {
604
607
  const updatedConfig = disconnectOpenRouter(store);
608
+ const nextVariant = reconcileConfigVariant(updatedConfig);
609
+ store.saveConfig(updatedConfig);
605
610
  if (options.loop) {
606
611
  options.loop.config = updatedConfig;
607
612
  if (typeof options.loop.updateTierLimits === 'function') {
608
613
  options.loop.updateTierLimits();
609
614
  }
610
615
  }
611
- notifyPrompt(updatedConfig.provider || 'antigravity', updatedConfig.model || 'Gemini 3.8 Flash (Low)');
616
+ notifyPrompt(updatedConfig.provider || 'antigravity', updatedConfig.model || 'Gemini 3.8 Flash (Low)', nextVariant);
612
617
  return (
613
618
  `✓ Disconnected OpenRouter. Account and API credentials have been unlinked from Causyne Agent.\n` +
614
619
  `Active model reverted to ${updatedConfig.provider || 'antigravity'} / ${updatedConfig.model || 'Gemini 3.8 Flash (Low)'}.`
@@ -634,6 +639,7 @@ export async function runInteractiveModelPicker(
634
639
  config['apiKey'] = existingKey;
635
640
  config['providerKeys'] = providerKeys;
636
641
  config['providerKeys']['openrouter'] = existingKey;
642
+ const nextVariant = reconcileConfigVariant(config);
637
643
  store.saveConfig(config);
638
644
 
639
645
  void resolveAvailableModels('openrouter', { ...config, apiKey: existingKey }, true).catch(() => {});
@@ -644,7 +650,7 @@ export async function runInteractiveModelPicker(
644
650
  options.loop.updateTierLimits();
645
651
  }
646
652
  }
647
- notifyPrompt('openrouter', target.modelId);
653
+ notifyPrompt('openrouter', target.modelId, nextVariant);
648
654
  return `Now using OpenRouter Free / ${target.modelId}.`;
649
655
  }
650
656
 
@@ -679,15 +685,16 @@ export async function runInteractiveModelPicker(
679
685
  const updatedConfig = store.loadConfig();
680
686
  if (target.modelId && updatedConfig.model !== target.modelId) {
681
687
  updatedConfig.model = target.modelId;
682
- store.saveConfig(updatedConfig);
683
688
  }
689
+ const nextVariant = reconcileConfigVariant(updatedConfig);
690
+ store.saveConfig(updatedConfig);
684
691
  if (options.loop) {
685
692
  options.loop.config = updatedConfig;
686
693
  if (typeof options.loop.updateTierLimits === 'function') {
687
694
  options.loop.updateTierLimits();
688
695
  }
689
696
  }
690
- notifyPrompt('openrouter', target.modelId);
697
+ notifyPrompt('openrouter', target.modelId, nextVariant);
691
698
  setTransientNotice(prompt as any, `✓ Connected to OpenRouter successfully! Using OpenRouter Free / ${target.modelId}.`, 5000);
692
699
  if ((prompt as any).surface?.stage) {
693
700
  (prompt as any).surface.stage.invalidate();
@@ -715,15 +722,16 @@ export async function runInteractiveModelPicker(
715
722
  const updatedConfig = store.loadConfig();
716
723
  if (target.modelId && updatedConfig.model !== target.modelId) {
717
724
  updatedConfig.model = target.modelId;
718
- store.saveConfig(updatedConfig);
719
725
  }
726
+ const nextVariant = reconcileConfigVariant(updatedConfig);
727
+ store.saveConfig(updatedConfig);
720
728
  if (options.loop) {
721
729
  options.loop.config = updatedConfig;
722
730
  if (typeof options.loop.updateTierLimits === 'function') {
723
731
  options.loop.updateTierLimits();
724
732
  }
725
733
  }
726
- notifyPrompt('openrouter', target.modelId);
734
+ notifyPrompt('openrouter', target.modelId, nextVariant);
727
735
  return `✓ Saved API key. Now using OpenRouter Free / ${target.modelId}.`;
728
736
  }
729
737
 
@@ -747,6 +755,7 @@ export async function runInteractiveModelPicker(
747
755
  config['providerKeys'] = providerKeys;
748
756
  config['providerKeys'][target.providerId] = existingKey;
749
757
  }
758
+ const nextVariant = reconcileConfigVariant(config);
750
759
  store.saveConfig(config);
751
760
 
752
761
  // Proactively refresh live models in the background for this active provider
@@ -760,7 +769,7 @@ export async function runInteractiveModelPicker(
760
769
  options.loop.updateTierLimits();
761
770
  }
762
771
  }
763
- notifyPrompt(target.providerId, target.modelId);
772
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
764
773
  return `Now using ${target.providerLabel} / ${target.modelId}.`;
765
774
  }
766
775
 
@@ -792,6 +801,7 @@ export async function runInteractiveModelPicker(
792
801
  config['apiKey'] = cleanKey;
793
802
  config['providerKeys'] = providerKeys;
794
803
  config['providerKeys'][target.providerId] = cleanKey;
804
+ const nextVariant = reconcileConfigVariant(config);
795
805
  store.saveConfig(config);
796
806
 
797
807
  // Proactively refresh live models in the background with the newly saved key
@@ -804,6 +814,6 @@ export async function runInteractiveModelPicker(
804
814
  }
805
815
  }
806
816
 
807
- notifyPrompt(target.providerId, target.modelId);
817
+ notifyPrompt(target.providerId, target.modelId, nextVariant);
808
818
  return `Saved API key. Now using ${target.providerLabel} / ${target.modelId}.`;
809
819
  }
@@ -239,11 +239,8 @@ export class OverlayStack {
239
239
  /**
240
240
  * A layer as framed rows, for a normal-buffer live region.
241
241
  *
242
- * drawPanel() paints absolutely into a cell grid, which only exists inside an
243
- * alternate-buffer app — and chat does not have one any more (UX-01). This is the
244
- * same panel expressed as styled `string[]`, which is all a live region can
245
- * append. It is the shape openclaw draws its pickers in: extra lines in the
246
- * composed frame, not a floating window.
242
+ * drawPanel() paints into a cell grid, while live-region rendering expresses
243
+ * the same panel as styled `string[]` rows inside the composed frame.
247
244
  *
248
245
  * Every row is wrapped with `fill('surface', ...)` so that when a panel (such as
249
246
  * Message Actions) is overlaid onto the transcript viewport, its interior has an
@@ -301,11 +301,8 @@ export class OverlayStack {
301
301
  /**
302
302
  * A layer as framed rows, for a normal-buffer live region.
303
303
  *
304
- * drawPanel() paints absolutely into a cell grid, which only exists inside an
305
- * alternate-buffer app — and chat does not have one any more (UX-01). This is the
306
- * same panel expressed as styled `string[]`, which is all a live region can
307
- * append. It is the shape openclaw draws its pickers in: extra lines in the
308
- * composed frame, not a floating window.
304
+ * drawPanel() paints into a cell grid, while live-region rendering expresses
305
+ * the same panel as styled `string[]` rows inside the composed frame.
309
306
  *
310
307
  * Every row is wrapped with `fill('surface', ...)` so that when a panel (such as
311
308
  * Message Actions) is overlaid onto the transcript viewport, its interior has an
package/src/tui/prompt.js CHANGED
@@ -30,6 +30,7 @@ import { pickExample, fitHints } from './banner.js';
30
30
  import { panelRows } from './overlay.js';
31
31
  import { renderUsageCardRows, renderStatusCardRows, collectUsageCardData } from './usageCard.js';
32
32
  import { buildStatusText } from '../reporting.js';
33
+ import { formatPermissionPresetLabel } from '../permissionPresets.js';
33
34
  import { commandPalette, skillPicker, ApprovalLayer, DecisionLayer, ConfirmLayer, HomeLayer, TextLayer } from './dialogs.js';
34
35
  import { describeTool } from './toolDisplay.js';
35
36
  import { writeClipboardSync } from './clipboardSync.js';
@@ -131,7 +132,7 @@ export class ChatPrompt {
131
132
  this.onOpenVariant = opts.onOpenVariant || null;
132
133
  this.onOpenVariantList = opts.onOpenVariantList || null;
133
134
  this.messageActionLoop = opts.messageActionLoop || null;
134
- this.getMode = opts.getMode || (() => 'B');
135
+ this.getMode = opts.getMode || (() => 'workspace-write');
135
136
  this.editor = new LineEditor();
136
137
  this.history = opts.history || new PromptHistory();
137
138
  this.index = new FileIndex(this.root);
@@ -434,7 +435,8 @@ export class ChatPrompt {
434
435
  const status = this.renderer && this.renderer.status;
435
436
  if (!status)
436
437
  return null;
437
- const mode = `${this.busy ? 'Working' : 'Build'} ${this.getMode()}`;
438
+ const presetLabel = formatPermissionPresetLabel(this.getMode());
439
+ const mode = this.busy ? `Working · ${presetLabel}` : presetLabel;
438
440
  const parts = [bold(paint('accent', mode))];
439
441
  if (status.model)
440
442
  parts.push(bold(paint('ink', status.model)));
@@ -450,7 +452,7 @@ export class ChatPrompt {
450
452
  details.push(`${this.editor.lines.length} lines`);
451
453
  const extra = details.length ? dim(` ${GLYPHS.dot} ${details.join(' · ')}`) : '';
452
454
  const withMeta = visibleWidth(base) + visibleWidth(extra) <= width ? base + extra : base;
453
- const hints = dim(' Ctrl+G/⇧Tab mode · Alt+M model · Ctrl+T variant');
455
+ const hints = dim(' Ctrl+G/⇧Tab permissions · Alt+M model · Ctrl+T variant');
454
456
  const full = visibleWidth(withMeta) + visibleWidth(hints) <= width ? withMeta + hints : withMeta;
455
457
  return visibleWidth(full) > width ? truncate(full, width, GLYPHS.ellipsis) : full;
456
458
  }
@@ -898,7 +900,7 @@ export class ChatPrompt {
898
900
  const isControlCommand = this.isCommand(text) && new Set([
899
901
  '/stop', '/interrupt', '/new', '/model', '/models',
900
902
  '/variant', '/effort', '/reasoning', '/cortex',
901
- '/gui', '/web', '/studio',
903
+ '/gui', '/web', '/studio', '/game',
902
904
  '/session', '/sessions', '/continuum', '/clear'
903
905
  ]).has(commandToken);
904
906
  if ((trimmedLower === '/stop' || trimmedLower === '/interrupt') && this.busy) {
package/src/tui/prompt.ts CHANGED
@@ -31,6 +31,7 @@ import { pickExample, fitHints } from './banner.js';
31
31
  import { panelRows } from './overlay.js';
32
32
  import { renderUsageCardRows, renderStatusCardRows, collectUsageCardData, type UsageCardData } from './usageCard.js';
33
33
  import { buildStatusText } from '../reporting.js';
34
+ import { formatPermissionPresetLabel } from '../permissionPresets.js';
34
35
  import { commandPalette, skillPicker, ApprovalLayer, DecisionLayer, ConfirmLayer, HomeLayer, TextLayer } from './dialogs.js';
35
36
  import { describeTool } from './toolDisplay.js';
36
37
  import { writeClipboardSync } from './clipboardSync.js';
@@ -174,7 +175,7 @@ export class ChatPrompt {
174
175
  this.onOpenVariant = opts.onOpenVariant || null;
175
176
  this.onOpenVariantList = opts.onOpenVariantList || null;
176
177
  this.messageActionLoop = opts.messageActionLoop || null;
177
- this.getMode = opts.getMode || (() => 'B');
178
+ this.getMode = opts.getMode || (() => 'workspace-write');
178
179
 
179
180
  this.editor = new LineEditor();
180
181
  this.history = opts.history || new PromptHistory();
@@ -452,7 +453,8 @@ export class ChatPrompt {
452
453
  const status = this.renderer && this.renderer.status;
453
454
  if (!status) return null;
454
455
 
455
- const mode = `${this.busy ? 'Working' : 'Build'} ${this.getMode()}`;
456
+ const presetLabel = formatPermissionPresetLabel(this.getMode());
457
+ const mode = this.busy ? `Working · ${presetLabel}` : presetLabel;
456
458
  const parts = [bold(paint('accent', mode))];
457
459
  if (status.model) parts.push(bold(paint('ink', status.model)));
458
460
  if (status.variant) parts.push(paint('accent', `[${status.variant}]`));
@@ -464,7 +466,7 @@ export class ChatPrompt {
464
466
  if (this.editor.lines.length > 1) details.push(`${this.editor.lines.length} lines`);
465
467
  const extra = details.length ? dim(` ${GLYPHS.dot} ${details.join(' · ')}`) : '';
466
468
  const withMeta = visibleWidth(base) + visibleWidth(extra) <= width ? base + extra : base;
467
- const hints = dim(' Ctrl+G/⇧Tab mode · Alt+M model · Ctrl+T variant');
469
+ const hints = dim(' Ctrl+G/⇧Tab permissions · Alt+M model · Ctrl+T variant');
468
470
  const full = visibleWidth(withMeta) + visibleWidth(hints) <= width ? withMeta + hints : withMeta;
469
471
  return visibleWidth(full) > width ? truncate(full, width, GLYPHS.ellipsis) : full;
470
472
  }
@@ -909,7 +911,7 @@ export class ChatPrompt {
909
911
  const isControlCommand = this.isCommand(text) && new Set([
910
912
  '/stop', '/interrupt', '/new', '/model', '/models',
911
913
  '/variant', '/effort', '/reasoning', '/cortex',
912
- '/gui', '/web', '/studio',
914
+ '/gui', '/web', '/studio', '/game',
913
915
  '/session', '/sessions', '/continuum', '/clear'
914
916
  ]).has(commandToken);
915
917
 
@@ -1,16 +1,8 @@
1
- // The filterable list every dialog is built out of.
1
+ // Filterable, fuzzy-scored list primitive shared across all TUI pickers
2
+ // (command palette, model picker, session list, theme list, agent list, MCP list).
2
3
  //
3
- // openclaw has components/filterable-select-list.ts and searchable-select-list.ts;
4
- // opencode has ui/dialog-select.tsx, and its command palette, model picker,
5
- // session list, theme list, agent list and MCP list are all that one component
6
- // with different options. The lesson is the component, not the dialogs: build
7
- // this once and well, and every dialog after it costs twenty lines.
8
- //
9
- // The fuzzy matcher is the part that decides whether a palette feels sharp or
10
- // useless. A plain `includes()` cannot find "session list" from "sesl", and an
11
- // unscored subsequence match ranks garbage first. This scores the way people
12
- // expect: consecutive letters and word starts win, and a match at the beginning
13
- // of the label beats the same letters buried in the middle.
4
+ // Scores consecutive letters and word starts higher than scattered matches so
5
+ // short queries jump directly to the intended item.
14
6
  //
15
7
  // Pure Node over ./theme.js and ./text.js. No dependency, no shell.
16
8
  import { paint, bold, dim, GLYPHS } from './theme.js';
@@ -1,16 +1,8 @@
1
- // The filterable list every dialog is built out of.
1
+ // Filterable, fuzzy-scored list primitive shared across all TUI pickers
2
+ // (command palette, model picker, session list, theme list, agent list, MCP list).
2
3
  //
3
- // openclaw has components/filterable-select-list.ts and searchable-select-list.ts;
4
- // opencode has ui/dialog-select.tsx, and its command palette, model picker,
5
- // session list, theme list, agent list and MCP list are all that one component
6
- // with different options. The lesson is the component, not the dialogs: build
7
- // this once and well, and every dialog after it costs twenty lines.
8
- //
9
- // The fuzzy matcher is the part that decides whether a palette feels sharp or
10
- // useless. A plain `includes()` cannot find "session list" from "sesl", and an
11
- // unscored subsequence match ranks garbage first. This scores the way people
12
- // expect: consecutive letters and word starts win, and a match at the beginning
13
- // of the label beats the same letters buried in the middle.
4
+ // Scores consecutive letters and word starts higher than scattered matches so
5
+ // short queries jump directly to the intended item.
14
6
  //
15
7
  // Pure Node over ./theme.js and ./text.js. No dependency, no shell.
16
8
 
package/src/tui/setup.js CHANGED
@@ -1,5 +1,7 @@
1
1
  /** Shared setup transaction for the home panel and standalone CLI. */
2
2
  import { resolveAvailableModels } from '../dynamicCatalogue.js';
3
+ import { getPermissionPresetDescriptor, normalizePermissionPreset, presetToAutonomyMode } from '../permissionPresets.js';
4
+ import { reconcileConfigVariant } from '../modelVariants.js';
3
5
  import { safeDisplay } from './text.js';
4
6
  const string = (value) => typeof value === 'string' ? value : '';
5
7
  const customProviders = new Set(['openai-compatible', 'dashscope-byok', 'ollama']);
@@ -122,14 +124,17 @@ export async function runSetup(ui, providers, store, workspace = process.cwd())
122
124
  return null;
123
125
  apiKey = answer || oldKey;
124
126
  }
125
- const mode = await ui.select({ title: 'Setup 4/5 · autonomy', items: [
126
- { id: 'B', label: 'B · Supervised (Standard)', description: 'Recommended. Approval for dangerous actions; routine work continues.' },
127
- { id: 'A', label: 'A · Ask first (Strict)', description: 'Explicit confirmation before every tool call.' },
128
- { id: 'C', label: 'C · Autonomous (High Velocity)', description: 'Fewer interruptions; mandatory safety and decision gates remain.' }
127
+ const selectedPerm = await ui.select({ title: 'Setup 4/5 · permissions', items: [
128
+ { id: 'workspace-write', label: 'Workspace Write (Recommended)', description: 'Read and edit files within the workspace; confirm risky or external actions.' },
129
+ { id: 'read-only', label: 'Read Only', description: 'Inspect files and search code without modifying workspace files.' },
130
+ { id: 'danger-full-access', label: 'Full access', description: 'Direct workspace edits and commands; destructive and credential safeguards remain.' }
129
131
  ] });
130
- if (!mode || !['A', 'B', 'C'].includes(mode.id))
132
+ const chosenPreset = normalizePermissionPreset(selectedPerm?.id);
133
+ if (!chosenPreset)
131
134
  return null;
132
- draft = { ...draft, provider: provider.id, model, apiKey, autonomyMode: mode.id };
135
+ const chosenDesc = getPermissionPresetDescriptor(chosenPreset);
136
+ const chosenAutonomy = presetToAutonomyMode(chosenPreset);
137
+ draft = { ...draft, provider: provider.id, model, apiKey, permissionPreset: chosenPreset, autonomyMode: chosenAutonomy };
133
138
  if (baseUrl)
134
139
  draft.baseUrl = baseUrl;
135
140
  else
@@ -138,7 +143,7 @@ export async function runSetup(ui, providers, store, workspace = process.cwd())
138
143
  const cleanLabel = safeDisplay(provider.label).replace(/\s+/g, ' ').trim();
139
144
  const cleanModel = safeDisplay(model).replace(/\s+/g, ' ').trim();
140
145
  const review = await ui.select({ title: 'Setup 5/5 · review', items: [
141
- { id: 'save', label: 'Save configuration', description: `${cleanLabel} · ${cleanModel} · Mode ${mode.id}` },
146
+ { id: 'save', label: 'Save configuration', description: `${cleanLabel} · ${cleanModel} · ${chosenDesc.label}` },
142
147
  { id: 'edit', label: 'Edit choices', description: baseUrl || 'Provider default endpoint' },
143
148
  { id: 'cancel', label: 'Cancel without saving', description: `Workspace: ${cleanWorkspace}` }
144
149
  ] });
@@ -148,8 +153,16 @@ export async function runSetup(ui, providers, store, workspace = process.cwd())
148
153
  continue;
149
154
  if (review.id !== 'save')
150
155
  return null;
151
- // Preserve unrelated settings changed while the dialog was open.
152
- const next = { ...store.loadConfig(), provider: draft.provider, model, apiKey, autonomyMode: mode.id };
156
+ // Preserve unrelated settings changed while the dialog was open, while clearing
157
+ // stale reasoning variants when switching provider or model.
158
+ const existingCfg = store.loadConfig();
159
+ const providerOrModelChanged = existingCfg.provider !== draft.provider || existingCfg.model !== model;
160
+ const next = { ...existingCfg, provider: draft.provider, model, apiKey, permissionPreset: chosenPreset, autonomyMode: chosenAutonomy };
161
+ if (providerOrModelChanged) {
162
+ delete next.reasoningEffort;
163
+ delete next.reasoningBudgetTokens;
164
+ }
165
+ reconcileConfigVariant(next);
153
166
  const saved = next;
154
167
  if (baseUrl)
155
168
  saved.baseUrl = baseUrl;
package/src/tui/setup.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  /** Shared setup transaction for the home panel and standalone CLI. */
2
2
  import { resolveAvailableModels } from '../dynamicCatalogue.js';
3
+ import {
4
+ getPermissionPresetDescriptor,
5
+ normalizePermissionPreset,
6
+ presetToAutonomyMode
7
+ } from '../permissionPresets.js';
8
+ import { reconcileConfigVariant } from '../modelVariants.js';
3
9
  import { safeDisplay } from './text.js';
4
10
 
5
11
  export interface SetupChoice { id: string; label: string; description?: string }
@@ -128,27 +134,38 @@ export async function runSetup(ui: SetupUI, providers: SetupProvider[], store: {
128
134
  if (answer === null) return null;
129
135
  apiKey = answer || oldKey;
130
136
  }
131
- const mode = await ui.select({ title: 'Setup 4/5 · autonomy', items: [
132
- { id: 'B', label: 'B · Supervised (Standard)', description: 'Recommended. Approval for dangerous actions; routine work continues.' },
133
- { id: 'A', label: 'A · Ask first (Strict)', description: 'Explicit confirmation before every tool call.' },
134
- { id: 'C', label: 'C · Autonomous (High Velocity)', description: 'Fewer interruptions; mandatory safety and decision gates remain.' }
137
+ const selectedPerm = await ui.select({ title: 'Setup 4/5 · permissions', items: [
138
+ { id: 'workspace-write', label: 'Workspace Write (Recommended)', description: 'Read and edit files within the workspace; confirm risky or external actions.' },
139
+ { id: 'read-only', label: 'Read Only', description: 'Inspect files and search code without modifying workspace files.' },
140
+ { id: 'danger-full-access', label: 'Full access', description: 'Direct workspace edits and commands; destructive and credential safeguards remain.' }
135
141
  ] });
136
- if (!mode || !['A', 'B', 'C'].includes(mode.id)) return null;
137
- draft = { ...draft, provider: provider.id, model, apiKey, autonomyMode: mode.id };
142
+ const chosenPreset = normalizePermissionPreset(selectedPerm?.id);
143
+ if (!chosenPreset) return null;
144
+ const chosenDesc = getPermissionPresetDescriptor(chosenPreset);
145
+ const chosenAutonomy = presetToAutonomyMode(chosenPreset);
146
+ draft = { ...draft, provider: provider.id, model, apiKey, permissionPreset: chosenPreset, autonomyMode: chosenAutonomy };
138
147
  if (baseUrl) draft.baseUrl = baseUrl; else delete draft.baseUrl;
139
148
  const cleanWorkspace = safeDisplay(workspace).replace(/\s+/g, ' ').trim();
140
149
  const cleanLabel = safeDisplay(provider.label).replace(/\s+/g, ' ').trim();
141
150
  const cleanModel = safeDisplay(model).replace(/\s+/g, ' ').trim();
142
151
  const review = await ui.select({ title: 'Setup 5/5 · review', items: [
143
- { id: 'save', label: 'Save configuration', description: `${cleanLabel} · ${cleanModel} · Mode ${mode.id}` },
152
+ { id: 'save', label: 'Save configuration', description: `${cleanLabel} · ${cleanModel} · ${chosenDesc.label}` },
144
153
  { id: 'edit', label: 'Edit choices', description: baseUrl || 'Provider default endpoint' },
145
154
  { id: 'cancel', label: 'Cancel without saving', description: `Workspace: ${cleanWorkspace}` }
146
155
  ] });
147
156
  if (!review || review.id === 'cancel') return null;
148
157
  if (review.id === 'edit') continue;
149
158
  if (review.id !== 'save') return null;
150
- // Preserve unrelated settings changed while the dialog was open.
151
- const next = { ...store.loadConfig(), provider: draft.provider, model, apiKey, autonomyMode: mode.id };
159
+ // Preserve unrelated settings changed while the dialog was open, while clearing
160
+ // stale reasoning variants when switching provider or model.
161
+ const existingCfg = store.loadConfig();
162
+ const providerOrModelChanged = existingCfg.provider !== draft.provider || existingCfg.model !== model;
163
+ const next: Config = { ...existingCfg, provider: draft.provider, model, apiKey, permissionPreset: chosenPreset, autonomyMode: chosenAutonomy };
164
+ if (providerOrModelChanged) {
165
+ delete next.reasoningEffort;
166
+ delete next.reasoningBudgetTokens;
167
+ }
168
+ reconcileConfigVariant(next);
152
169
  const saved: Config = next;
153
170
  if (baseUrl) saved.baseUrl = baseUrl; else delete saved.baseUrl;
154
171
  if (provider.id !== 'ollama' && !isLocalAgent(provider.id)) {
@@ -79,6 +79,8 @@ export interface StatusLineSessionInfo {
79
79
  model?: string | undefined;
80
80
  provider?: string | undefined;
81
81
  variant?: string | undefined;
82
+ permissionPreset?: string | undefined;
83
+ autonomyMode?: string | undefined;
82
84
  tier?: string | undefined;
83
85
  cwd?: string | undefined;
84
86
  contextLimit?: number | string | undefined;