@google/gemini-cli 0.40.0 → 0.40.1

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 (59) hide show
  1. package/bundle/{chunk-ML7VG4QG.js → chunk-2ABM66ZR.js} +1 -1
  2. package/bundle/{chunk-URTDU3HF.js → chunk-3XIE7V2G.js} +1 -1
  3. package/bundle/{chunk-O7SPQTAS.js → chunk-4NKEZSZL.js} +2 -2
  4. package/bundle/{chunk-MBLCGSJW.js → chunk-A3XZVE6S.js} +1 -1
  5. package/bundle/{chunk-SZYCJREE.js → chunk-B2OARGJJ.js} +72 -37
  6. package/bundle/{chunk-FRSESBS3.js → chunk-B6PIKVSF.js} +95 -47
  7. package/bundle/{chunk-EITHKKXC.js → chunk-BJ6YFFH2.js} +2 -2
  8. package/bundle/{chunk-BSQN7W2F.js → chunk-C45QOW2J.js} +2 -2
  9. package/bundle/{chunk-DYY5TRG5.js → chunk-DMTQDMOD.js} +14 -12
  10. package/bundle/{chunk-J76QO4KN.js → chunk-DQXPDCC3.js} +6 -6
  11. package/bundle/chunk-F5YK2O2Q.js +156 -0
  12. package/bundle/{chunk-3OSQ5US4.js → chunk-GT76ECCD.js} +6451 -11938
  13. package/bundle/{chunk-RUHTTGS7.js → chunk-H4FKMO4N.js} +3 -3
  14. package/bundle/{chunk-G6ODSHKI.js → chunk-HKIALAT6.js} +1 -1
  15. package/bundle/chunk-MKP6YHAI.js +118 -0
  16. package/bundle/{chunk-3F3SMPJP.js → chunk-RDM3AHIW.js} +6 -6
  17. package/bundle/{chunk-HMR2JSPA.js → chunk-RP4KDMW3.js} +1 -1
  18. package/bundle/{chunk-OE2ZUR66.js → chunk-SDLMN2WK.js} +1 -1
  19. package/bundle/{chunk-P7LA6IIC.js → chunk-SVRZDVKN.js} +1 -1
  20. package/bundle/{chunk-OEIRJHU4.js → chunk-TV3H5VBI.js} +67 -54
  21. package/bundle/chunk-UN6XCVMJ.js +351184 -0
  22. package/bundle/chunk-VKQT3B2X.js +17505 -0
  23. package/bundle/chunk-VWLKCG5Q.js +80012 -0
  24. package/bundle/chunk-WCG76BEG.js +1571 -0
  25. package/bundle/{cleanup-AJ7G3WEE.js → cleanup-7VP4F7GR.js} +2 -2
  26. package/bundle/{cleanup-6MKBWA6V.js → cleanup-MNQ2UZZG.js} +2 -2
  27. package/bundle/{cleanup-SOJQVOTG.js → cleanup-P53J5X4G.js} +3 -3
  28. package/bundle/cleanup-PLWTY4UK.js +33 -0
  29. package/bundle/{core-O5TD6NYP.js → core-UFCQUVAZ.js} +1 -1
  30. package/bundle/{devtoolsService-CCXHJEUM.js → devtoolsService-F4BITN2L.js} +2 -2
  31. package/bundle/{devtoolsService-AR5HWQA7.js → devtoolsService-K4I6YCD4.js} +5 -4
  32. package/bundle/devtoolsService-TPQOS3XD.js +852 -0
  33. package/bundle/{devtoolsService-GQF7V6FB.js → devtoolsService-UBZYOZNR.js} +2 -2
  34. package/bundle/{dist-LZ5ASNAL.js → dist-CRAFZ4EV.js} +1 -1
  35. package/bundle/{core-KELRGMHQ.js → dist-KBXYTOD4.js} +2 -2
  36. package/bundle/dist-RP6V5FR5.js +2046 -0
  37. package/bundle/{gemini-YJTI2WQP.js → gemini-3OZCG3O2.js} +191 -175
  38. package/bundle/{gemini-TKPXJBGX.js → gemini-OEXUXD4F.js} +11 -11
  39. package/bundle/gemini-RYFDQAFM.js +16087 -0
  40. package/bundle/{gemini-LSLMD4HG.js → gemini-ZYQZGZWC.js} +11 -11
  41. package/bundle/gemini.js +3 -3
  42. package/bundle/{interactiveCli-O3UYJUNT.js → interactiveCli-M2JHWWJW.js} +6 -6
  43. package/bundle/{interactiveCli-I56L63GE.js → interactiveCli-ND2AVROW.js} +6 -6
  44. package/bundle/{interactiveCli-5YSP2IQI.js → interactiveCli-VO2T47FA.js} +290 -272
  45. package/bundle/interactiveCli-ZSLDJYKZ.js +34448 -0
  46. package/bundle/{liteRtServerManager-XI56E5P3.js → liteRtServerManager-ESWH5RRJ.js} +3 -3
  47. package/bundle/{liteRtServerManager-6INPACOA.js → liteRtServerManager-HMMIC3TU.js} +3 -3
  48. package/bundle/{liteRtServerManager-CIC7DD4U.js → liteRtServerManager-JHBFWDI6.js} +4 -4
  49. package/bundle/liteRtServerManager-KR4G6HVQ.js +65 -0
  50. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  51. package/bundle/{oauth2-provider-HUMYTY6K.js → oauth2-provider-25JJN4A4.js} +1 -1
  52. package/bundle/{oauth2-provider-VGGNG5XI.js → oauth2-provider-HPAQM7LS.js} +39 -73
  53. package/bundle/oauth2-provider-IJ4VRZ7W.js +237 -0
  54. package/bundle/{oauth2-provider-HDKVDC2Q.js → oauth2-provider-RQPXCAE5.js} +1 -1
  55. package/bundle/{start-VHURPYN7.js → start-2XU4BDSD.js} +5 -5
  56. package/bundle/{start-25VD33TV.js → start-H6E5SBV7.js} +6 -6
  57. package/bundle/{start-U4YQCY2A.js → start-KGL2CIOG.js} +5 -5
  58. package/bundle/start-PATVFSB6.js +18 -0
  59. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-HMR2JSPA.js";
