@google/gemini-cli 0.35.0-preview.1 → 0.35.0-preview.2

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 (31) hide show
  1. package/bundle/{chunk-RIKAIXXN.js → chunk-5OVDZKPV.js} +6 -6
  2. package/bundle/{chunk-FKGF3664.js → chunk-6AQAEYFC.js} +5315 -9974
  3. package/bundle/{chunk-OK6A2T3J.js → chunk-C2LINL7G.js} +14 -12
  4. package/bundle/{chunk-OVO7PV7Z.js → chunk-ELVZ5MKI.js} +4 -4
  5. package/bundle/{chunk-DHZSW3D5.js → chunk-HYF34ISK.js} +4 -4
  6. package/bundle/{chunk-FIQWQZVG.js → chunk-QO53VEHI.js} +15 -12
  7. package/bundle/{chunk-7JZWJYL2.js → chunk-SCIFYSWM.js} +4 -4
  8. package/bundle/{chunk-J7ZVHCWL.js → chunk-TYZCRVGB.js} +70 -58
  9. package/bundle/chunk-WTYAEXC3.js +325893 -0
  10. package/bundle/chunk-WXXNCSKU.js +92840 -0
  11. package/bundle/{core-OSNLJAKB.js → core-ZWMLWHG7.js} +2 -2
  12. package/bundle/{devtoolsService-UPY6AYM7.js → devtoolsService-DH7MKZL2.js} +3 -3
  13. package/bundle/{devtoolsService-YJFR2ZTU.js → devtoolsService-EVTQ32UO.js} +3 -3
  14. package/bundle/{devtoolsService-CH2PM4E2.js → devtoolsService-FPFZEEVK.js} +5 -4
  15. package/bundle/devtoolsService-XMVPJFZ7.js +855 -0
  16. package/bundle/{core-YBLRHI5E.js → dist-6LCHGUBD.js} +2 -2
  17. package/bundle/{dist-PQCTLJ67.js → dist-AWPSKKKO.js} +2 -2
  18. package/bundle/dist-WOQEPX5R.js +1781 -0
  19. package/bundle/gemini.js +7 -7
  20. package/bundle/{interactiveCli-SIJB4G3Q.js → interactiveCli-7H3T4KJF.js} +4 -4
  21. package/bundle/{interactiveCli-AKIKCHLF.js → interactiveCli-E3DWTWRM.js} +239 -222
  22. package/bundle/{interactiveCli-3JVKXF42.js → interactiveCli-N4QW3NCZ.js} +4 -4
  23. package/bundle/interactiveCli-Z4Y6XB7M.js +48702 -0
  24. package/bundle/{memoryDiscovery-2RH76CMO.js → memoryDiscovery-7LUUOJNM.js} +1 -1
  25. package/bundle/{memoryDiscovery-P6SEGMWA.js → memoryDiscovery-RRX6QF4Y.js} +1 -1
  26. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  27. package/bundle/{oauth2-provider-G4RXUPFH.js → oauth2-provider-CPMX7ITW.js} +2 -2
  28. package/bundle/{oauth2-provider-ZZIJ6OXB.js → oauth2-provider-IU6STKL7.js} +2 -2
  29. package/bundle/{oauth2-provider-N6KBVMX3.js → oauth2-provider-LTBDSRHY.js} +39 -73
  30. package/bundle/oauth2-provider-ZWWMTBET.js +238 -0
  31. package/package.json +1 -1
@@ -1,7 +1,9 @@
1
1
  const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
