@google/gemini-cli 0.36.0-preview.0 → 0.36.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 (45) hide show
  1. package/bundle/{chunk-K2M7OTIP.js → chunk-25V3TYNR.js} +9 -10
  2. package/bundle/{chunk-N7MAJ3JD.js → chunk-6F64DR53.js} +6 -6
  3. package/bundle/{chunk-6UAL5KXG.js → chunk-EUXACAGL.js} +9 -12
  4. package/bundle/{chunk-BE2CAP4N.js → chunk-HLML5SVJ.js} +29 -27
  5. package/bundle/{chunk-3HNPGRRW.js → chunk-IOJJTEIC.js} +2 -2
  6. package/bundle/{chunk-S36ET7IB.js → chunk-KGPUJGU6.js} +6 -6
  7. package/bundle/{chunk-3XQWOVPH.js → chunk-MRJRXC63.js} +2 -2
  8. package/bundle/{chunk-HXZPARYO.js → chunk-MXNIJ4RK.js} +2 -2
  9. package/bundle/{chunk-4NIOHPQN.js → chunk-NKTSTYJO.js} +72 -60
  10. package/bundle/chunk-NT4MG3B6.js +93175 -0
  11. package/bundle/chunk-OOZG4FMQ.js +137 -0
  12. package/bundle/{chunk-PVQN7ZVP.js → chunk-PXG3YTLU.js} +42 -27
  13. package/bundle/{chunk-CDXJ3P4V.js → chunk-SV2TJWFU.js} +5596 -10443
  14. package/bundle/chunk-WHT3ZS7S.js +354051 -0
  15. package/bundle/{cleanup-6R6IEU7T.js → cleanup-2WKEMFXG.js} +3 -3
  16. package/bundle/{cleanup-I7KFQ3LC.js → cleanup-B67M5WAO.js} +3 -3
  17. package/bundle/{cleanup-R6KR4XCS.js → cleanup-PJ323T24.js} +3 -3
  18. package/bundle/cleanup-PKVUY3XO.js +29 -0
  19. package/bundle/{core-IZK42CWE.js → core-7GUY3XKQ.js} +2 -2
  20. package/bundle/{devtoolsService-HLM6BC5R.js → devtoolsService-B7OD724C.js} +3 -3
  21. package/bundle/{devtoolsService-GIESJD2E.js → devtoolsService-JGPJ2GN4.js} +5 -4
  22. package/bundle/{devtoolsService-PGDD2J4F.js → devtoolsService-LU3DLIVB.js} +3 -3
  23. package/bundle/devtoolsService-RGAOIVMN.js +854 -0
  24. package/bundle/{core-J3CTNETR.js → dist-DTCLJTHN.js} +2 -2
  25. package/bundle/{dist-6WEZWPRQ.js → dist-X3ESBKEG.js} +2 -2
  26. package/bundle/dist-YQXQRQYA.js +1882 -0
  27. package/bundle/docs/reference/configuration.md +1 -1
  28. package/bundle/{gemini-AI362DTR.js → gemini-7BPDTLSV.js} +7 -7
  29. package/bundle/{gemini-GZFHIDDH.js → gemini-CJ5HU32O.js} +155 -140
  30. package/bundle/{gemini-5ARDVELJ.js → gemini-GA5SXGI6.js} +7 -7
  31. package/bundle/gemini-RFUB3W5S.js +14455 -0
  32. package/bundle/gemini.js +4 -4
  33. package/bundle/{interactiveCli-OYO74BPW.js → interactiveCli-2EVI7UVZ.js} +5 -5
  34. package/bundle/{interactiveCli-LGOLNK44.js → interactiveCli-2OAVBJCC.js} +253 -236
  35. package/bundle/{interactiveCli-PXX77G77.js → interactiveCli-CRDA6GQ7.js} +5 -5
  36. package/bundle/interactiveCli-SHFDAMKC.js +49314 -0
  37. package/bundle/{memoryDiscovery-WPGC7DAZ.js → memoryDiscovery-JXHCZBWK.js} +1 -1
  38. package/bundle/{memoryDiscovery-FNLUOGLO.js → memoryDiscovery-VQKOP6YW.js} +1 -1
  39. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  40. package/bundle/{oauth2-provider-X3F7PSVB.js → oauth2-provider-D6HJJAVX.js} +2 -2
  41. package/bundle/{oauth2-provider-I6AYNUSI.js → oauth2-provider-KEZJCOYM.js} +39 -73
  42. package/bundle/oauth2-provider-TSEQG63I.js +237 -0
  43. package/bundle/{oauth2-provider-G7GIGUQF.js → oauth2-provider-ZT3CIEZO.js} +2 -2
  44. package/bundle/policies/plan.toml +10 -0
  45. package/package.json +1 -1