9
+ } from "./chunk-WCG76BEG.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -59,13 +59,15 @@ import {
59
59
  stripUnsafeCharacters,
60
60
  toCodePoints,
61
61
  validateCustomTheme
62
- } from "./chunk-DYY5TRG5.js";
62
+ } from "./chunk-DMTQDMOD.js";
63
63
  import {
64
64
  runExitCleanup
65
- } from "./chunk-ML7VG4QG.js";
65
+ } from "./chunk-C45QOW2J.js";
66
66
  import {
67
67
  AsyncFzf,
68
+ AuthType,
68
69
  Config,
70
+ CoreToolCallStatus,
69
71
  ExtensionDisableEvent,
70
72
  ExtensionEnableEvent,
71
73
  ExtensionInstallEvent,
@@ -74,17 +76,27 @@ import {
74
76
  ExtensionUninstallEvent,
75
77
  ExtensionUpdateEvent,
76
78
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
79
+ HookType,
80
+ IDEConnectionStatus,
77
81
  INITIAL_HISTORY_LENGTH,
78
82
  IdeClient,
79
83
  IdeConnectionEvent,
84
+ IdeConnectionType,
85
+ IntegrityDataStatus,
80
86
  KeychainTokenStorage,
87
+ LlmRole,
88
+ MCPDiscoveryState,
81
89
  MCPOAuthTokenStorage,
90
+ MCPServerStatus,
82
91
  ModelSlashCommandEvent,
83
92
  ProjectIdRequiredError,
84
93
  ReadManyFilesTool,
85
94
  RewindEvent,
95
+ SessionEndReason,
96
+ SessionStartSource,
86
97
  ShellExecutionService,
87
98
  StartSessionEvent,
99
+ TrustLevel,
88
100
  UPGRADE_URL_PAGE,
89
101
  UserAccountManager,
90
102
  ValidationRequiredError,
@@ -196,12 +208,13 @@ import {
196
208
  stripAnsi,
197
209
  tokenLimit,
198
210
  uiTelemetryService
199
- } from "./chunk-3OSQ5US4.js";
211
+ } from "./chunk-GT76ECCD.js";
200
212
  import {
201
213
  ApprovalMode,
202
214
  CoreEvent,
203
215
  DiscoveredMCPTool,
204
216
  GEMINI_DIR,
217
+ PolicyDecision,
205
218
  REFERENCE_CONTENT_END,
206
219
  REFERENCE_CONTENT_START,
207
220
  Storage,
@@ -222,7 +235,7 @@ import {
222
235
  shortenPath,
223
236
  tildeifyPath,
224
237
  unescapePath
225
- } from "./chunk-UHHRGNIO.js";
238
+ } from "./chunk-F73F75XM.js";
226
239
  import {
227
240
  require_src
228
241
  } from "./chunk-RJTRUG2J.js";
@@ -39425,7 +39438,7 @@ var import_react34 = __toESM(require_react(), 1);
39425
39438
  function useIdeTrustListener() {
39426
39439
  const settings = useSettings();
39427
39440
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
39428
- "disconnected" /* Disconnected */
39441
+ IDEConnectionStatus.Disconnected
39429
39442
  );
39430
39443
  const previousTrust = (0, import_react34.useRef)(void 0);
39431
39444
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -39455,7 +39468,7 @@ function useIdeTrustListener() {
39455
39468
  };
39456
39469
  }, []);
