@google/gemini-cli 0.13.0-nightly.20251102.d7243fb8 → 0.13.0-nightly.20251105.da3da198

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 (165) hide show
  1. package/dist/google-gemini-cli-0.13.0-nightly.20251031.c89bc30d.tgz +0 -0
  2. package/dist/package.json +3 -3
  3. package/dist/src/commands/mcp/list.test.js +25 -21
  4. package/dist/src/commands/mcp/list.test.js.map +1 -1
  5. package/dist/src/config/config.js +11 -84
  6. package/dist/src/config/config.js.map +1 -1
  7. package/dist/src/config/config.test.js +13 -30
  8. package/dist/src/config/config.test.js.map +1 -1
  9. package/dist/src/config/extension-manager.d.ts +18 -6
  10. package/dist/src/config/extension-manager.js +25 -19
  11. package/dist/src/config/extension-manager.js.map +1 -1
  12. package/dist/src/config/extension.test.js +9 -9
  13. package/dist/src/config/extension.test.js.map +1 -1
  14. package/dist/src/config/extensions/extensionSettings.test.js +39 -43
  15. package/dist/src/config/extensions/extensionSettings.test.js.map +1 -1
  16. package/dist/src/config/extensions/github.test.js +133 -165
  17. package/dist/src/config/extensions/github.test.js.map +1 -1
  18. package/dist/src/config/keyBindings.d.ts +3 -0
  19. package/dist/src/config/keyBindings.js +29 -7
  20. package/dist/src/config/keyBindings.js.map +1 -1
  21. package/dist/src/config/keyBindings.test.js +17 -0
  22. package/dist/src/config/keyBindings.test.js.map +1 -1
  23. package/dist/src/config/policy.d.ts +0 -7
  24. package/dist/src/config/policy.js +10 -177
  25. package/dist/src/config/policy.js.map +1 -1
  26. package/dist/src/config/settings.js +1 -0
  27. package/dist/src/config/settings.js.map +1 -1
  28. package/dist/src/config/settingsSchema.d.ts +123 -22
  29. package/dist/src/config/settingsSchema.js +371 -21
  30. package/dist/src/config/settingsSchema.js.map +1 -1
  31. package/dist/src/config/settingsSchema.test.js +40 -1
  32. package/dist/src/config/settingsSchema.test.js.map +1 -1
  33. package/dist/src/gemini.js +15 -5
  34. package/dist/src/gemini.js.map +1 -1
  35. package/dist/src/gemini.test.js +2 -0
  36. package/dist/src/gemini.test.js.map +1 -1
  37. package/dist/src/generated/git-commit.d.ts +2 -2
  38. package/dist/src/generated/git-commit.js +2 -2
  39. package/dist/src/nonInteractiveCli.js +68 -1
  40. package/dist/src/nonInteractiveCli.js.map +1 -1
  41. package/dist/src/services/BuiltinCommandLoader.js +4 -0
  42. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  43. package/dist/src/services/BuiltinCommandLoader.test.js +22 -0
  44. package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
  45. package/dist/src/services/McpPromptLoader.js +2 -2
  46. package/dist/src/services/McpPromptLoader.js.map +1 -1
  47. package/dist/src/services/McpPromptLoader.test.js +4 -2
  48. package/dist/src/services/McpPromptLoader.test.js.map +1 -1
  49. package/dist/src/test-utils/render.d.ts +2 -1
  50. package/dist/src/test-utils/render.js +3 -2
  51. package/dist/src/test-utils/render.js.map +1 -1
  52. package/dist/src/ui/AppContainer.js +32 -15
  53. package/dist/src/ui/AppContainer.js.map +1 -1
  54. package/dist/src/ui/AppContainer.test.js +160 -0
  55. package/dist/src/ui/AppContainer.test.js.map +1 -1
  56. package/dist/src/ui/commands/mcpCommand.js +14 -14
  57. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  58. package/dist/src/ui/commands/mcpCommand.test.js +4 -0
  59. package/dist/src/ui/commands/mcpCommand.test.js.map +1 -1
  60. package/dist/src/ui/commands/policiesCommand.d.ts +7 -0
  61. package/dist/src/ui/commands/policiesCommand.js +59 -0
  62. package/dist/src/ui/commands/policiesCommand.js.map +1 -0
  63. package/dist/src/ui/commands/policiesCommand.test.js +83 -0
  64. package/dist/src/ui/commands/policiesCommand.test.js.map +1 -0
  65. package/dist/src/ui/components/Composer.js +1 -1
  66. package/dist/src/ui/components/Composer.js.map +1 -1
  67. package/dist/src/ui/components/Composer.test.js +4 -1
  68. package/dist/src/ui/components/Composer.test.js.map +1 -1
  69. package/dist/src/ui/components/ConfigInitDisplay.js +4 -6
  70. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
  71. package/dist/src/ui/components/InputPrompt.js +22 -2
  72. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  73. package/dist/src/ui/components/InputPrompt.test.js +70 -5
  74. package/dist/src/ui/components/InputPrompt.test.js.map +1 -1
  75. package/dist/src/ui/components/MainContent.js +15 -4
  76. package/dist/src/ui/components/MainContent.js.map +1 -1
  77. package/dist/src/ui/components/Notifications.js +38 -5
  78. package/dist/src/ui/components/Notifications.js.map +1 -1
  79. package/dist/src/ui/components/SettingsDialog.js +32 -25
  80. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  81. package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
  82. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
  83. package/dist/src/ui/components/messages/InfoMessage.js +1 -1
  84. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -1
  85. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +1 -1
  86. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  87. package/dist/src/ui/components/messages/WarningMessage.js +2 -2
  88. package/dist/src/ui/components/messages/WarningMessage.js.map +1 -1
  89. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -0
  90. package/dist/src/ui/components/shared/text-buffer.js +23 -0
  91. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  92. package/dist/src/ui/components/shared/text-buffer.test.js +246 -201
  93. package/dist/src/ui/components/shared/text-buffer.test.js.map +1 -1
  94. package/dist/src/ui/contexts/KeypressContext.js +182 -132
  95. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  96. package/dist/src/ui/contexts/KeypressContext.test.js +144 -8
  97. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  98. package/dist/src/ui/contexts/MouseContext.d.ts +21 -0
  99. package/dist/src/ui/contexts/MouseContext.js +89 -0
  100. package/dist/src/ui/contexts/MouseContext.js.map +1 -0
  101. package/dist/src/ui/contexts/MouseContext.test.js +164 -0
  102. package/dist/src/ui/contexts/MouseContext.test.js.map +1 -0
  103. package/dist/src/ui/hooks/slashCommandProcessor.test.js +70 -73
  104. package/dist/src/ui/hooks/slashCommandProcessor.test.js.map +1 -1
  105. package/dist/src/ui/hooks/useGeminiStream.test.js +135 -368
  106. package/dist/src/ui/hooks/useGeminiStream.test.js.map +1 -1
  107. package/dist/src/ui/hooks/useKeypress.test.js +17 -9
  108. package/dist/src/ui/hooks/useKeypress.test.js.map +1 -1
  109. package/dist/src/ui/hooks/useMouse.d.ts +17 -0
  110. package/dist/src/ui/hooks/useMouse.js +27 -0
  111. package/dist/src/ui/hooks/useMouse.js.map +1 -0
  112. package/dist/src/ui/hooks/useMouse.test.d.ts +6 -0
  113. package/dist/src/ui/hooks/useMouse.test.js +57 -0
  114. package/dist/src/ui/hooks/useMouse.test.js.map +1 -0
  115. package/dist/src/ui/hooks/useSelectionList.js +5 -4
  116. package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
  117. package/dist/src/ui/hooks/useSelectionList.test.js +24 -3
  118. package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
  119. package/dist/src/ui/hooks/useToolScheduler.test.js +109 -200
  120. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  121. package/dist/src/ui/keyMatchers.test.js +27 -0
  122. package/dist/src/ui/keyMatchers.test.js.map +1 -1
  123. package/dist/src/ui/themes/no-color.js +1 -0
  124. package/dist/src/ui/themes/no-color.js.map +1 -1
  125. package/dist/src/ui/themes/semantic-tokens.d.ts +1 -0
  126. package/dist/src/ui/themes/semantic-tokens.js +3 -0
  127. package/dist/src/ui/themes/semantic-tokens.js.map +1 -1
  128. package/dist/src/ui/themes/theme.d.ts +1 -0
  129. package/dist/src/ui/themes/theme.js +4 -0
  130. package/dist/src/ui/themes/theme.js.map +1 -1
  131. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +1 -0
  132. package/dist/src/ui/utils/InlineMarkdownRenderer.js +11 -10
  133. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -1
  134. package/dist/src/ui/utils/MarkdownDisplay.js +11 -9
  135. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  136. package/dist/src/ui/utils/input.d.ts +17 -0
  137. package/dist/src/ui/utils/input.js +51 -0
  138. package/dist/src/ui/utils/input.js.map +1 -0
  139. package/dist/src/ui/utils/input.test.d.ts +6 -0
  140. package/dist/src/ui/utils/input.test.js +44 -0
  141. package/dist/src/ui/utils/input.test.js.map +1 -0
  142. package/dist/src/ui/utils/kittyProtocolDetector.js +13 -4
  143. package/dist/src/ui/utils/kittyProtocolDetector.js.map +1 -1
  144. package/dist/src/ui/utils/mouse.d.ts +31 -0
  145. package/dist/src/ui/utils/mouse.js +164 -0
  146. package/dist/src/ui/utils/mouse.js.map +1 -0
  147. package/dist/src/ui/utils/mouse.test.d.ts +6 -0
  148. package/dist/src/ui/utils/mouse.test.js +131 -0
  149. package/dist/src/ui/utils/mouse.test.js.map +1 -0
  150. package/dist/src/utils/events.d.ts +11 -2
  151. package/dist/src/utils/events.js +1 -0
  152. package/dist/src/utils/events.js.map +1 -1
  153. package/dist/src/utils/sandbox.js +16 -18
  154. package/dist/src/utils/sandbox.js.map +1 -1
  155. package/dist/tsconfig.tsbuildinfo +1 -1
  156. package/package.json +4 -4
  157. package/dist/src/config/policy-toml-loader.d.ts +0 -46
  158. package/dist/src/config/policy-toml-loader.js +0 -314
  159. package/dist/src/config/policy-toml-loader.js.map +0 -1
  160. package/dist/src/config/policy-toml-loader.test.js +0 -626
  161. package/dist/src/config/policy-toml-loader.test.js.map +0 -1
  162. package/dist/src/config/policy.test.js +0 -1058
  163. package/dist/src/config/policy.test.js.map +0 -1
  164. /package/dist/src/{config/policy-toml-loader.test.d.ts → ui/commands/policiesCommand.test.d.ts} +0 -0
  165. /package/dist/src/{config/policy.test.d.ts → ui/contexts/MouseContext.test.d.ts} +0 -0