@@ -1,11 +1,13 @@
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
  runExitCleanup
4
- } from "./chunk-3XQWOVPH.js";
4
+ } from "./chunk-MRJRXC63.js";
5
5
  import {
6
6
  AsyncFzf,
7
7
  AuthProviderType,
8
+ AuthType,
8
9
  Config,
10
+ CoreToolCallStatus,
9
11
  DEFAULT_MODEL_CONFIGS,
10
12
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
11
13
  ExtensionDisableEvent,
@@ -16,17 +18,26 @@ import {
16
18
  ExtensionUninstallEvent,
17
19
  ExtensionUpdateEvent,
18
20
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
21
+ HookType,
22
+ IDEConnectionStatus,
19
23
  INITIAL_HISTORY_LENGTH,
20
24
  IdeClient,
21
25
  IdeConnectionEvent,
26
+ IdeConnectionType,
27
+ IntegrityDataStatus,
22
28
  KeychainTokenStorage,
29
+ LlmRole,
30
+ MCPDiscoveryState,
23
31
  MCPOAuthTokenStorage,
32
+ MCPServerStatus,
24
33
  MaxBufferError,
25
34
  ModelSlashCommandEvent,
26
35
  ProjectIdRequiredError,
27
36
  ReadManyFilesTool,
28
37
  RewindEvent,
29
38
  SESSION_FILE_PREFIX,
39
+ SessionEndReason,
40
+ SessionStartSource,
30
41
  ShellExecutionService,
31
42
  StartSessionEvent,
32
43
  TOOL_OUTPUTS_DIR,
@@ -153,13 +164,14 @@ import {
153
164
  tokenLimit,
154
165
  uiTelemetryService,
155
166
  yellowBright
156
- } from "./chunk-K2M7OTIP.js";
167
+ } from "./chunk-EUXACAGL.js";
157
168
  import {
158
169
  ApprovalMode,
159
170
  CoreEvent,
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-PVQN7ZVP.js";
196
+ } from "./chunk-HLML5SVJ.js";
185
197
  import {
186
198
  __commonJS,
187
199
  __export,
@@ -43706,19 +43718,19 @@ function isWorkspaceTrusted(settings, workspaceDir = process.cwd(), trustConfig,
43706
43718
  var import_react = __toESM(require_react(), 1);
43707
43719
  function mapCoreStatusToDisplayStatus(coreStatus) {
43708
43720
  switch (coreStatus) {
43709
- case "validating" /* Validating */:
43721
+ case CoreToolCallStatus.Validating:
43710
43722
  return "Pending" /* Pending */;
43711
- case "awaiting_approval" /* AwaitingApproval */:
43723
+ case CoreToolCallStatus.AwaitingApproval:
43712
43724
  return "Confirming" /* Confirming */;
43713
- case "executing" /* Executing */:
43725
+ case CoreToolCallStatus.Executing:
43714
43726
  return "Executing" /* Executing */;
43715
- case "success" /* Success */:
43727
+ case CoreToolCallStatus.Success:
43716
43728
  return "Success" /* Success */;
43717
- case "cancelled" /* Cancelled */:
43729
+ case CoreToolCallStatus.Cancelled:
43718
43730
  return "Canceled" /* Canceled */;
43719
- case "error" /* Error */:
43731
+ case CoreToolCallStatus.Error:
43720
43732
  return "Error" /* Error */;
43721
- case "scheduled" /* Scheduled */:
43733
+ case CoreToolCallStatus.Scheduled:
43722
43734
  return "Pending" /* Pending */;
43723
43735
  default:
43724
43736
  return checkExhaustive(coreStatus);
@@ -44301,7 +44313,7 @@ function convertSessionToHistoryFormats(messages) {
44301
44313
  name: tool.displayName || tool.name,
44302
44314
  description: tool.description || "",
44303
44315
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
44304
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
44316
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
44305
44317
  resultDisplay: tool.resultDisplay,
44306
44318
  confirmationDetails: void 0
44307
44319
  }))
@@ -48148,7 +48160,7 @@ var SETTINGS_SCHEMA = {
48148
48160
  label: "Enable Agents",
48149
48161
  category: "Experimental",
48150
48162
  requiresRestart: true,
48151
- default: false,
48163
+ default: true,
48152
48164
  description: "Enable local and remote subagents.",
48153
48165
  showInDialog: false
48154
48166
  },
@@ -49841,8 +49853,8 @@ var LoadedSettings = class {
49841
49853
  // React will pass a listener fn into this subscribe fn
49842
49854
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
49843
49855
  subscribe(listener) {
49844
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
49845
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
49856
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
49857
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
49846
49858
  }
49847
49859
  getSnapshot() {
49848
49860
  return this._snapshot;
@@ -63019,7 +63031,7 @@ var import_react33 = __toESM(require_react(), 1);
63019
63031
  function useIdeTrustListener() {
63020
63032
  const settings = useSettings();
63021
63033
  const [connectionStatus, setConnectionStatus] = (0, import_react33.useState)(
63022
- "disconnected" /* Disconnected */
63034
+ IDEConnectionStatus.Disconnected
63023
63035
  );
63024
63036
  const previousTrust = (0, import_react33.useRef)(void 0);
63025
63037
  const [restartReason, setRestartReason] = (0, import_react33.useState)("NONE");
@@ -63049,7 +63061,7 @@ function useIdeTrustListener() {
63049
63061
  };
63050
63062
  }, []);
63051
63063
  const getSnapshot = () => {
63052
- if (connectionStatus !== "connected" /* Connected */) {
63064
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
63053
63065
  return void 0;
63054
63066
  }
63055
63067
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -63357,7 +63369,7 @@ async function initializeApp(config, settings) {
63357
63369
  await ideClient.connect();
63358
63370
  logIdeConnection(
63359
63371
  config,
63360
- new IdeConnectionEvent("start" /* START */)
63372
+ new IdeConnectionEvent(IdeConnectionType.START)
63361
63373
  );
63362
63374
  }).catch((e) => {
63363
63375
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -63375,16 +63387,16 @@ async function initializeApp(config, settings) {
63375
63387
  // packages/cli/src/config/auth.ts
63376
63388
  function validateAuthMethod(authMethod) {
63377
63389
  loadEnvironment(loadSettings().merged, process.cwd());
63378
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
63390
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
63379
63391
  return null;
63380
63392
  }
63381
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
63393
+ if (authMethod === AuthType.USE_GEMINI) {
63382
63394
  if (!process.env["GEMINI_API_KEY"]) {
63383
63395
  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)!";
63384
63396
  }
63385
63397
  return null;
63386
63398
  }
63387
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
63399
+ if (authMethod === AuthType.USE_VERTEX_AI) {
63388
63400
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
63389
63401
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
63390
63402
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -73273,7 +73285,7 @@ Would you like to attempt to install via "git clone" instead?`
73273
73285
  newExtensionConfig.version,
73274
73286
  previousExtensionConfig.version,
73275
73287
  installMetadata.type,
73276
- "success" /* Success */
73288
+ CoreToolCallStatus.Success
73277
73289
  )
73278
73290
  );
73279
73291
  if (newExtensionName !== previousName) {
@@ -73296,7 +73308,7 @@ Would you like to attempt to install via "git clone" instead?`
73296
73308
  getExtensionId(newExtensionConfig, installMetadata),
73297
73309
  newExtensionConfig.version,
73298
73310
  installMetadata.type,
73299
- "success" /* Success */
73311
+ CoreToolCallStatus.Success
73300
73312
  )
73301
73313
  );
73302
73314
  await this.enableExtension(
@@ -73329,7 +73341,7 @@ Would you like to attempt to install via "git clone" instead?`
73329
73341
  newExtensionConfig?.version ?? "",
73330
73342
  previousExtensionConfig.version,
73331
73343
  installMetadata.type,
73332
- "error" /* Error */
73344
+ CoreToolCallStatus.Error
73333
73345
  )
73334
73346
  );
73335
73347
  } else {
@@ -73341,7 +73353,7 @@ Would you like to attempt to install via "git clone" instead?`
73341
73353
  extensionId ?? "",
73342
73354
  newExtensionConfig?.version ?? "",
73343
73355
  installMetadata.type,
73344
- "error" /* Error */
73356
+ CoreToolCallStatus.Error
73345
73357
  )
73346
73358
  );
73347
73359
  }
@@ -73372,7 +73384,7 @@ Would you like to attempt to install via "git clone" instead?`
73372
73384
  extension.name,
73373
73385
  hashValue(extension.name),
73374
73386
  extension.id,
73375
- "success" /* Success */
73387
+ CoreToolCallStatus.Success
73376
73388
  )
73377
73389
  );
73378
73390
  }
@@ -73642,7 +73654,7 @@ Would you like to attempt to install via "git clone" instead?`
73642
73654
  if (eventHooks) {
73643
73655
  for (const definition of eventHooks) {
73644
73656
  for (const hook of definition.hooks) {
73645
- if (hook.type === "command" /* Command */) {
73657
+ if (hook.type === HookType.Command) {
73646
73658
  hook.env = { ...hook.env, ...hookEnv };
73647
73659
  }
73648
73660
  }
@@ -74515,7 +74527,7 @@ async function readMcpResources(resourceParts, config, signal) {
74515
74527
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
74516
74528
  name: `resources/read (${resource.serverName})`,
74517
74529
  description: resource.uri,
74518
- status: "success" /* Success */,
74530
+ status: CoreToolCallStatus.Success,
74519
74531
  isClientInitiated: true,
74520
74532
  resultDisplay: `Successfully read resource ${resource.uri}`,
74521
74533
  confirmationDetails: void 0
@@ -74530,7 +74542,7 @@ async function readMcpResources(resourceParts, config, signal) {
74530
74542
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
74531
74543
  name: `resources/read (${resource.serverName})`,
74532
74544
  description: resource.uri,
74533
- status: "error" /* Error */,
74545
+ status: CoreToolCallStatus.Error,
74534
74546
  isClientInitiated: true,
74535
74547
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
74536
74548
  confirmationDetails: void 0
@@ -74555,7 +74567,7 @@ Content from @${result.uri}:
74555
74567
  }
74556
74568
  if (hasError) {
74557
74569
  const firstError = displays.find(
74558
- (d) => d.status === "error" /* Error */
74570
+ (d) => d.status === CoreToolCallStatus.Error
74559
74571
  );
74560
74572
  return {
74561
74573
  parts: [],
@@ -74591,7 +74603,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
74591
74603
  callId: `client-read-${userMessageTimestamp}`,
74592
74604
  name: readManyFilesTool.displayName,
74593
74605
  description: invocation.getDescription(),
74594
- status: "success" /* Success */,
74606
+ status: CoreToolCallStatus.Success,
74595
74607
  isClientInitiated: true,
74596
74608
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
74597
74609
  confirmationDetails: void 0
@@ -74638,7 +74650,7 @@ Content from @${displayPath}:
74638
74650
  callId: `client-read-${userMessageTimestamp}`,
74639
74651
  name: readManyFilesTool.displayName,
74640
74652
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
74641
- status: "error" /* Error */,
74653
+ status: CoreToolCallStatus.Error,
74642
74654
  isClientInitiated: true,
74643
74655
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
74644
74656
  confirmationDetails: void 0
@@ -77858,7 +77870,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
77858
77870
  if (wasRaw) {
77859
77871
  setRawMode?.(true);
77860
77872
  }
77861
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
77873
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
77862
77874
  }
77863
77875
  }
77864
77876
 
@@ -80537,7 +80549,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
80537
80549
  extension.name,
80538
80550
  installMetadata
80539
80551
  );
80540
- if (status === "invalid" /* INVALID */) {
80552
+ if (status === IntegrityDataStatus.INVALID) {
80541
80553
  throw new Error("Extension integrity cannot be verified");
80542
80554
  }
80543
80555
  } catch (e) {
@@ -83024,7 +83036,7 @@ var authCommand = {
83024
83036
  import process29 from "node:process";
83025
83037
 
83026
83038
  // packages/cli/src/generated/git-commit.ts
83027
- var GIT_COMMIT_INFO = "bf80e27db";
83039
+ var GIT_COMMIT_INFO = "357fac420";
83028
83040
 
83029
83041
  // packages/cli/src/ui/utils/historyExportUtils.ts
83030
83042
  import * as fsPromises2 from "node:fs/promises";
@@ -83528,7 +83540,7 @@ var clearCommand = {
83528
83540
  const config = context.services.agentContext?.config;
83529
83541
  const hookSystem = config?.getHookSystem();
83530
83542
  if (hookSystem) {
83531
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
83543
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
83532
83544
  }
83533
83545
  config?.injectionService.clear();
83534
83546
  let newSessionId;
@@ -83544,7 +83556,7 @@ var clearCommand = {
83544
83556
  }
83545
83557
  let result;
83546
83558
  if (hookSystem) {
83547
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
83559
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
83548
83560
  }
83549
83561
  await new Promise((resolve9) => setImmediate(resolve9));
83550
83562
  if (config) {
@@ -88074,12 +88086,12 @@ import path33 from "node:path";
88074
88086
  function getIdeStatusMessage(ideClient) {
88075
88087
  const connection = ideClient.getConnectionStatus();
88076
88088
  switch (connection.status) {
88077
- case "connected" /* Connected */:
88089
+ case IDEConnectionStatus.Connected:
88078
88090
  return {
88079
88091
  messageType: "info",
88080
88092
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
88081
88093
  };
88082
- case "connecting" /* Connecting */:
88094
+ case IDEConnectionStatus.Connecting:
88083
88095
  return {
88084
88096
  messageType: "info",
88085
88097
  content: `\u{1F7E1} Connecting...`
@@ -88120,7 +88132,7 @@ ${infoMessage}`;
88120
88132
  async function getIdeStatusMessageWithFiles(ideClient) {
88121
88133
  const connection = ideClient.getConnectionStatus();
88122
88134
  switch (connection.status) {
88123
- case "connected" /* Connected */: {
88135
+ case IDEConnectionStatus.Connected: {
88124
88136
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
88125
88137
  const context = ideContextStore.get();
88126
88138
  const openFiles = context?.workspaceState?.openFiles;
@@ -88132,7 +88144,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
88132
88144
  content
88133
88145
  };
88134
88146
  }
88135
- case "connecting" /* Connecting */:
88147
+ case IDEConnectionStatus.Connecting:
88136
88148
  return {
88137
88149
  messageType: "info",
88138
88150
  content: `\u{1F7E1} Connecting...`
@@ -88154,7 +88166,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
88154
88166
  const ideClient = await IdeClient.getInstance();
88155
88167
  if (value) {
88156
88168
  await ideClient.connect(options);
88157
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
88169
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
88158
88170
  } else {
88159
88171
  await ideClient.disconnect();
88160
88172
  }
@@ -88242,7 +88254,7 @@ var ideCommand = async () => {
88242
88254
  logToConsole: false
88243
88255
  }
88244
88256
  );
88245
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
88257
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
88246
88258
  break;
88247
88259
  }
88248
88260
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -88319,7 +88331,7 @@ var ideCommand = async () => {
88319
88331
  }
88320
88332
  };
88321
88333
  const { status } = ideClient.getConnectionStatus();
88322
- const isConnected2 = status === "connected" /* Connected */;
88334
+ const isConnected2 = status === IDEConnectionStatus.Connected;
88323
88335
  if (isConnected2) {
88324
88336
  ideSlashCommand.subCommands = [statusCommand, disableCommand5];
88325
88337
  } else {
@@ -88419,13 +88431,13 @@ Use /mcp auth <server-name> to authenticate.`
88419
88431
  const displayListener = (message) => {
88420
88432
  context.ui.addItem({ type: "info", text: message });
88421
88433
  };
88422
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
88434
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
88423
88435
  try {
88424
88436
  context.ui.addItem({
88425
88437
  type: "info",
88426
88438
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
88427
88439
  });
88428
- const { MCPOAuthProvider } = await import("./core-IZK42CWE.js");
88440
+ const { MCPOAuthProvider } = await import("./dist-DTCLJTHN.js");
88429
88441
  let oauthConfig = server.oauth;
88430
88442
  if (!oauthConfig) {
88431
88443
  oauthConfig = { enabled: false };
@@ -88462,7 +88474,7 @@ Use /mcp auth <server-name> to authenticate.`
88462
88474
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
88463
88475
  };
88464
88476
  } finally {
88465
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
88477
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
88466
88478
  }
88467
88479
  },
88468
88480
  completion: async (context, partialArg) => {
@@ -88498,10 +88510,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false)
88498
88510
  const serverNames = Object.keys(mcpServers);
88499
88511
  const blockedMcpServers = config.getMcpClientManager()?.getBlockedMcpServers() || [];
88500
88512
  const connectingServers = serverNames.filter(
88501
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
88513
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
88502
88514
  );
88503
88515
  const discoveryState = getMCPDiscoveryState();
88504
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
88516
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
88505
88517
  const allTools = toolRegistry.getAllTools();
88506
88518
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
88507
88519
  const promptRegistry = config.getPromptRegistry();
@@ -89096,7 +89108,7 @@ Return a JSON object with:
89096
89108
  },
89097
89109
  abortSignal: new AbortController().signal,
89098
89110
  promptId: "triage-duplicates",
89099
- role: "utility_tool" /* UTILITY_TOOL */
89111
+ role: LlmRole.UTILITY_TOOL
89100
89112
  });
89101
89113
  const rec = response;
89102
89114
  let canonical;
@@ -89930,7 +89942,7 @@ Return a JSON object with:
89930
89942
  },
89931
89943
  abortSignal: abortControllerRef.current.signal,
89932
89944
  promptId: "triage-issues",
89933
- role: "utility_tool" /* UTILITY_TOOL */
89945
+ role: LlmRole.UTILITY_TOOL
89934
89946
  });
89935
89947
  return response;
89936
89948
  },
@@ -90504,8 +90516,8 @@ var planCommand = {
90504
90516
  return;
90505
90517
  }
90506
90518
  const previousApprovalMode = config.getApprovalMode();
90507
- config.setApprovalMode("plan" /* PLAN */);
90508
- if (previousApprovalMode !== "plan" /* PLAN */) {
90519
+ config.setApprovalMode(ApprovalMode.PLAN);
90520
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
90509
90521
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
90510
90522
  }
90511
90523
  const approvedPlanPath = config.getApprovedPlanPath();
@@ -90555,10 +90567,10 @@ var categorizeRulesByMode = (rules) => {
90555
90567
  rules.forEach((rule) => {
90556
90568
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
90557
90569
  const modeSet = new Set(modes);
90558
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
90559
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
90560
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
90561
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
90570
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
90571
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
90572
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
90573
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
90562
90574
  });
90563
90575
  return result;
90564
90576
  };
@@ -91895,7 +91907,7 @@ var upgradeCommand = {
91895
91907
  action: async (context) => {
91896
91908
  const config = context.services.agentContext?.config;
91897
91909
  const authType = config?.getContentGeneratorConfig()?.authType;
91898
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
91910
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
91899
91911
  return {
91900
91912
  type: "message",
91901
91913
  messageType: "error",
@@ -92065,7 +92077,7 @@ var BuiltinCommandLoader = class {
92065
92077
  vimCommand,
92066
92078
  setupGithubCommand,
92067
92079
  terminalSetupCommand,
92068
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
92080
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
92069
92081
  ];
92070
92082
  handle?.end();
92071
92083
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -92208,11 +92220,11 @@ var ShellProcessor = class {
92208
92220
  },
92209
92221
  void 0
92210
92222
  );
92211
- if (decision === "deny" /* DENY */) {
92223
+ if (decision === PolicyDecision.DENY) {
92212
92224
  throw new Error(
92213
92225
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
92214
92226
  );
92215
- } else if (decision === "ask_user" /* ASK_USER */) {
92227
+ } else if (decision === PolicyDecision.ASK_USER) {
92216
92228
  commandsToConfirm.add(command);
92217
92229
  }
92218
92230
  }