@google/gemini-cli 0.38.0 → 0.38.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 (28) hide show
  1. package/bundle/{chunk-E3PKFKX6.js → chunk-A3CCSDTB.js} +3 -3
  2. package/bundle/{chunk-UTDAP6W7.js → chunk-B7OCRC72.js} +3 -3
  3. package/bundle/{chunk-ZN2B66X6.js → chunk-C3HWPYQ6.js} +71 -59
  4. package/bundle/chunk-M5Q72DDY.js +85174 -0
  5. package/bundle/{chunk-UIKF2OKQ.js → chunk-QVG5CRLZ.js} +35 -27
  6. package/bundle/{chunk-A5WACHT3.js → chunk-VTZC6I7F.js} +36 -28
  7. package/bundle/{chunk-UKTSS4BC.js → chunk-XGCOPSUV.js} +6147 -11463
  8. package/bundle/chunk-ZTFHMKKJ.js +358524 -0
  9. package/bundle/{core-3K4DOF2Q.js → core-KQILLJHB.js} +1 -1
  10. package/bundle/{devtoolsService-4VP27OSR.js → devtoolsService-5M3WXUDY.js} +2 -2
  11. package/bundle/{devtoolsService-7O5W72JB.js → devtoolsService-BEZR7FLM.js} +2 -2
  12. package/bundle/{devtoolsService-6WC7CXEJ.js → devtoolsService-H4GY23C4.js} +5 -4
  13. package/bundle/devtoolsService-YE72BGQU.js +871 -0
  14. package/bundle/{dist-3YVD622R.js → dist-3OA65TOZ.js} +1 -1
  15. package/bundle/{core-TF7HWCEH.js → dist-5XEVU7IN.js} +2 -2
  16. package/bundle/dist-VGVT6XFG.js +1962 -0
  17. package/bundle/docs/cli/plan-mode.md +4 -0
  18. package/bundle/gemini.js +7 -7
  19. package/bundle/{interactiveCli-JYMN562N.js → interactiveCli-EOCVNM6H.js} +3 -3
  20. package/bundle/{interactiveCli-PTUYCBMF.js → interactiveCli-HY2PQVEN.js} +3 -3
  21. package/bundle/{interactiveCli-RKW6AY7S.js → interactiveCli-PJT3XCNJ.js} +270 -253
  22. package/bundle/interactiveCli-ZZDSQ5YT.js +49974 -0
  23. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  24. package/bundle/{oauth2-provider-NANAQOXS.js → oauth2-provider-5N6BXCUZ.js} +1 -1
  25. package/bundle/{oauth2-provider-UZQMUGRV.js → oauth2-provider-5XLVQZYJ.js} +39 -73
  26. package/bundle/oauth2-provider-7EQWCVGC.js +237 -0
  27. package/bundle/{oauth2-provider-EG32OGVI.js → oauth2-provider-PFVXC625.js} +1 -1
  28. package/package.json +1 -1
@@ -156,7 +156,7 @@ import {
156
156
  tokenLimit,
157
157
  uiTelemetryService,
158
158
  yellowBright
159
- } from "./chunk-A5WACHT3.js";
159
+ } from "./chunk-VTZC6I7F.js";
160
160
  import {
161
161
  ApprovalMode,
162
162
  CoreEvent,
@@ -74920,7 +74920,7 @@ var authCommand = {
74920
74920
  import process34 from "node:process";
74921
74921
 
74922
74922
  // packages/cli/src/generated/git-commit.ts
74923
- var GIT_COMMIT_INFO = "e418e123e";
74923
+ var GIT_COMMIT_INFO = "2a28cf2cb";
74924
74924
 
74925
74925
  // packages/cli/src/ui/utils/historyExportUtils.ts
74926
74926
  import * as fsPromises2 from "node:fs/promises";
@@ -80400,7 +80400,7 @@ Use /mcp auth <server-name> to authenticate.`
80400
80400
  type: "info",
80401
80401
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
80402
80402
  });
80403
- const { MCPOAuthProvider } = await import("./core-3K4DOF2Q.js");
80403
+ const { MCPOAuthProvider } = await import("./core-KQILLJHB.js");
80404
80404
  let oauthConfig = server.oauth;
80405
80405
  if (!oauthConfig) {
80406
80406
  oauthConfig = { enabled: false };
@@ -167,7 +167,7 @@ import {
167
167
  tokenLimit,
168
168
  uiTelemetryService,
169
169
  yellowBright
170
- } from "./chunk-UIKF2OKQ.js";
170
+ } from "./chunk-QVG5CRLZ.js";
171
171
  import {
172
172
  ApprovalMode,
173
173
  CoreEvent,
@@ -74932,7 +74932,7 @@ var authCommand = {
74932
74932
  import process34 from "node:process";
74933
74933
 
74934
74934
  // packages/cli/src/generated/git-commit.ts
74935
- var GIT_COMMIT_INFO = "3f0873a83";
74935
+ var GIT_COMMIT_INFO = "2a28cf2cb";
74936
74936
 
74937
74937
  // packages/cli/src/ui/utils/historyExportUtils.ts
74938
74938
  import * as fsPromises2 from "node:fs/promises";
@@ -80412,7 +80412,7 @@ Use /mcp auth <server-name> to authenticate.`
80412
80412
  type: "info",
80413
80413
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
80414
80414
  });