39457
39470
  const getSnapshot = () => {
39458
- if (connectionStatus !== "connected" /* Connected */) {
39471
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
39459
39472
  return void 0;
39460
39473
  }
39461
39474
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -39841,7 +39854,7 @@ async function initializeApp(config, settings) {
39841
39854
  await ideClient.connect();
39842
39855
  logIdeConnection(
39843
39856
  config,
39844
- new IdeConnectionEvent("start" /* START */)
39857
+ new IdeConnectionEvent(IdeConnectionType.START)
39845
39858
  );
39846
39859
  }).catch((e) => {
39847
39860
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -39859,16 +39872,16 @@ async function initializeApp(config, settings) {
39859
39872
  // packages/cli/src/config/auth.ts
39860
39873
  function validateAuthMethod(authMethod) {
39861
39874
  loadEnvironment(loadSettings().merged, process.cwd());
39862
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
39875
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
39863
39876
  return null;
39864
39877
  }
39865
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
39878
+ if (authMethod === AuthType.USE_GEMINI) {
39866
39879
  if (!process.env["GEMINI_API_KEY"]) {
39867
39880
  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)!";
39868
39881
  }
39869
39882
  return null;
39870
39883
  }
39871
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
39884
+ if (authMethod === AuthType.USE_VERTEX_AI) {
39872
39885
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
39873
39886
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
39874
39887
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -44599,7 +44612,7 @@ var ExtensionManager = class extends ExtensionLoader {
44599
44612
  const trustedFolders = loadTrustedFolders();
44600
44613
  await trustedFolders.setValue(
44601
44614
  this.workspaceDir,
44602
- "TRUST_FOLDER" /* TRUST_FOLDER */
44615
+ TrustLevel.TRUST_FOLDER
44603
44616
  );
44604
44617
  } else {
44605
44618
  throw new Error(
@@ -44785,7 +44798,7 @@ Would you like to attempt to install via "git clone" instead?`
44785
44798
  newExtensionConfig.version,
44786
44799
  previousExtensionConfig.version,
44787
44800
  installMetadata.type,
44788
- "success" /* Success */
44801
+ CoreToolCallStatus.Success
44789
44802
  )
44790
44803
  );
44791
44804
  if (newExtensionName !== previousName) {
@@ -44808,7 +44821,7 @@ Would you like to attempt to install via "git clone" instead?`
44808
44821
  getExtensionId(newExtensionConfig, installMetadata),
44809
44822
  newExtensionConfig.version,
44810
44823
  installMetadata.type,
44811
- "success" /* Success */
44824
+ CoreToolCallStatus.Success
44812
44825
  )
44813
44826
  );
44814
44827
  await this.enableExtension(
@@ -44841,7 +44854,7 @@ Would you like to attempt to install via "git clone" instead?`
44841
44854
  newExtensionConfig?.version ?? "",
44842
44855
  previousExtensionConfig.version,
44843
44856
  installMetadata.type,
44844
- "error" /* Error */
44857
+ CoreToolCallStatus.Error
44845
44858
  )
44846
44859
  );
44847
44860
  } else {
@@ -44853,7 +44866,7 @@ Would you like to attempt to install via "git clone" instead?`
44853
44866
  extensionId ?? "",
44854
44867
  newExtensionConfig?.version ?? "",
44855
44868
  installMetadata.type,
44856
- "error" /* Error */
44869
+ CoreToolCallStatus.Error
44857
44870
  )
44858
44871
  );
44859
44872
  }
@@ -44884,7 +44897,7 @@ Would you like to attempt to install via "git clone" instead?`
44884
44897
  extension.name,
44885
44898
  hashValue(extension.name),
44886
44899
  extension.id,
44887
- "success" /* Success */
44900
+ CoreToolCallStatus.Success
44888
44901
  )
44889
44902
  );
44890
44903
  }
@@ -45154,7 +45167,7 @@ Would you like to attempt to install via "git clone" instead?`
45154
45167
  if (eventHooks) {
45155
45168
  for (const definition of eventHooks) {
45156
45169
  for (const hook of definition.hooks) {
45157
- if (hook.type === "command" /* Command */) {
45170
+ if (hook.type === HookType.Command) {
45158
45171
  hook.env = { ...hook.env, ...hookEnv };
45159
45172
  }
45160
45173
  }
@@ -46186,7 +46199,7 @@ async function readMcpResources(resourceParts, config, signal) {
46186
46199
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46187
46200
  name: `resources/read (${resource.serverName})`,
46188
46201
  description: resource.uri,
46189
- status: "success" /* Success */,
46202
+ status: CoreToolCallStatus.Success,
46190
46203
  isClientInitiated: true,
46191
46204
  resultDisplay: `Successfully read resource ${resource.uri}`,
46192
46205
  confirmationDetails: void 0
@@ -46201,7 +46214,7 @@ async function readMcpResources(resourceParts, config, signal) {
46201
46214
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46202
46215
  name: `resources/read (${resource.serverName})`,
46203
46216
  description: resource.uri,
46204
- status: "error" /* Error */,
46217
+ status: CoreToolCallStatus.Error,
46205
46218
  isClientInitiated: true,
46206
46219
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
46207
46220
  confirmationDetails: void 0
@@ -46226,7 +46239,7 @@ Content from @${result.uri}:
46226
46239
  }
46227
46240
  if (hasError) {
46228
46241
  const firstError = displays.find(
46229
- (d) => d.status === "error" /* Error */
46242
+ (d) => d.status === CoreToolCallStatus.Error
46230
46243
  );
46231
46244
  return {
46232
46245
  parts: [],
@@ -46262,7 +46275,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
46262
46275
  callId: `client-read-${userMessageTimestamp}`,
46263
46276
  name: readManyFilesTool.displayName,
46264
46277
  description: invocation.getDescription(),
46265
- status: "success" /* Success */,
46278
+ status: CoreToolCallStatus.Success,
46266
46279
  isClientInitiated: true,
46267
46280
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
46268
46281
  confirmationDetails: void 0
@@ -46309,7 +46322,7 @@ Content from @${displayPath}:
46309
46322
  callId: `client-read-${userMessageTimestamp}`,
46310
46323
  name: readManyFilesTool.displayName,
46311
46324
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
46312
- status: "error" /* Error */,
46325
+ status: CoreToolCallStatus.Error,
46313
46326
  isClientInitiated: true,
46314
46327
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
46315
46328
  confirmationDetails: void 0
@@ -49538,7 +49551,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49538
49551
  if (wasRaw) {
49539
49552
  setRawMode?.(true);
49540
49553
  }
49541
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
49554
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
49542
49555
  }
49543
49556
  }
49544
49557
 
@@ -52218,7 +52231,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
52218
52231
  extension.name,
52219
52232
  installMetadata
52220
52233
  );
52221
- if (status === "invalid" /* INVALID */) {
52234
+ if (status === IntegrityDataStatus.INVALID) {
52222
52235
  throw new Error("Extension integrity cannot be verified");
52223
52236
  }
52224
52237
  } catch (e) {
@@ -54212,7 +54225,7 @@ var MultiFolderTrustDialog = ({
54212
54225
  if (choice === 1 /* YES_AND_REMEMBER */) {
54213
54226
  await trustedFolders.setValue(
54214
54227
  expandedPath,
54215
- "TRUST_FOLDER" /* TRUST_FOLDER */
54228
+ TrustLevel.TRUST_FOLDER
54216
54229
  );
54217
54230
  }
54218
54231
  workspaceContext.addDirectory(expandedPath);
@@ -54991,7 +55004,7 @@ var authCommand = {
54991
55004
  import process29 from "node:process";
54992
55005
 
54993
55006
  // packages/cli/src/generated/git-commit.ts
54994
- var GIT_COMMIT_INFO = "cefbd08f7";
55007
+ var GIT_COMMIT_INFO = "239ede120";
54995
55008
 
54996
55009
  // packages/cli/src/ui/utils/historyExportUtils.ts
54997
55010
  import * as fsPromises from "node:fs/promises";
@@ -55505,7 +55518,7 @@ var clearCommand = {
55505
55518
  const config = context.services.agentContext?.config;
55506
55519
  const hookSystem = config?.getHookSystem();
55507
55520
  if (hookSystem) {
55508
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
55521
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
55509
55522
  }
55510
55523
  config?.injectionService.clear();
55511
55524
  let newSessionId;
@@ -55522,7 +55535,7 @@ var clearCommand = {
55522
55535
  }
55523
55536
  let result;
55524
55537
  if (hookSystem) {
55525
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
55538
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
55526
55539
  }
55527
55540
  await new Promise((resolve8) => setImmediate(resolve8));
55528
55541
  if (config) {
@@ -58378,7 +58391,7 @@ var Footer = () => {
58378
58391
  case "auth": {
58379
58392
  if (!settings.merged.ui.showUserIdentity) break;
58380
58393
  if (!authType) break;
58381
- const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
58394
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
58382
58395
  addCol(
58383
58396
  id,
58384
58397
  header,
@@ -60125,12 +60138,12 @@ import path27 from "node:path";
60125
60138
  function getIdeStatusMessage(ideClient) {
60126
60139
  const connection = ideClient.getConnectionStatus();
60127
60140
  switch (connection.status) {
60128
- case "connected" /* Connected */:
60141
+ case IDEConnectionStatus.Connected:
60129
60142
  return {
60130
60143
  messageType: "info",
60131
60144
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
60132
60145
  };
60133
- case "connecting" /* Connecting */:
60146
+ case IDEConnectionStatus.Connecting:
60134
60147
  return {
60135
60148
  messageType: "info",
60136
60149
  content: `\u{1F7E1} Connecting...`
@@ -60171,7 +60184,7 @@ ${infoMessage}`;
60171
60184
  async function getIdeStatusMessageWithFiles(ideClient) {
60172
60185
  const connection = ideClient.getConnectionStatus();
60173
60186
  switch (connection.status) {
60174
- case "connected" /* Connected */: {
60187
+ case IDEConnectionStatus.Connected: {
60175
60188
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
60176
60189
  const context = ideContextStore.get();
60177
60190
  const openFiles = context?.workspaceState?.openFiles;
@@ -60183,7 +60196,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
60183
60196
  content
60184
60197
  };
60185
60198
  }
60186
- case "connecting" /* Connecting */:
60199
+ case IDEConnectionStatus.Connecting:
60187
60200
  return {
60188
60201
  messageType: "info",
60189
60202
  content: `\u{1F7E1} Connecting...`
@@ -60205,7 +60218,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
60205
60218
  const ideClient = await IdeClient.getInstance();
60206
60219
  if (value) {
60207
60220
  await ideClient.connect(options);
60208
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
60221
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
60209
60222
  } else {
60210
60223
  await ideClient.disconnect();
60211
60224
  }
@@ -60293,7 +60306,7 @@ var ideCommand = async () => {
60293
60306
  logToConsole: false
60294
60307
  }
60295
60308
  );
60296
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
60309
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
60297
60310
  break;
60298
60311
  }
60299
60312
  await new Promise((resolve8) => setTimeout(resolve8, 500));
@@ -60370,7 +60383,7 @@ var ideCommand = async () => {
60370
60383
  }
60371
60384
  };
60372
60385
  const { status } = ideClient.getConnectionStatus();
60373
- const isConnected = status === "connected" /* Connected */;
60386
+ const isConnected = status === IDEConnectionStatus.Connected;
60374
60387
  if (isConnected) {
60375
60388
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
60376
60389
  } else {
@@ -60470,13 +60483,13 @@ Use /mcp auth <server-name> to authenticate.`
60470
60483
  const displayListener = (message) => {
60471
60484
  context.ui.addItem({ type: "info", text: message });
60472
60485
  };
60473
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
60486
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
60474
60487
  try {
60475
60488
  context.ui.addItem({
60476
60489
  type: "info",
60477
60490
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
60478
60491
  });
60479
- const { MCPOAuthProvider } = await import("./core-O5TD6NYP.js");
60492
+ const { MCPOAuthProvider } = await import("./dist-CRAFZ4EV.js");
60480
60493
  let oauthConfig = server.oauth;
60481
60494
  if (!oauthConfig) {
60482
60495
  oauthConfig = { enabled: false };
@@ -60513,7 +60526,7 @@ Use /mcp auth <server-name> to authenticate.`
60513
60526
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
60514
60527
  };
60515
60528
  } finally {
60516
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
60529
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
60517
60530
  }
60518
60531
  },
60519
60532
  completion: async (context, partialArg) => {
@@ -60559,10 +60572,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false,
60559
60572
  }
60560
60573
  const serverNames = Object.keys(mcpServers);
60561
60574
  const connectingServers = serverNames.filter(
60562
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
60575
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
60563
60576
  );
60564
60577
  const discoveryState = getMCPDiscoveryState();
60565
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
60578
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
60566
60579
  const allTools = toolRegistry.getAllTools();
60567
60580
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
60568
60581
  const promptRegistry = config.getPromptRegistry();
@@ -75966,7 +75979,7 @@ Return a JSON object with:
75966
75979
  },
75967
75980
  abortSignal: new AbortController().signal,
75968
75981
  promptId: "triage-duplicates",
75969
- role: "utility_tool" /* UTILITY_TOOL */
75982
+ role: LlmRole.UTILITY_TOOL
75970
75983
  });
75971
75984
  const rec = response;
75972
75985
  let canonical;
@@ -76800,7 +76813,7 @@ Return a JSON object with:
76800
76813
  },
76801
76814
  abortSignal: abortControllerRef.current.signal,
76802
76815
  promptId: "triage-issues",
76803
- role: "utility_tool" /* UTILITY_TOOL */
76816
+ role: LlmRole.UTILITY_TOOL
76804
76817
  });
76805
76818
  return response;
76806
76819
  },
@@ -77374,8 +77387,8 @@ var planCommand = {
77374
77387
  return;
77375
77388
  }
77376
77389
  const previousApprovalMode = config.getApprovalMode();
77377
- config.setApprovalMode("plan" /* PLAN */);
77378
- if (previousApprovalMode !== "plan" /* PLAN */) {
77390
+ config.setApprovalMode(ApprovalMode.PLAN);
77391
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
77379
77392
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
77380
77393
  }
77381
77394
  if (context.invocation?.args) {
@@ -77434,10 +77447,10 @@ var categorizeRulesByMode = (rules) => {
77434
77447
  rules.forEach((rule) => {
77435
77448
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
77436
77449
  const modeSet = new Set(modes);
77437
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
77438
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
77439
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
77440
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
77450
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
77451
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
77452
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
77453
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
77441
77454
  });
77442
77455
  return result;
77443
77456
  };
@@ -78786,7 +78799,7 @@ var upgradeCommand = {
78786
78799
  action: async (context) => {
78787
78800
  const config = context.services.agentContext?.config;
78788
78801
  const authType = config?.getContentGeneratorConfig()?.authType;
78789
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
78802
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
78790
78803
  return {
78791
78804
  type: "message",
78792
78805
  messageType: "error",
@@ -78988,7 +79001,7 @@ var BuiltinCommandLoader = class {
78988
79001
  vimCommand,
78989
79002
  setupGithubCommand,
78990
79003
  terminalSetupCommand,
78991
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
79004
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
78992
79005
  ];
78993
79006
  handle?.end();
78994
79007
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -79131,11 +79144,11 @@ var ShellProcessor = class {
79131
79144
  },
79132
79145
  void 0
79133
79146
  );
79134
- if (decision === "deny" /* DENY */) {
79147
+ if (decision === PolicyDecision.DENY) {
79135
79148
  throw new Error(
79136
79149
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
79137
79150
  );
79138
- } else if (decision === "ask_user" /* ASK_USER */) {
79151
+ } else if (decision === PolicyDecision.ASK_USER) {
79139
79152
  commandsToConfirm.add(command);
79140
79153
  }
79141
79154
  }