@@ -14,6 +14,16 @@ export const TOGGLE_TYPES = new Set([
14
14
  'boolean',
15
15
  'enum',
16
16
  ]);
17
+ function oneLine(strings, ...values) {
18
+ let result = '';
19
+ for (let i = 0; i < strings.length; i++) {
20
+ result += strings[i];
21
+ if (i < values.length) {
22
+ result += String(values[i]);
23
+ }
24
+ }
25
+ return result.replace(/\s+/g, ' ').trim();
26
+ }
17
27
  export var MergeStrategy;
18
28
  (function (MergeStrategy) {
19
29
  // Replace the old value with the new value. This is the default.
@@ -41,6 +51,10 @@ const SETTINGS_SCHEMA = {
41
51
  description: 'Configuration for MCP servers.',
42
52
  showInDialog: false,
43
53
  mergeStrategy: MergeStrategy.SHALLOW_MERGE,
54
+ additionalProperties: {
55
+ type: 'object',
56
+ ref: 'MCPServerConfig',
57
+ },
44
58
  },
45
59
  general: {
46
60
  type: 'object',
@@ -221,7 +235,7 @@ const SETTINGS_SCHEMA = {
221
235
  category: 'UI',
222
236
  requiresRestart: false,
223
237
  default: undefined,
224
- description: 'The color theme for the UI.',
238
+ description: 'The color theme for the UI. See the CLI themes guide for available options.',
225
239
  showInDialog: false,
226
240
  },
227
241
  customThemes: {
@@ -232,6 +246,10 @@ const SETTINGS_SCHEMA = {
232
246
  default: {},
233
247
  description: 'Custom theme definitions.',
234
248
  showInDialog: false,
249
+ additionalProperties: {
250
+ type: 'object',
251
+ ref: 'CustomTheme',
252
+ },
235
253
  },
236
254
  hideWindowTitle: {
237
255
  type: 'boolean',
@@ -370,14 +388,27 @@ const SETTINGS_SCHEMA = {
370
388
  description: 'Use the entire width of the terminal for output.',
371
389
  showInDialog: true,
372
390
  },
391
+ useAlternateBuffer: {
392
+ type: 'boolean',
393
+ label: 'Use Alternate Screen Buffer',
394
+ category: 'UI',
395
+ requiresRestart: true,
396
+ default: false,
397
+ description: 'Use an alternate screen buffer for the UI, preserving shell history.',
398
+ showInDialog: true,
399
+ },
373
400
  customWittyPhrases: {
374
401
  type: 'array',
375
402
  label: 'Custom Witty Phrases',
376
403
  category: 'UI',
377
404
  requiresRestart: false,
378
405
  default: [],
379
- description: 'Custom witty phrases to display during loading.',
406
+ description: oneLine `
407
+ Custom witty phrases to display during loading.
408
+ When provided, the CLI cycles through these instead of the defaults.
409
+ `,
380
410
  showInDialog: false,
411
+ items: { type: 'string' },
381
412
  },
382
413
  accessibility: {
383
414
  type: 'object',
@@ -467,6 +498,7 @@ const SETTINGS_SCHEMA = {
467
498
  default: undefined,
468
499
  description: 'Telemetry configuration.',
469
500
  showInDialog: false,
501
+ ref: 'TelemetrySettings',
470
502
  },
471
503
  model: {
472
504
  type: 'object',
@@ -501,8 +533,17 @@ const SETTINGS_SCHEMA = {
501
533
  category: 'Model',
502
534
  requiresRestart: false,
503
535
  default: undefined,
504
- description: 'Settings for summarizing tool output.',
536
+ description: oneLine `
537
+ Enables or disables summarization of tool output.
538
+ Configure per-tool token budgets (for example {"run_shell_command": {"tokenBudget": 2000}}).
539
+ Currently only the run_shell_command tool supports summarization.
540
+ `,
505
541
  showInDialog: false,
542
+ additionalProperties: {
543
+ type: 'object',
544
+ description: 'Per-tool summarization settings with an optional tokenBudget.',
545
+ ref: 'SummarizeToolOutputSettings',
546
+ },
506
547
  },
507
548
  compressionThreshold: {
508
549
  type: 'number',
@@ -534,12 +575,13 @@ const SETTINGS_SCHEMA = {
534
575
  showInDialog: false,
535
576
  properties: {
536
577
  fileName: {
537
- type: 'object',
578
+ type: 'string',
538
579
  label: 'Context File Name',
539
580
  category: 'Context',
540
581
  requiresRestart: false,
541
582
  default: undefined,
542
- description: 'The name of the context file.',
583
+ ref: 'StringOrStringArray',
584
+ description: 'The name of the context file or files to load into memory. Accepts either a single string or an array of strings.',
543
585
  showInDialog: false,
544
586
  },
545
587
  importFormat: {
@@ -566,8 +608,12 @@ const SETTINGS_SCHEMA = {
566
608
  category: 'Context',
567
609
  requiresRestart: false,
568
610
  default: [],
569
- description: 'Additional directories to include in the workspace context. Missing directories will be skipped with a warning.',
611
+ description: oneLine `
612
+ Additional directories to include in the workspace context.
613
+ Missing directories will be skipped with a warning.
614
+ `,
570
615
  showInDialog: false,
616
+ items: { type: 'string' },
571
617
  mergeStrategy: MergeStrategy.CONCAT,
572
618
  },
573
619
  loadMemoryFromIncludeDirectories: {
@@ -576,7 +622,10 @@ const SETTINGS_SCHEMA = {
576
622
  category: 'Context',
577
623
  requiresRestart: false,
578
624
  default: false,
579
- description: 'Whether to load memory files from include directories.',
625
+ description: oneLine `
626
+ Controls how /memory refresh loads GEMINI.md files.
627
+ When true, include directories are scanned; when false, only the current directory is used.
628
+ `,
580
629
  showInDialog: true,
581
630
  },
582
631
  fileFiltering: {
@@ -612,7 +661,9 @@ const SETTINGS_SCHEMA = {
612
661
  category: 'Context',
613
662
  requiresRestart: true,
614
663
  default: true,
615
- description: 'Enable recursive file search functionality',
664
+ description: oneLine `
665
+ Enable recursive file search functionality when completing @ references in the prompt.
666
+ `,
616
667
  showInDialog: true,
617
668
  },
618
669
  disableFuzzySearch: {
@@ -638,12 +689,16 @@ const SETTINGS_SCHEMA = {
638
689
  showInDialog: false,
639
690
  properties: {
640
691
  sandbox: {
641
- type: 'object',
692
+ type: 'string',
642
693
  label: 'Sandbox',
643
694
  category: 'Tools',
644
695
  requiresRestart: true,
645
696
  default: undefined,
646
- description: 'Sandbox execution environment (can be a boolean or a path string).',
697
+ ref: 'BooleanOrString',
698
+ description: oneLine `
699
+ Sandbox execution environment.
700
+ Set to a boolean to enable or disable the sandbox, or provide a string path to a sandbox profile.
701
+ `,
647
702
  showInDialog: false,
648
703
  },
649
704
  shell: {
@@ -661,7 +716,10 @@ const SETTINGS_SCHEMA = {
661
716
  category: 'Tools',
662
717
  requiresRestart: true,
663
718
  default: true,
664
- description: 'Use node-pty for an interactive shell experience. Fallback to child_process still applies.',
719
+ description: oneLine `
720
+ Use node-pty for an interactive shell experience.
721
+ Fallback to child_process still applies.
722
+ `,
665
723
  showInDialog: true,
666
724
  },
667
725
  pager: {
@@ -690,7 +748,9 @@ const SETTINGS_SCHEMA = {
690
748
  category: 'Tools',
691
749
  requiresRestart: false,
692
750
  default: false,
693
- description: 'Automatically accept and execute tool calls that are considered safe (e.g., read-only operations).',
751
+ description: oneLine `
752
+ Automatically accept and execute tool calls that are considered safe (e.g., read-only operations).
753
+ `,
694
754
  showInDialog: true,
695
755
  },
696
756
  core: {
@@ -699,8 +759,12 @@ const SETTINGS_SCHEMA = {
699
759
  category: 'Tools',
700
760
  requiresRestart: true,
701
761
  default: undefined,
702
- description: 'Paths to core tool definitions.',
762
+ description: oneLine `
763
+ Restrict the set of built-in tools with an allowlist.
764
+ Match semantics mirror tools.allowed; see the built-in tools documentation for available names.
765
+ `,
703
766
  showInDialog: false,
767
+ items: { type: 'string' },
704
768
  },
705
769
  allowed: {
706
770
  type: 'array',
@@ -708,8 +772,13 @@ const SETTINGS_SCHEMA = {
708
772
  category: 'Advanced',
709
773
  requiresRestart: true,
710
774
  default: undefined,
711
- description: 'A list of tool names that will bypass the confirmation dialog.',
775
+ description: oneLine `
776
+ Tool names that bypass the confirmation dialog.
777
+ Useful for trusted commands (for example ["run_shell_command(git)", "run_shell_command(npm test)"]).
778
+ See shell tool command restrictions for matching details.
779
+ `,
712
780
  showInDialog: false,
781
+ items: { type: 'string' },
713
782
  },
714
783
  exclude: {
715
784
  type: 'array',
@@ -719,6 +788,7 @@ const SETTINGS_SCHEMA = {
719
788
  default: undefined,
720
789
  description: 'Tool names to exclude from discovery.',
721
790
  showInDialog: false,
791
+ items: { type: 'string' },
722
792
  mergeStrategy: MergeStrategy.UNION,
723
793
  },
724
794
  discoveryCommand: {
@@ -736,7 +806,10 @@ const SETTINGS_SCHEMA = {
736
806
  category: 'Tools',
737
807
  requiresRestart: true,
738
808
  default: undefined,
739
- description: 'Command to run for tool calls.',
809
+ description: oneLine `
810
+ Defines a custom shell command for invoking discovered tools.
811
+ The command must take the tool name as the first argument, read JSON arguments from stdin, and emit JSON results on stdout.
812
+ `,
740
813
  showInDialog: false,
741
814
  },
742
815
  useRipgrep: {
@@ -781,9 +854,21 @@ const SETTINGS_SCHEMA = {
781
854
  category: 'Tools',
782
855
  requiresRestart: true,
783
856
  default: false,
784
- description: 'Enable policy-based tool confirmation via message bus integration. When enabled, tools will automatically respect policy engine decisions (ALLOW/DENY/ASK_USER) without requiring individual tool implementations.',
857
+ description: oneLine `
858
+ Enable policy-based tool confirmation via message bus integration.
859
+ When enabled, tools automatically respect policy engine decisions (ALLOW/DENY/ASK_USER) without requiring individual tool implementations.
860
+ `,
785
861
  showInDialog: true,
786
862
  },
863
+ enableHooks: {
864
+ type: 'boolean',
865
+ label: 'Enable Hooks System',
866
+ category: 'Advanced',
867
+ requiresRestart: true,
868
+ default: false,
869
+ description: 'Enable the hooks system for intercepting and customizing Gemini CLI behavior. When enabled, hooks configured in settings will execute at appropriate lifecycle events (BeforeTool, AfterTool, BeforeModel, etc.). Requires MessageBus integration.',
870
+ showInDialog: false,
871
+ },
787
872
  },
788
873
  },
789
874
  mcp: {
@@ -812,6 +897,7 @@ const SETTINGS_SCHEMA = {
812
897
  default: undefined,
813
898
  description: 'A list of MCP servers to allow.',
814
899
  showInDialog: false,
900
+ items: { type: 'string' },
815
901
  },
816
902
  excluded: {
817
903
  type: 'array',
@@ -821,6 +907,7 @@ const SETTINGS_SCHEMA = {
821
907
  default: undefined,
822
908
  description: 'A list of MCP servers to exclude.',
823
909
  showInDialog: false,
910
+ items: { type: 'string' },
824
911
  },
825
912
  },
826
913
  },
@@ -838,7 +925,7 @@ const SETTINGS_SCHEMA = {
838
925
  label: 'Use Write Todos',
839
926
  category: 'Advanced',
840
927
  requiresRestart: false,
841
- default: false,
928
+ default: true,
842
929
  description: 'Enable the write_todos_list tool.',
843
930
  showInDialog: false,
844
931
  },
@@ -955,6 +1042,7 @@ const SETTINGS_SCHEMA = {
955
1042
  default: ['DEBUG', 'DEBUG_MODE'],
956
1043
  description: 'Environment variables to exclude from project context.',
957
1044
  showInDialog: false,
1045
+ items: { type: 'string' },
958
1046
  mergeStrategy: MergeStrategy.UNION,
959
1047
  },
960
1048
  bugCommand: {
@@ -965,6 +1053,7 @@ const SETTINGS_SCHEMA = {
965
1053
  default: undefined,
966
1054
  description: 'Configuration for the bug report command.',
967
1055
  showInDialog: false,
1056
+ ref: 'BugCommandSettings',
968
1057
  },
969
1058
  },
970
1059
  },
@@ -1018,7 +1107,7 @@ const SETTINGS_SCHEMA = {
1018
1107
  label: 'Enable Codebase Investigator',
1019
1108
  category: 'Experimental',
1020
1109
  requiresRestart: true,
1021
- default: false,
1110
+ default: true,
1022
1111
  description: 'Enable the Codebase Investigator agent.',
1023
1112
  showInDialog: true,
1024
1113
  },
@@ -1027,7 +1116,7 @@ const SETTINGS_SCHEMA = {
1027
1116
  label: 'Codebase Investigator Max Num Turns',
1028
1117
  category: 'Experimental',
1029
1118
  requiresRestart: true,
1030
- default: 15,
1119
+ default: 10,
1031
1120
  description: 'Maximum number of turns for the Codebase Investigator agent.',
1032
1121
  showInDialog: true,
1033
1122
  },
@@ -1036,7 +1125,7 @@ const SETTINGS_SCHEMA = {
1036
1125
  label: 'Max Time (Minutes)',
1037
1126
  category: 'Experimental',
1038
1127
  requiresRestart: true,
1039
- default: 5,
1128
+ default: 3,
1040
1129
  description: 'Maximum time for the Codebase Investigator agent (in minutes).',
1041
1130
  showInDialog: false,
1042
1131
  },
@@ -1045,7 +1134,7 @@ const SETTINGS_SCHEMA = {
1045
1134
  label: 'Thinking Budget',
1046
1135
  category: 'Experimental',
1047
1136
  requiresRestart: true,
1048
- default: -1,
1137
+ default: 8192,
1049
1138
  description: 'The thinking budget for the Codebase Investigator agent.',
1050
1139
  showInDialog: false,
1051
1140
  },
@@ -1079,6 +1168,7 @@ const SETTINGS_SCHEMA = {
1079
1168
  default: [],
1080
1169
  description: 'List of disabled extensions.',
1081
1170
  showInDialog: false,
1171
+ items: { type: 'string' },
1082
1172
  mergeStrategy: MergeStrategy.UNION,
1083
1173
  },
1084
1174
  workspacesWithMigrationNudge: {
@@ -1089,10 +1179,270 @@ const SETTINGS_SCHEMA = {
1089
1179
  default: [],
1090
1180
  description: 'List of workspaces for which the migration nudge has been shown.',
1091
1181
  showInDialog: false,
1182
+ items: { type: 'string' },
1092
1183
  mergeStrategy: MergeStrategy.UNION,
1093
1184
  },
1094
1185
  },
1095
1186
  },
1187
+ hooks: {
1188
+ type: 'object',
1189
+ label: 'Hooks',
1190
+ category: 'Advanced',
1191
+ requiresRestart: false,
1192
+ default: {},
1193
+ description: 'Hook configurations for intercepting and customizing agent behavior.',
1194
+ showInDialog: false,
1195
+ mergeStrategy: MergeStrategy.SHALLOW_MERGE,
1196
+ },
1197
+ };
1198
+ export const SETTINGS_SCHEMA_DEFINITIONS = {
1199
+ MCPServerConfig: {
1200
+ type: 'object',
1201
+ description: 'Definition of a Model Context Protocol (MCP) server configuration.',
1202
+ additionalProperties: false,
1203
+ properties: {
1204
+ command: {
1205
+ type: 'string',
1206
+ description: 'Executable invoked for stdio transport.',
1207
+ },
1208
+ args: {
1209
+ type: 'array',
1210
+ description: 'Command-line arguments for the stdio transport command.',
1211
+ items: { type: 'string' },
1212
+ },
1213
+ env: {
1214
+ type: 'object',
1215
+ description: 'Environment variables to set for the server process.',
1216
+ additionalProperties: { type: 'string' },
1217
+ },
1218
+ cwd: {
1219
+ type: 'string',
1220
+ description: 'Working directory for the server process.',
1221
+ },
1222
+ url: {
1223
+ type: 'string',
1224
+ description: 'SSE transport URL.',
1225
+ },
1226
+ httpUrl: {
1227
+ type: 'string',
1228
+ description: 'Streaming HTTP transport URL.',
1229
+ },
1230
+ headers: {
1231
+ type: 'object',
1232
+ description: 'Additional HTTP headers sent to the server.',
1233
+ additionalProperties: { type: 'string' },
1234
+ },
1235
+ tcp: {
1236
+ type: 'string',
1237
+ description: 'TCP address for websocket transport.',
1238
+ },
1239
+ timeout: {
1240
+ type: 'number',
1241
+ description: 'Timeout in milliseconds for MCP requests.',
1242
+ },
1243
+ trust: {
1244
+ type: 'boolean',
1245
+ description: 'Marks the server as trusted. Trusted servers may gain additional capabilities.',
1246
+ },
1247
+ description: {
1248
+ type: 'string',
1249
+ description: 'Human-readable description of the server.',
1250
+ },
1251
+ includeTools: {
1252
+ type: 'array',
1253
+ description: 'Subset of tools that should be enabled for this server. When omitted all tools are enabled.',
1254
+ items: { type: 'string' },
1255
+ },
1256
+ excludeTools: {
1257
+ type: 'array',
1258
+ description: 'Tools that should be disabled for this server even if exposed.',
1259
+ items: { type: 'string' },
1260
+ },
1261
+ extension: {
1262
+ type: 'object',
1263
+ description: 'Metadata describing the Gemini CLI extension that owns this MCP server.',
1264
+ additionalProperties: { type: ['string', 'boolean', 'number'] },
1265
+ },
1266
+ oauth: {
1267
+ type: 'object',
1268
+ description: 'OAuth configuration for authenticating with the server.',
1269
+ additionalProperties: true,
1270
+ },
1271
+ authProviderType: {
1272
+ type: 'string',
1273
+ description: 'Authentication provider used for acquiring credentials (for example `dynamic_discovery`).',
1274
+ enum: [
1275
+ 'dynamic_discovery',
1276
+ 'google_credentials',
1277
+ 'service_account_impersonation',
1278
+ ],
1279
+ },
1280
+ targetAudience: {
1281
+ type: 'string',
1282
+ description: 'OAuth target audience (CLIENT_ID.apps.googleusercontent.com).',
1283
+ },
1284
+ targetServiceAccount: {
1285
+ type: 'string',
1286
+ description: 'Service account email to impersonate (name@project.iam.gserviceaccount.com).',
1287
+ },
1288
+ },
1289
+ },
1290
+ TelemetrySettings: {
1291
+ type: 'object',
1292
+ description: 'Telemetry configuration for Gemini CLI.',
1293
+ additionalProperties: false,
1294
+ properties: {
1295
+ enabled: {
1296
+ type: 'boolean',
1297
+ description: 'Enables telemetry emission.',
1298
+ },
1299
+ target: {
1300
+ type: 'string',
1301
+ description: 'Telemetry destination (for example `stderr`, `stdout`, or `otlp`).',
1302
+ },
1303
+ otlpEndpoint: {
1304
+ type: 'string',
1305
+ description: 'Endpoint for OTLP exporters.',
1306
+ },
1307
+ otlpProtocol: {
1308
+ type: 'string',
1309
+ description: 'Protocol for OTLP exporters.',
1310
+ enum: ['grpc', 'http'],
1311
+ },
1312
+ logPrompts: {
1313
+ type: 'boolean',
1314
+ description: 'Whether prompts are logged in telemetry payloads.',
1315
+ },
1316
+ outfile: {
1317
+ type: 'string',
1318
+ description: 'File path for writing telemetry output.',
1319
+ },
1320
+ useCollector: {
1321
+ type: 'boolean',
1322
+ description: 'Whether to forward telemetry to an OTLP collector.',
1323
+ },
1324
+ },
1325
+ },
1326
+ BugCommandSettings: {
1327
+ type: 'object',
1328
+ description: 'Configuration for the bug report helper command.',
1329
+ additionalProperties: false,
1330
+ properties: {
1331
+ urlTemplate: {
1332
+ type: 'string',
1333
+ description: 'Template used to open a bug report URL. Variables in the template are populated at runtime.',
1334
+ },
1335
+ },
1336
+ required: ['urlTemplate'],
1337
+ },
1338
+ SummarizeToolOutputSettings: {
1339
+ type: 'object',
1340
+ description: 'Controls summarization behavior for individual tools. All properties are optional.',
1341
+ additionalProperties: false,
1342
+ properties: {
1343
+ tokenBudget: {
1344
+ type: 'number',
1345
+ description: 'Maximum number of tokens used when summarizing tool output.',
1346
+ },
1347
+ },
1348
+ },
1349
+ CustomTheme: {
1350
+ type: 'object',
1351
+ description: 'Custom theme definition used for styling Gemini CLI output. Colors are provided as hex strings or named ANSI colors.',
1352
+ additionalProperties: false,
1353
+ properties: {
1354
+ type: {
1355
+ type: 'string',
1356
+ enum: ['custom'],
1357
+ default: 'custom',
1358
+ },
1359
+ name: {
1360
+ type: 'string',
1361
+ description: 'Theme display name.',
1362
+ },
1363
+ text: {
1364
+ type: 'object',
1365
+ additionalProperties: false,
1366
+ properties: {
1367
+ primary: { type: 'string' },
1368
+ secondary: { type: 'string' },
1369
+ link: { type: 'string' },
1370
+ accent: { type: 'string' },
1371
+ },
1372
+ },
1373
+ background: {
1374
+ type: 'object',
1375
+ additionalProperties: false,
1376
+ properties: {
1377
+ primary: { type: 'string' },
1378
+ diff: {
1379
+ type: 'object',
1380
+ additionalProperties: false,
1381
+ properties: {
1382
+ added: { type: 'string' },
1383
+ removed: { type: 'string' },
1384
+ },
1385
+ },
1386
+ },
1387
+ },
1388
+ border: {
1389
+ type: 'object',
1390
+ additionalProperties: false,
1391
+ properties: {
1392
+ default: { type: 'string' },
1393
+ focused: { type: 'string' },
1394
+ },
1395
+ },
1396
+ ui: {
1397
+ type: 'object',
1398
+ additionalProperties: false,
1399
+ properties: {
1400
+ comment: { type: 'string' },
1401
+ symbol: { type: 'string' },
1402
+ gradient: {
1403
+ type: 'array',
1404
+ items: { type: 'string' },
1405
+ },
1406
+ },
1407
+ },
1408
+ status: {
1409
+ type: 'object',
1410
+ additionalProperties: false,
1411
+ properties: {
1412
+ error: { type: 'string' },
1413
+ success: { type: 'string' },
1414
+ warning: { type: 'string' },
1415
+ },
1416
+ },
1417
+ Background: { type: 'string' },
1418
+ Foreground: { type: 'string' },
1419
+ LightBlue: { type: 'string' },
1420
+ AccentBlue: { type: 'string' },
1421
+ AccentPurple: { type: 'string' },
1422
+ AccentCyan: { type: 'string' },
1423
+ AccentGreen: { type: 'string' },
1424
+ AccentYellow: { type: 'string' },
1425
+ AccentRed: { type: 'string' },
1426
+ DiffAdded: { type: 'string' },
1427
+ DiffRemoved: { type: 'string' },
1428
+ Comment: { type: 'string' },
1429
+ Gray: { type: 'string' },
1430
+ DarkGray: { type: 'string' },
1431
+ GradientColors: {
1432
+ type: 'array',
1433
+ items: { type: 'string' },
1434
+ },
1435
+ },
1436
+ required: ['type', 'name'],
1437
+ },
1438
+ StringOrStringArray: {
1439
+ description: 'Accepts either a single string or an array of strings.',
1440
+ anyOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
1441
+ },
1442
+ BooleanOrString: {
1443
+ description: 'Accepts either a boolean flag or a string command name.',
1444
+ anyOf: [{ type: 'boolean' }, { type: 'string' }],
1445
+ },
1096
1446
  };
1097
1447
  export function getSettingsSchema() {
1098
1448
  return SETTINGS_SCHEMA;