2
2
  import {
3
3
  AsyncFzf,
4
+ AuthType,
4
5
  Config,
6
+ CoreToolCallStatus,
5
7
  DEFAULT_MODEL_CONFIGS,
6
8
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
7
9
  ExitCodes,
@@ -13,17 +15,26 @@ import {
13
15
  ExtensionUninstallEvent,
14
16
  ExtensionUpdateEvent,
15
17
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
18
+ HookType,
19
+ IDEConnectionStatus,
16
20
  INITIAL_HISTORY_LENGTH,
17
21
  IdeClient,
18
22
  IdeConnectionEvent,
23
+ IdeConnectionType,
24
+ IntegrityDataStatus,
19
25
  KeychainTokenStorage,
26
+ LlmRole,
27
+ MCPDiscoveryState,
20
28
  MCPOAuthTokenStorage,
29
+ MCPServerStatus,
21
30
  MaxBufferError,
22
31
  ModelSlashCommandEvent,
23
32
  ProjectIdRequiredError,
24
33
  ReadManyFilesTool,
25
34
  RewindEvent,
26
35
  SESSION_FILE_PREFIX,
36
+ SessionEndReason,
37
+ SessionStartSource,
27
38
  ShellExecutionService,
28
39
  StartSessionEvent,
29
40
  TOOL_OUTPUTS_DIR,
@@ -150,7 +161,7 @@ import {
150
161
  tokenLimit,
151
162
  uiTelemetryService,
152
163
  yellowBright
153
- } from "./chunk-OVO7PV7Z.js";
164
+ } from "./chunk-5OVDZKPV.js";
154
165
  import {
155
166
  require_undici
156
167
  } from "./chunk-37ZTTFQF.js";
@@ -160,6 +171,7 @@ import {
160
171
  DiscoveredMCPTool,
161
172
  FatalConfigError,
162
173
  GEMINI_DIR,
174
+ PolicyDecision,
163
175
  REFERENCE_CONTENT_END,
164
176
  REFERENCE_CONTENT_START,
165
177
  Storage,
@@ -181,7 +193,7 @@ import {
181
193
  shortenPath,
182
194
  tildeifyPath,
183
195
  unescapePath
184
- } from "./chunk-FIQWQZVG.js";
196
+ } from "./chunk-C2LINL7G.js";
185
197
  import {
186
198
  __commonJS,
187
199
  __export,
@@ -43454,19 +43466,19 @@ var require_cli_spinners = __commonJS({
43454
43466
  var import_react = __toESM(require_react(), 1);
43455
43467
  function mapCoreStatusToDisplayStatus(coreStatus) {
43456
43468
  switch (coreStatus) {
43457
- case "validating" /* Validating */:
43469
+ case CoreToolCallStatus.Validating:
43458
43470
  return "Pending" /* Pending */;
43459
- case "awaiting_approval" /* AwaitingApproval */:
43471
+ case CoreToolCallStatus.AwaitingApproval:
43460
43472
  return "Confirming" /* Confirming */;
43461
- case "executing" /* Executing */:
43473
+ case CoreToolCallStatus.Executing:
43462
43474
  return "Executing" /* Executing */;
43463
- case "success" /* Success */:
43475
+ case CoreToolCallStatus.Success:
43464
43476
  return "Success" /* Success */;
43465
- case "cancelled" /* Cancelled */:
43477
+ case CoreToolCallStatus.Cancelled:
43466
43478
  return "Canceled" /* Canceled */;
43467
- case "error" /* Error */:
43479
+ case CoreToolCallStatus.Error:
43468
43480
  return "Error" /* Error */;
43469
- case "scheduled" /* Scheduled */:
43481
+ case CoreToolCallStatus.Scheduled:
43470
43482
  return "Pending" /* Pending */;
43471
43483
  default:
43472
43484
  return checkExhaustive(coreStatus);
@@ -55580,7 +55592,7 @@ function convertSessionToHistoryFormats(messages) {
55580
55592
  name: tool.displayName || tool.name,
55581
55593
  description: tool.description || "",
55582
55594
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
55583
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
55595
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
55584
55596
  resultDisplay: tool.resultDisplay,
55585
55597
  confirmationDetails: void 0
55586
55598
  }))
@@ -59106,8 +59118,8 @@ var LoadedSettings = class {
59106
59118
  // React will pass a listener fn into this subscribe fn
59107
59119
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
59108
59120
  subscribe(listener) {
59109
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
59110
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
59121
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
59122
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
59111
59123
  }
59112
59124
  getSnapshot() {
59113
59125
  return this._snapshot;
@@ -62799,7 +62811,7 @@ var import_react33 = __toESM(require_react(), 1);
62799
62811
  function useIdeTrustListener() {
62800
62812
  const settings = useSettings();
62801
62813
  const [connectionStatus, setConnectionStatus] = (0, import_react33.useState)(
62802
- "disconnected" /* Disconnected */
62814
+ IDEConnectionStatus.Disconnected
62803
62815
  );
62804
62816
  const previousTrust = (0, import_react33.useRef)(void 0);
62805
62817
  const [restartReason, setRestartReason] = (0, import_react33.useState)("NONE");
@@ -62829,7 +62841,7 @@ function useIdeTrustListener() {
62829
62841
  };
62830
62842
  }, []);
62831
62843
  const getSnapshot = () => {
62832
- if (connectionStatus !== "connected" /* Connected */) {
62844
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
62833
62845
  return void 0;
62834
62846
  }
62835
62847
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -67958,7 +67970,7 @@ Would you like to attempt to install via "git clone" instead?`
67958
67970
  newExtensionConfig.version,
67959
67971
  previousExtensionConfig.version,
67960
67972
  installMetadata.type,
67961
- "success" /* Success */
67973
+ CoreToolCallStatus.Success
67962
67974
  )
67963
67975
  );
67964
67976
  if (newExtensionName !== previousName) {
@@ -67981,7 +67993,7 @@ Would you like to attempt to install via "git clone" instead?`
67981
67993
  getExtensionId(newExtensionConfig, installMetadata),
67982
67994
  newExtensionConfig.version,
67983
67995
  installMetadata.type,
67984
- "success" /* Success */
67996
+ CoreToolCallStatus.Success
67985
67997
  )
67986
67998
  );
67987
67999
  await this.enableExtension(
@@ -68014,7 +68026,7 @@ Would you like to attempt to install via "git clone" instead?`
68014
68026
  newExtensionConfig?.version ?? "",
68015
68027
  previousExtensionConfig.version,
68016
68028
  installMetadata.type,
68017
- "error" /* Error */
68029
+ CoreToolCallStatus.Error
68018
68030
  )
68019
68031
  );
68020
68032
  } else {
@@ -68026,7 +68038,7 @@ Would you like to attempt to install via "git clone" instead?`
68026
68038
  extensionId ?? "",
68027
68039
  newExtensionConfig?.version ?? "",
68028
68040
  installMetadata.type,
68029
- "error" /* Error */
68041
+ CoreToolCallStatus.Error
68030
68042
  )
68031
68043
  );
68032
68044
  }
@@ -68057,7 +68069,7 @@ Would you like to attempt to install via "git clone" instead?`
68057
68069
  extension.name,
68058
68070
  hashValue(extension.name),
68059
68071
  extension.id,
68060
- "success" /* Success */
68072
+ CoreToolCallStatus.Success
68061
68073
  )
68062
68074
  );
68063
68075
  }
@@ -68327,7 +68339,7 @@ Would you like to attempt to install via "git clone" instead?`
68327
68339
  if (eventHooks) {
68328
68340
  for (const definition of eventHooks) {
68329
68341
  for (const hook of definition.hooks) {
68330
- if (hook.type === "command" /* Command */) {
68342
+ if (hook.type === HookType.Command) {
68331
68343
  hook.env = { ...hook.env, ...hookEnv };
68332
68344
  }
68333
68345
  }
@@ -68948,7 +68960,7 @@ async function readMcpResources(resourceParts, config, signal) {
68948
68960
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
68949
68961
  name: `resources/read (${resource.serverName})`,
68950
68962
  description: resource.uri,
68951
- status: "success" /* Success */,
68963
+ status: CoreToolCallStatus.Success,
68952
68964
  isClientInitiated: true,
68953
68965
  resultDisplay: `Successfully read resource ${resource.uri}`,
68954
68966
  confirmationDetails: void 0
@@ -68963,7 +68975,7 @@ async function readMcpResources(resourceParts, config, signal) {
68963
68975
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
68964
68976
  name: `resources/read (${resource.serverName})`,
68965
68977
  description: resource.uri,
68966
- status: "error" /* Error */,
68978
+ status: CoreToolCallStatus.Error,
68967
68979
  isClientInitiated: true,
68968
68980
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
68969
68981
  confirmationDetails: void 0
@@ -68988,7 +69000,7 @@ Content from @${result.uri}:
68988
69000
  }
68989
69001
  if (hasError) {
68990
69002
  const firstError = displays.find(
68991
- (d) => d.status === "error" /* Error */
69003
+ (d) => d.status === CoreToolCallStatus.Error
68992
69004
  );
68993
69005
  return {
68994
69006
  parts: [],
@@ -69024,7 +69036,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
69024
69036
  callId: `client-read-${userMessageTimestamp}`,
69025
69037
  name: readManyFilesTool.displayName,
69026
69038
  description: invocation.getDescription(),
69027
- status: "success" /* Success */,
69039
+ status: CoreToolCallStatus.Success,
69028
69040
  isClientInitiated: true,
69029
69041
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
69030
69042
  confirmationDetails: void 0
@@ -69071,7 +69083,7 @@ Content from @${displayPath}:
69071
69083
  callId: `client-read-${userMessageTimestamp}`,
69072
69084
  name: readManyFilesTool.displayName,
69073
69085
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
69074
- status: "error" /* Error */,
69086
+ status: CoreToolCallStatus.Error,
69075
69087
  isClientInitiated: true,
69076
69088
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
69077
69089
  confirmationDetails: void 0
@@ -77274,7 +77286,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
77274
77286
  if (wasRaw) {
77275
77287
  setRawMode?.(true);
77276
77288
  }
77277
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
77289
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
77278
77290
  }
77279
77291
  }
77280
77292
 
@@ -79953,7 +79965,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
79953
79965
  extension.name,
79954
79966
  installMetadata
79955
79967
  );
79956
- if (status === "invalid" /* INVALID */) {
79968
+ if (status === IntegrityDataStatus.INVALID) {
79957
79969
  throw new Error("Extension integrity cannot be verified");
79958
79970
  }
79959
79971
  } catch (e) {
@@ -80788,7 +80800,7 @@ async function initializeApp(config, settings) {
80788
80800
  if (config.getIdeMode()) {
80789
80801
  const ideClient = await IdeClient.getInstance();
80790
80802
  await ideClient.connect();
80791
- logIdeConnection(config, new IdeConnectionEvent("start" /* START */));
80803
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.START));
80792
80804
  }
80793
80805
  return {
80794
80806
  authError,
@@ -80802,16 +80814,16 @@ async function initializeApp(config, settings) {
80802
80814
  // packages/cli/src/config/auth.ts
80803
80815
  function validateAuthMethod(authMethod) {
80804
80816
  loadEnvironment(loadSettings().merged, process.cwd());
80805
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
80817
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
80806
80818
  return null;
80807
80819
  }
80808
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
80820
+ if (authMethod === AuthType.USE_GEMINI) {
80809
80821
  if (!process.env["GEMINI_API_KEY"]) {
80810
80822
  return "When using Gemini API, you must specify the GEMINI_API_KEY environment variable.\nUpdate your environment and try again (no reload needed if using .env)!";
80811
80823
  }
80812
80824
  return null;
80813
80825
  }
80814
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
80826
+ if (authMethod === AuthType.USE_VERTEX_AI) {
80815
80827
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
80816
80828
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
80817
80829
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -82763,7 +82775,7 @@ var authCommand = {
82763
82775
  import process29 from "node:process";
82764
82776
 
82765
82777
  // packages/cli/src/generated/git-commit.ts
82766
- var GIT_COMMIT_INFO = "2f90b4653";
82778
+ var GIT_COMMIT_INFO = "7f8fb6f29";
82767
82779
 
82768
82780
  // packages/cli/src/ui/utils/historyExportUtils.ts
82769
82781
  import * as fsPromises2 from "node:fs/promises";
@@ -83264,7 +83276,7 @@ var clearCommand = {
83264
83276
  const config = context.services.config;
83265
83277
  const hookSystem = config?.getHookSystem();
83266
83278
  if (hookSystem) {
83267
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
83279
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
83268
83280
  }
83269
83281
  config?.injectionService.clear();
83270
83282
  let newSessionId;
@@ -83280,7 +83292,7 @@ var clearCommand = {
83280
83292
  }
83281
83293
  let result;
83282
83294
  if (hookSystem) {
83283
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
83295
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
83284
83296
  }
83285
83297
  await new Promise((resolve9) => setImmediate(resolve9));
83286
83298
  if (config) {
@@ -87756,12 +87768,12 @@ import path33 from "node:path";
87756
87768
  function getIdeStatusMessage(ideClient) {
87757
87769
  const connection = ideClient.getConnectionStatus();
87758
87770
  switch (connection.status) {
87759
- case "connected" /* Connected */:
87771
+ case IDEConnectionStatus.Connected:
87760
87772
  return {
87761
87773
  messageType: "info",
87762
87774
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
87763
87775
  };
87764
- case "connecting" /* Connecting */:
87776
+ case IDEConnectionStatus.Connecting:
87765
87777
  return {
87766
87778
  messageType: "info",
87767
87779
  content: `\u{1F7E1} Connecting...`
@@ -87802,7 +87814,7 @@ ${infoMessage}`;
87802
87814
  async function getIdeStatusMessageWithFiles(ideClient) {
87803
87815
  const connection = ideClient.getConnectionStatus();
87804
87816
  switch (connection.status) {
87805
- case "connected" /* Connected */: {
87817
+ case IDEConnectionStatus.Connected: {
87806
87818
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
87807
87819
  const context = ideContextStore.get();
87808
87820
  const openFiles = context?.workspaceState?.openFiles;
@@ -87814,7 +87826,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
87814
87826
  content
87815
87827
  };
87816
87828
  }
87817
- case "connecting" /* Connecting */:
87829
+ case IDEConnectionStatus.Connecting:
87818
87830
  return {
87819
87831
  messageType: "info",
87820
87832
  content: `\u{1F7E1} Connecting...`
@@ -87836,7 +87848,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
87836
87848
  const ideClient = await IdeClient.getInstance();
87837
87849
  if (value) {
87838
87850
  await ideClient.connect(options);
87839
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
87851
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
87840
87852
  } else {
87841
87853
  await ideClient.disconnect();
87842
87854
  }
@@ -87920,7 +87932,7 @@ var ideCommand = async () => {
87920
87932
  await setIdeModeAndSyncConnection(context.services.config, true, {
87921
87933
  logToConsole: false
87922
87934
  });
87923
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
87935
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
87924
87936
  break;
87925
87937
  }
87926
87938
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -87991,7 +88003,7 @@ var ideCommand = async () => {
87991
88003
  }
87992
88004
  };
87993
88005
  const { status } = ideClient.getConnectionStatus();
87994
- const isConnected2 = status === "connected" /* Connected */;
88006
+ const isConnected2 = status === IDEConnectionStatus.Connected;
87995
88007
  if (isConnected2) {
87996
88008
  ideSlashCommand.subCommands = [statusCommand, disableCommand5];
87997
88009
  } else {
@@ -88090,13 +88102,13 @@ Use /mcp auth <server-name> to authenticate.`
88090
88102
  const displayListener = (message) => {
88091
88103
  context.ui.addItem({ type: "info", text: message });
88092
88104
  };
88093
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
88105
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
88094
88106
  try {
88095
88107
  context.ui.addItem({
88096
88108
  type: "info",
88097
88109
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
88098
88110
  });
88099
- const { MCPOAuthProvider } = await import("./core-OSNLJAKB.js");
88111
+ const { MCPOAuthProvider } = await import("./dist-WOQEPX5R.js");
88100
88112
  let oauthConfig = server.oauth;
88101
88113
  if (!oauthConfig) {
88102
88114
  oauthConfig = { enabled: false };
@@ -88133,7 +88145,7 @@ Use /mcp auth <server-name> to authenticate.`
88133
88145
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
88134
88146
  };
88135
88147
  } finally {
88136
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
88148
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
88137
88149
  }
88138
88150
  },
88139
88151
  completion: async (context, partialArg) => {
@@ -88167,10 +88179,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false)
88167
88179
  const serverNames = Object.keys(mcpServers);
88168
88180
  const blockedMcpServers = config.getMcpClientManager()?.getBlockedMcpServers() || [];
88169
88181
  const connectingServers = serverNames.filter(
88170
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
88182
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
88171
88183
  );
88172
88184
  const discoveryState = getMCPDiscoveryState();
88173
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
88185
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
88174
88186
  const allTools = toolRegistry.getAllTools();
88175
88187
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
88176
88188
  const promptRegistry = config.getPromptRegistry();
@@ -88762,7 +88774,7 @@ Return a JSON object with:
88762
88774
  },
88763
88775
  abortSignal: new AbortController().signal,
88764
88776
  promptId: "triage-duplicates",
88765
- role: "utility_tool" /* UTILITY_TOOL */
88777
+ role: LlmRole.UTILITY_TOOL
88766
88778
  });
88767
88779
  const rec = response;
88768
88780
  let canonical;
@@ -89596,7 +89608,7 @@ Return a JSON object with:
89596
89608
  },
89597
89609
  abortSignal: abortControllerRef.current.signal,
89598
89610
  promptId: "triage-issues",
89599
- role: "utility_tool" /* UTILITY_TOOL */
89611
+ role: LlmRole.UTILITY_TOOL
89600
89612
  });
89601
89613
  return response;
89602
89614
  },
@@ -90168,8 +90180,8 @@ var planCommand = {
90168
90180
  return;
90169
90181
  }
90170
90182
  const previousApprovalMode = config.getApprovalMode();
90171
- config.setApprovalMode("plan" /* PLAN */);
90172
- if (previousApprovalMode !== "plan" /* PLAN */) {
90183
+ config.setApprovalMode(ApprovalMode.PLAN);
90184
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
90173
90185
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
90174
90186
  }
90175
90187
  const approvedPlanPath = config.getApprovedPlanPath();
@@ -90219,10 +90231,10 @@ var categorizeRulesByMode = (rules) => {
90219
90231
  rules.forEach((rule) => {
90220
90232
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
90221
90233
  const modeSet = new Set(modes);
90222
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
90223
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
90224
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
90225
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
90234
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
90235
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
90236
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
90237
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
90226
90238
  });
90227
90239
  return result;
90228
90240
  };
@@ -91554,7 +91566,7 @@ var upgradeCommand = {
91554
91566
  autoExecute: true,
91555
91567
  action: async (context) => {
91556
91568
  const authType = context.services.config?.getContentGeneratorConfig()?.authType;
91557
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
91569
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
91558
91570
  return {
91559
91571
  type: "message",
91560
91572
  messageType: "error",
@@ -91724,7 +91736,7 @@ var BuiltinCommandLoader = class {
91724
91736
  vimCommand,
91725
91737
  setupGithubCommand,
91726
91738
  terminalSetupCommand,
91727
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
91739
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
91728
91740
  ];
91729
91741
  handle?.end();
91730
91742
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -91867,11 +91879,11 @@ var ShellProcessor = class {
91867
91879
  },
91868
91880
  void 0
91869
91881
  );
91870
- if (decision === "deny" /* DENY */) {
91882
+ if (decision === PolicyDecision.DENY) {
91871
91883
  throw new Error(
91872
91884
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
91873
91885
  );
91874
- } else if (decision === "ask_user" /* ASK_USER */) {
91886
+ } else if (decision === PolicyDecision.ASK_USER) {
91875
91887
  commandsToConfirm.add(command);
91876
91888
  }
91877
91889
  }