80415
- const { MCPOAuthProvider } = await import("./dist-3YVD622R.js");
80415
+ const { MCPOAuthProvider } = await import("./dist-VGVT6XFG.js");
80416
80416
  let oauthConfig = server.oauth;
80417
80417
  if (!oauthConfig) {
80418
80418
  oauthConfig = { enabled: false };
@@ -2,7 +2,9 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  AsyncFzf,
4
4
  AuthProviderType,
5
+ AuthType,
5
6
  Config,
7
+ CoreToolCallStatus,
6
8
  DEFAULT_MODEL_CONFIGS,
7
9
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
8
10
  ExitCodes,
@@ -14,17 +16,26 @@ import {
14
16
  ExtensionUninstallEvent,
15
17
  ExtensionUpdateEvent,
16
18
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
19
+ HookType,
20
+ IDEConnectionStatus,
17
21
  INITIAL_HISTORY_LENGTH,
18
22
  IdeClient,
19
23
  IdeConnectionEvent,
24
+ IdeConnectionType,
25
+ IntegrityDataStatus,
20
26
  KeychainTokenStorage,
27
+ LlmRole,
28
+ MCPDiscoveryState,
21
29
  MCPOAuthTokenStorage,
30
+ MCPServerStatus,
22
31
  MaxBufferError,
23
32
  ModelSlashCommandEvent,
24
33
  ProjectIdRequiredError,
25
34
  ReadManyFilesTool,
26
35
  RewindEvent,
27
36
  SESSION_FILE_PREFIX,
37
+ SessionEndReason,
38
+ SessionStartSource,
28
39
  ShellExecutionService,
29
40
  StartSessionEvent,
30
41
  TOOL_OUTPUTS_DIR,
@@ -156,13 +167,14 @@ import {
156
167
  tokenLimit,
157
168
  uiTelemetryService,
158
169
  yellowBright
159
- } from "./chunk-UKTSS4BC.js";
170
+ } from "./chunk-ZTFHMKKJ.js";
160
171
  import {
161
172
  ApprovalMode,
162
173
  CoreEvent,
163
174
  DiscoveredMCPTool,
164
175
  FatalConfigError,
165
176
  GEMINI_DIR,
177
+ PolicyDecision,
166
178
  REFERENCE_CONTENT_END,
167
179
  REFERENCE_CONTENT_START,
168
180
  Storage,
@@ -184,7 +196,7 @@ import {
184
196
  shortenPath,
185
197
  tildeifyPath,
186
198
  unescapePath
187
- } from "./chunk-Z34XA6FT.js";
199
+ } from "./chunk-ETUADTWF.js";
188
200
  import {
189
201
  AppEvent,
190
202
  appEvents
@@ -30089,19 +30101,19 @@ var require_cli_spinners = __commonJS({
30089
30101
  var import_react = __toESM(require_react(), 1);
30090
30102
  function mapCoreStatusToDisplayStatus(coreStatus) {
30091
30103
  switch (coreStatus) {
30092
- case "validating" /* Validating */:
30104
+ case CoreToolCallStatus.Validating:
30093
30105
  return "Pending" /* Pending */;
30094
- case "awaiting_approval" /* AwaitingApproval */:
30106
+ case CoreToolCallStatus.AwaitingApproval:
30095
30107
  return "Confirming" /* Confirming */;
30096
- case "executing" /* Executing */:
30108
+ case CoreToolCallStatus.Executing:
30097
30109
  return "Executing" /* Executing */;
30098
- case "success" /* Success */:
30110
+ case CoreToolCallStatus.Success:
30099
30111
  return "Success" /* Success */;
30100
- case "cancelled" /* Cancelled */:
30112
+ case CoreToolCallStatus.Cancelled:
30101
30113
  return "Canceled" /* Canceled */;
30102
- case "error" /* Error */:
30114
+ case CoreToolCallStatus.Error:
30103
30115
  return "Error" /* Error */;
30104
- case "scheduled" /* Scheduled */:
30116
+ case CoreToolCallStatus.Scheduled:
30105
30117
  return "Pending" /* Pending */;
30106
30118
  default:
30107
30119
  return checkExhaustive(coreStatus);
@@ -45391,7 +45403,7 @@ function convertSessionToHistoryFormats(messages) {
45391
45403
  args: tool.args,
45392
45404
  description: tool.description || "",
45393
45405
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
45394
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
45406
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
45395
45407
  resultDisplay: tool.resultDisplay,
45396
45408
  confirmationDetails: void 0
45397
45409
  }))
@@ -49413,8 +49425,8 @@ var LoadedSettings = class {
49413
49425
  // React will pass a listener fn into this subscribe fn
49414
49426
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
49415
49427
  subscribe(listener) {
49416
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
49417
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
49428
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
49429
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
49418
49430
  }
49419
49431
  getSnapshot() {
49420
49432
  return this._snapshot;
@@ -54887,7 +54899,7 @@ var import_react34 = __toESM(require_react(), 1);
54887
54899
  function useIdeTrustListener() {
54888
54900
  const settings = useSettings();
54889
54901
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
54890
- "disconnected" /* Disconnected */
54902
+ IDEConnectionStatus.Disconnected
54891
54903
  );
54892
54904
  const previousTrust = (0, import_react34.useRef)(void 0);
54893
54905
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -54917,7 +54929,7 @@ function useIdeTrustListener() {
54917
54929
  };
54918
54930
  }, []);
54919
54931
  const getSnapshot = () => {
54920
- if (connectionStatus !== "connected" /* Connected */) {
54932
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
54921
54933
  return void 0;
54922
54934
  }
54923
54935
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -60045,7 +60057,7 @@ Would you like to attempt to install via "git clone" instead?`
60045
60057
  newExtensionConfig.version,
60046
60058
  previousExtensionConfig.version,
60047
60059
  installMetadata.type,
60048
- "success" /* Success */
60060
+ CoreToolCallStatus.Success
60049
60061
  )
60050
60062
  );
60051
60063
  if (newExtensionName !== previousName) {
@@ -60068,7 +60080,7 @@ Would you like to attempt to install via "git clone" instead?`
60068
60080
  getExtensionId(newExtensionConfig, installMetadata),
60069
60081
  newExtensionConfig.version,
60070
60082
  installMetadata.type,
60071
- "success" /* Success */
60083
+ CoreToolCallStatus.Success
60072
60084
  )
60073
60085
  );
60074
60086
  await this.enableExtension(
@@ -60101,7 +60113,7 @@ Would you like to attempt to install via "git clone" instead?`
60101
60113
  newExtensionConfig?.version ?? "",
60102
60114
  previousExtensionConfig.version,
60103
60115
  installMetadata.type,
60104
- "error" /* Error */
60116
+ CoreToolCallStatus.Error
60105
60117
  )
60106
60118
  );
60107
60119
  } else {
@@ -60113,7 +60125,7 @@ Would you like to attempt to install via "git clone" instead?`
60113
60125
  extensionId ?? "",
60114
60126
  newExtensionConfig?.version ?? "",
60115
60127
  installMetadata.type,
60116
- "error" /* Error */
60128
+ CoreToolCallStatus.Error
60117
60129
  )
60118
60130
  );
60119
60131
  }
@@ -60144,7 +60156,7 @@ Would you like to attempt to install via "git clone" instead?`
60144
60156
  extension.name,
60145
60157
  hashValue(extension.name),
60146
60158
  extension.id,
60147
- "success" /* Success */
60159
+ CoreToolCallStatus.Success
60148
60160
  )
60149
60161
  );
60150
60162
  }
@@ -60414,7 +60426,7 @@ Would you like to attempt to install via "git clone" instead?`
60414
60426
  if (eventHooks) {
60415
60427
  for (const definition of eventHooks) {
60416
60428
  for (const hook of definition.hooks) {
60417
- if (hook.type === "command" /* Command */) {
60429
+ if (hook.type === HookType.Command) {
60418
60430
  hook.env = { ...hook.env, ...hookEnv };
60419
60431
  }
60420
60432
  }
@@ -61041,7 +61053,7 @@ async function readMcpResources(resourceParts, config, signal) {
61041
61053
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
61042
61054
  name: `resources/read (${resource.serverName})`,
61043
61055
  description: resource.uri,
61044
- status: "success" /* Success */,
61056
+ status: CoreToolCallStatus.Success,
61045
61057
  isClientInitiated: true,
61046
61058
  resultDisplay: `Successfully read resource ${resource.uri}`,
61047
61059
  confirmationDetails: void 0
@@ -61056,7 +61068,7 @@ async function readMcpResources(resourceParts, config, signal) {
61056
61068
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
61057
61069
  name: `resources/read (${resource.serverName})`,
61058
61070
  description: resource.uri,
61059
- status: "error" /* Error */,
61071
+ status: CoreToolCallStatus.Error,
61060
61072
  isClientInitiated: true,
61061
61073
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
61062
61074
  confirmationDetails: void 0
@@ -61081,7 +61093,7 @@ Content from @${result.uri}:
61081
61093
  }
61082
61094
  if (hasError) {
61083
61095
  const firstError = displays.find(
61084
- (d) => d.status === "error" /* Error */
61096
+ (d) => d.status === CoreToolCallStatus.Error
61085
61097
  );
61086
61098
  return {
61087
61099
  parts: [],
@@ -61117,7 +61129,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
61117
61129
  callId: `client-read-${userMessageTimestamp}`,
61118
61130
  name: readManyFilesTool.displayName,
61119
61131
  description: invocation.getDescription(),
61120
- status: "success" /* Success */,
61132
+ status: CoreToolCallStatus.Success,
61121
61133
  isClientInitiated: true,
61122
61134
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
61123
61135
  confirmationDetails: void 0
@@ -61164,7 +61176,7 @@ Content from @${displayPath}:
61164
61176
  callId: `client-read-${userMessageTimestamp}`,
61165
61177
  name: readManyFilesTool.displayName,
61166
61178
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
61167
- status: "error" /* Error */,
61179
+ status: CoreToolCallStatus.Error,
61168
61180
  isClientInitiated: true,
61169
61181
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
61170
61182
  confirmationDetails: void 0
@@ -69376,7 +69388,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
69376
69388
  if (wasRaw) {
69377
69389
  setRawMode?.(true);
69378
69390
  }
69379
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
69391
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
69380
69392
  }
69381
69393
  }
69382
69394
 
@@ -72056,7 +72068,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
72056
72068
  extension.name,
72057
72069
  installMetadata
72058
72070
  );
72059
- if (status === "invalid" /* INVALID */) {
72071
+ if (status === IntegrityDataStatus.INVALID) {
72060
72072
  throw new Error("Extension integrity cannot be verified");
72061
72073
  }
72062
72074
  } catch (e) {
@@ -72915,7 +72927,7 @@ async function initializeApp(config, settings) {
72915
72927
  await ideClient.connect();
72916
72928
  logIdeConnection(
72917
72929
  config,
72918
- new IdeConnectionEvent("start" /* START */)
72930
+ new IdeConnectionEvent(IdeConnectionType.START)
72919
72931
  );
72920
72932
  }).catch((e) => {
72921
72933
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -72933,16 +72945,16 @@ async function initializeApp(config, settings) {
72933
72945
  // packages/cli/src/config/auth.ts
72934
72946
  function validateAuthMethod(authMethod) {
72935
72947
  loadEnvironment(loadSettings().merged, process.cwd());
72936
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
72948
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
72937
72949
  return null;
72938
72950
  }
72939
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
72951
+ if (authMethod === AuthType.USE_GEMINI) {
72940
72952
  if (!process.env["GEMINI_API_KEY"]) {
72941
72953
  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)!";
72942
72954
  }
72943
72955
  return null;
72944
72956
  }
72945
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
72957
+ if (authMethod === AuthType.USE_VERTEX_AI) {
72946
72958
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
72947
72959
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
72948
72960
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -74920,7 +74932,7 @@ var authCommand = {
74920
74932
  import process34 from "node:process";
74921
74933
 
74922
74934
  // packages/cli/src/generated/git-commit.ts
74923
- var GIT_COMMIT_INFO = "e418e123e";
74935
+ var GIT_COMMIT_INFO = "7f5580034";
74924
74936
 
74925
74937
  // packages/cli/src/ui/utils/historyExportUtils.ts
74926
74938
  import * as fsPromises2 from "node:fs/promises";
@@ -75433,7 +75445,7 @@ var clearCommand = {
75433
75445
  const config = context.services.agentContext?.config;
75434
75446
  const hookSystem = config?.getHookSystem();
75435
75447
  if (hookSystem) {
75436
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
75448
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
75437
75449
  }
75438
75450
  config?.injectionService.clear();
75439
75451
  let newSessionId;
@@ -75450,7 +75462,7 @@ var clearCommand = {
75450
75462
  }
75451
75463
  let result;
75452
75464
  if (hookSystem) {
75453
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
75465
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
75454
75466
  }
75455
75467
  await new Promise((resolve9) => setImmediate(resolve9));
75456
75468
  if (config) {
@@ -78297,7 +78309,7 @@ var Footer = () => {
78297
78309
  case "auth": {
78298
78310
  if (!settings.merged.ui.showUserIdentity) break;
78299
78311
  if (!authType) break;
78300
- const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
78312
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
78301
78313
  addCol(
78302
78314
  id,
78303
78315
  header,
@@ -80049,12 +80061,12 @@ import path34 from "node:path";
80049
80061
  function getIdeStatusMessage(ideClient) {
80050
80062
  const connection = ideClient.getConnectionStatus();
80051
80063
  switch (connection.status) {
80052
- case "connected" /* Connected */:
80064
+ case IDEConnectionStatus.Connected:
80053
80065
  return {
80054
80066
  messageType: "info",
80055
80067
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
80056
80068
  };
80057
- case "connecting" /* Connecting */:
80069
+ case IDEConnectionStatus.Connecting:
80058
80070
  return {
80059
80071
  messageType: "info",
80060
80072
  content: `\u{1F7E1} Connecting...`
@@ -80095,7 +80107,7 @@ ${infoMessage}`;
80095
80107
  async function getIdeStatusMessageWithFiles(ideClient) {
80096
80108
  const connection = ideClient.getConnectionStatus();
80097
80109
  switch (connection.status) {
80098
- case "connected" /* Connected */: {
80110
+ case IDEConnectionStatus.Connected: {
80099
80111
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
80100
80112
  const context = ideContextStore.get();
80101
80113
  const openFiles = context?.workspaceState?.openFiles;
@@ -80107,7 +80119,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
80107
80119
  content
80108
80120
  };
80109
80121
  }
80110
- case "connecting" /* Connecting */:
80122
+ case IDEConnectionStatus.Connecting:
80111
80123
  return {
80112
80124
  messageType: "info",
80113
80125
  content: `\u{1F7E1} Connecting...`
@@ -80129,7 +80141,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
80129
80141
  const ideClient = await IdeClient.getInstance();
80130
80142
  if (value) {
80131
80143
  await ideClient.connect(options);
80132
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
80144
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
80133
80145
  } else {
80134
80146
  await ideClient.disconnect();
80135
80147
  }
@@ -80217,7 +80229,7 @@ var ideCommand = async () => {
80217
80229
  logToConsole: false
80218
80230
  }
80219
80231
  );
80220
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
80232
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
80221
80233
  break;
80222
80234
  }
80223
80235
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -80294,7 +80306,7 @@ var ideCommand = async () => {
80294
80306
  }
80295
80307
  };
80296
80308
  const { status } = ideClient.getConnectionStatus();
80297
- const isConnected2 = status === "connected" /* Connected */;
80309
+ const isConnected2 = status === IDEConnectionStatus.Connected;
80298
80310
  if (isConnected2) {
80299
80311
  ideSlashCommand.subCommands = [statusCommand, disableCommand5];
80300
80312
  } else {
@@ -80394,13 +80406,13 @@ Use /mcp auth <server-name> to authenticate.`
80394
80406
  const displayListener = (message) => {
80395
80407
  context.ui.addItem({ type: "info", text: message });
80396
80408
  };
80397
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
80409
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
80398
80410
  try {
80399
80411
  context.ui.addItem({
80400
80412
  type: "info",
80401
80413
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
80402
80414
  });
80403
- const { MCPOAuthProvider } = await import("./core-TF7HWCEH.js");
80415
+ const { MCPOAuthProvider } = await import("./dist-5XEVU7IN.js");
80404
80416
  let oauthConfig = server.oauth;
80405
80417
  if (!oauthConfig) {
80406
80418
  oauthConfig = { enabled: false };
@@ -80437,7 +80449,7 @@ Use /mcp auth <server-name> to authenticate.`
80437
80449
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
80438
80450
  };
80439
80451
  } finally {
80440
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
80452
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
80441
80453
  }
80442
80454
  },
80443
80455
  completion: async (context, partialArg) => {
@@ -80483,10 +80495,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false,
80483
80495
  }
80484
80496
  const serverNames = Object.keys(mcpServers);
80485
80497
  const connectingServers = serverNames.filter(
80486
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
80498
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
80487
80499
  );
80488
80500
  const discoveryState = getMCPDiscoveryState();
80489
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
80501
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
80490
80502
  const allTools = toolRegistry.getAllTools();
80491
80503
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
80492
80504
  const promptRegistry = config.getPromptRegistry();
@@ -81091,7 +81103,7 @@ Return a JSON object with:
81091
81103
  },
81092
81104
  abortSignal: new AbortController().signal,
81093
81105
  promptId: "triage-duplicates",
81094
- role: "utility_tool" /* UTILITY_TOOL */
81106
+ role: LlmRole.UTILITY_TOOL
81095
81107
  });
81096
81108
  const rec = response;
81097
81109
  let canonical;
@@ -81925,7 +81937,7 @@ Return a JSON object with:
81925
81937
  },
81926
81938
  abortSignal: abortControllerRef.current.signal,
81927
81939
  promptId: "triage-issues",
81928
- role: "utility_tool" /* UTILITY_TOOL */
81940
+ role: LlmRole.UTILITY_TOOL
81929
81941
  });
81930
81942
  return response;
81931
81943
  },
@@ -82499,8 +82511,8 @@ var planCommand = {
82499
82511
  return;
82500
82512
  }
82501
82513
  const previousApprovalMode = config.getApprovalMode();
82502
- config.setApprovalMode("plan" /* PLAN */);
82503
- if (previousApprovalMode !== "plan" /* PLAN */) {
82514
+ config.setApprovalMode(ApprovalMode.PLAN);
82515
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
82504
82516
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
82505
82517
  }
82506
82518
  if (context.invocation?.args) {
@@ -82559,10 +82571,10 @@ var categorizeRulesByMode = (rules) => {
82559
82571
  rules.forEach((rule) => {
82560
82572
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
82561
82573
  const modeSet = new Set(modes);
82562
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
82563
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
82564
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
82565
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
82574
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
82575
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
82576
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
82577
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
82566
82578
  });
82567
82579
  return result;
82568
82580
  };
@@ -83912,7 +83924,7 @@ var upgradeCommand = {
83912
83924
  action: async (context) => {
83913
83925
  const config = context.services.agentContext?.config;
83914
83926
  const authType = config?.getContentGeneratorConfig()?.authType;
83915
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
83927
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
83916
83928
  return {
83917
83929
  type: "message",
83918
83930
  messageType: "error",
@@ -84082,7 +84094,7 @@ var BuiltinCommandLoader = class {
84082
84094
  vimCommand,
84083
84095
  setupGithubCommand,
84084
84096
  terminalSetupCommand,
84085
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
84097
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
84086
84098
  ];
84087
84099
  handle?.end();
84088
84100
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -84225,11 +84237,11 @@ var ShellProcessor = class {
84225
84237
  },
84226
84238
  void 0
84227
84239
  );
84228
- if (decision === "deny" /* DENY */) {
84240
+ if (decision === PolicyDecision.DENY) {
84229
84241
  throw new Error(
84230
84242
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
84231
84243
  );
84232
- } else if (decision === "ask_user" /* ASK_USER */) {
84244
+ } else if (decision === PolicyDecision.ASK_USER) {
84233
84245
  commandsToConfirm.add(command);
84234
84246
  }
84235
84247
  }