@google/gemini-cli 0.62.0-preview.0 → 0.63.0-nightly.20260928.g2fe7c2d3f

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 (69) hide show
  1. package/bundle/{chunk-VNI6B2SC.js → chunk-2AXHER6I.js} +1 -1
  2. package/bundle/{chunk-7P7I4GYC.js → chunk-4PBNRKYJ.js} +1 -1
  3. package/bundle/{chunk-UDX2JG4X.js → chunk-4SQTLFVK.js} +45 -11
  4. package/bundle/{chunk-ZOLMIYBF.js → chunk-5G7FE6LZ.js} +109 -62
  5. package/bundle/{chunk-UCTTKDYX.js → chunk-7ZCWMSGJ.js} +1 -1
  6. package/bundle/{chunk-7LRWECUM.js → chunk-B3EF23HT.js} +612 -158
  7. package/bundle/{chunk-4B6A2PDH.js → chunk-BRTA6WWG.js} +9 -8
  8. package/bundle/{chunk-IP26BEPK.js → chunk-C2KZGMGL.js} +1 -1
  9. package/bundle/{chunk-67JFSAOI.js → chunk-DEI3TS7C.js} +8 -5
  10. package/bundle/{chunk-QE6MNPCN.js → chunk-EATZTV2L.js} +45 -11
  11. package/bundle/chunk-EORMOPQX.js +17368 -0
  12. package/bundle/{chunk-YHJCOL52.js → chunk-ERMD62K5.js} +8372 -14832
  13. package/bundle/chunk-EYGY6SJV.js +512 -0
  14. package/bundle/{chunk-FX7H3YXM.js → chunk-I5ZBUXWS.js} +1 -1
  15. package/bundle/{chunk-X3MDVQ2M.js → chunk-I7XQQVIO.js} +1 -1
  16. package/bundle/{chunk-IZ7EEAUQ.js → chunk-KCZCDPS2.js} +2 -2
  17. package/bundle/{chunk-2MIF7TLR.js → chunk-KRI5JA76.js} +680 -165
  18. package/bundle/{chunk-DSHGGNYE.js → chunk-KSWUQTWU.js} +3 -3
  19. package/bundle/chunk-LNPKSDNP.js +102951 -0
  20. package/bundle/{chunk-RQBLUWGO.js → chunk-PAIQESPE.js} +3 -3
  21. package/bundle/{chunk-LXVOSY26.js → chunk-PGIM2K4Q.js} +1 -1
  22. package/bundle/{chunk-HCJU65X4.js → chunk-QX7M3XMQ.js} +3 -3
  23. package/bundle/{chunk-KYWRBXUN.js → chunk-QYTRARRL.js} +2 -2
  24. package/bundle/{chunk-4SYYS7FT.js → chunk-RFR5KZGU.js} +1 -1
  25. package/bundle/{chunk-UVWRONOW.js → chunk-SJFSOFYJ.js} +2 -2
  26. package/bundle/chunk-SZK5XAFL.js +398 -0
  27. package/bundle/chunk-TXWIPUPY.js +400484 -0
  28. package/bundle/{chunk-ZNLZV6KB.js → chunk-UOXIYBXB.js} +1 -1
  29. package/bundle/chunk-VAGYZO4R.js +1571 -0
  30. package/bundle/chunk-VNGBTT2C.js +154 -0
  31. package/bundle/chunk-YZPLV23A.js +118 -0
  32. package/bundle/{chunk-ZXPUBJYD.js → chunk-ZAM747AR.js} +1 -1
  33. package/bundle/{cleanup-FHA2KSXH.js → cleanup-5PD3O5L7.js} +2 -2
  34. package/bundle/{cleanup-HY2KJG6D.js → cleanup-6IDD7Q3X.js} +2 -2
  35. package/bundle/{cleanup-UNKT2DM4.js → cleanup-7UL3PRLF.js} +2 -2
  36. package/bundle/cleanup-UTIIPF3A.js +32 -0
  37. package/bundle/{core-FGYHAZ6H.js → core-IIFMZU4H.js} +11 -1
  38. package/bundle/{devtoolsService-WDMSDVS7.js → devtoolsService-67KG4JD7.js} +2 -2
  39. package/bundle/{devtoolsService-FYN3P465.js → devtoolsService-A7VWEFDQ.js} +4 -3
  40. package/bundle/{devtoolsService-2RNXWTDT.js → devtoolsService-AK7UU2FI.js} +2 -2
  41. package/bundle/devtoolsService-REQSIEPU.js +4359 -0
  42. package/bundle/{dist-42YIZWSU.js → dist-5HHK4577.js} +11 -1
  43. package/bundle/{core-CYZFUAYU.js → dist-I74UZ4GA.js} +11 -1
  44. package/bundle/dist-QMOHSH2B.js +2248 -0
  45. package/bundle/docs/changelogs/index.md +16 -0
  46. package/bundle/docs/changelogs/latest.md +34 -55
  47. package/bundle/docs/changelogs/preview.md +65 -29
  48. package/bundle/{gemini-H6C5T6NZ.js → gemini-I47O5YI2.js} +21 -21
  49. package/bundle/{gemini-5VI65FOO.js → gemini-OFIYPHV5.js} +221 -205
  50. package/bundle/{gemini-DRDYGTKK.js → gemini-PGIEQLQD.js} +21 -21
  51. package/bundle/gemini-PLPMSDXJ.js +17863 -0
  52. package/bundle/gemini.js +7 -7
  53. package/bundle/{interactiveCli-TLTKI2C4.js → interactiveCli-CJEDKYUL.js} +31 -14
  54. package/bundle/{interactiveCli-SOVSAZ32.js → interactiveCli-JF6LE6RN.js} +334 -298
  55. package/bundle/{interactiveCli-KSL5ASTL.js → interactiveCli-JLFFVRVY.js} +31 -14
  56. package/bundle/interactiveCli-OG4JE4CU.js +34907 -0
  57. package/bundle/{liteRtServerManager-KO56TKLF.js → liteRtServerManager-4LVWWKUV.js} +4 -4
  58. package/bundle/{liteRtServerManager-T2GG72NW.js → liteRtServerManager-DVDNFJNH.js} +4 -4
  59. package/bundle/{liteRtServerManager-2CCV35OQ.js → liteRtServerManager-G4WG2Q45.js} +4 -4
  60. package/bundle/liteRtServerManager-MZO6JMNV.js +65 -0
  61. package/bundle/{oauth2-provider-TBQ7JUDB.js → oauth2-provider-CEQ4PAUC.js} +1 -1
  62. package/bundle/{oauth2-provider-BSRUMVCL.js → oauth2-provider-IBKEWCFT.js} +38 -72
  63. package/bundle/{oauth2-provider-UY26FDAA.js → oauth2-provider-KPLVYPVA.js} +1 -1
  64. package/bundle/oauth2-provider-UHJTSOLD.js +235 -0
  65. package/bundle/{start-NGSQCGCK.js → start-2A3VVOAH.js} +6 -6
  66. package/bundle/{start-RUS2QGZK.js → start-6PINHVUA.js} +6 -6
  67. package/bundle/{start-GCXJMSER.js → start-BZAGKSC2.js} +6 -6
  68. package/bundle/start-ZRUVAD7P.js +18 -0
  69. package/package.json +1 -1
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  exitCli,
4
4
  require_source
5
- } from "./chunk-IP26BEPK.js";
5
+ } from "./chunk-I7XQQVIO.js";
6
6
  import {
7
7
  AppEvent,
8
8
  appEvents
@@ -63,21 +63,23 @@ import {
63
63
  stripUnsafeCharacters,
64
64
  toCodePoints,
65
65
  validateCustomTheme
66
- } from "./chunk-4SYYS7FT.js";
66
+ } from "./chunk-EORMOPQX.js";
67
67
  import {
68
68
  isDevelopment
69
- } from "./chunk-KYWRBXUN.js";
69
+ } from "./chunk-KCZCDPS2.js";
70
70
  import {
71
71
  emptyIcon,
72
72
  mapCoreStatusToDisplayStatus,
73
73
  require_react
74
- } from "./chunk-ZXPUBJYD.js";
74
+ } from "./chunk-BRTA6WWG.js";
75
75
  import {
76
76
  ALL_EDITORS,
77
77
  ApprovalMode,
78
78
  AsyncFzf,
79
+ AuthType,
79
80
  Config,
80
81
  CoreEvent,
82
+ CoreToolCallStatus,
81
83
  DiscoveredMCPTool,
82
84
  ExtensionDisableEvent,
83
85
  ExtensionEnableEvent,
@@ -88,21 +90,32 @@ import {
88
90
  ExtensionUpdateEvent,
89
91
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
90
92
  GEMINI_DIR,
93
+ HookType,
94
+ IDEConnectionStatus,
91
95
  INITIAL_HISTORY_LENGTH,
92
96
  IdeClient,
93
97
  IdeConnectionEvent,
98
+ IdeConnectionType,
99
+ IntegrityDataStatus,
94
100
  KeychainTokenStorage,
101
+ LlmRole,
102
+ MCPDiscoveryState,
95
103
  MCPOAuthTokenStorage,
104
+ MCPServerStatus,
96
105
  ModelSlashCommandEvent,
106
+ PolicyDecision,
97
107
  ProjectIdRequiredError,
98
108
  REFERENCE_CONTENT_END,
99
109
  REFERENCE_CONTENT_START,
100
110
  ReadManyFilesTool,
101
111
  RewindEvent,
102
112
  SHELL_TOOL_NAME,
113
+ SessionEndReason,
114
+ SessionStartSource,
103
115
  ShellExecutionService,
104
116
  StartSessionEvent,
105
117
  Storage,
118
+ TrustLevel,
106
119
  UPGRADE_URL_PAGE,
107
120
  UserAccountManager,
108
121
  ValidationRequiredError,
@@ -238,7 +251,7 @@ import {
238
251
  tokenLimit,
239
252
  uiTelemetryService,
240
253
  unescapePath
241
- } from "./chunk-2MIF7TLR.js";
254
+ } from "./chunk-B3EF23HT.js";
242
255
  import {
243
256
  require_src
244
257
  } from "./chunk-L6PII3GR.js";
@@ -55045,6 +55058,7 @@ var useFocus = () => {
55045
55058
  };
55046
55059
  stdout?.write(ENABLE_FOCUS_REPORTING);
55047
55060
  stdin?.on("data", handleData);
55061
+ stdin?.resume?.();
55048
55062
  return () => {
55049
55063
  stdout?.write(DISABLE_FOCUS_REPORTING);
55050
55064
  stdin?.removeListener("data", handleData);
@@ -55182,6 +55196,7 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
55182
55196
  process.on("SIGINT", cleanupTerminalOnExit);
55183
55197
  return new Promise((resolve9) => {
55184
55198
  const originalRawMode = process.stdin.isRaw;
55199
+ const stdinWasFlowing = process.stdin.readableFlowing === true;
55185
55200
  if (!originalRawMode) {
55186
55201
  process.stdin.setRawMode(true);
55187
55202
  }
@@ -55197,6 +55212,9 @@ var TerminalCapabilityManager = class _TerminalCapabilityManager {
55197
55212
  clearTimeout(timeoutId);
55198
55213
  }
55199
55214
  process.stdin.removeListener("data", onData);
55215
+ if (!stdinWasFlowing && process.stdin.listenerCount("data") === 0) {
55216
+ process.stdin.pause?.();
55217
+ }
55200
55218
  if (!originalRawMode) {
55201
55219
  process.stdin.setRawMode(false);
55202
55220
  }
@@ -55949,11 +55967,14 @@ function KeypressProvider({
55949
55967
  );
55950
55968
  (0, import_react30.useEffect)(() => {
55951
55969
  terminalCapabilityManager.enableSupportedModes();
55970
+ if (!stdin) {
55971
+ return;
55972
+ }
55952
55973
  const wasRaw = stdin.isRaw;
55953
55974
  if (wasRaw === false) {
55954
55975
  setRawMode(true);
55955
55976
  }
55956
- process.stdin.setEncoding("utf8");
55977
+ stdin.setEncoding?.("utf8");
55957
55978
  let processor = nonKeyboardEventFilter(broadcast);
55958
55979
  if (!terminalCapabilityManager.isKittyProtocolEnabled()) {
55959
55980
  processor = bufferFastReturn(processor);
@@ -55971,6 +55992,7 @@ function KeypressProvider({
55971
55992
  };
55972
55993
  }
55973
55994
  stdin.on("data", dataListener);
55995
+ stdin.resume?.();
55974
55996
  return () => {
55975
55997
  stdin.removeListener("data", dataListener);
55976
55998
  if (wasRaw === false) {
@@ -60084,7 +60106,7 @@ var import_react34 = __toESM(require_react(), 1);
60084
60106
  function useIdeTrustListener() {
60085
60107
  const settings = useSettings();
60086
60108
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
60087
- "disconnected" /* Disconnected */
60109
+ IDEConnectionStatus.Disconnected
60088
60110
  );
60089
60111
  const previousTrust = (0, import_react34.useRef)(void 0);
60090
60112
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -60114,7 +60136,7 @@ function useIdeTrustListener() {
60114
60136
  };
60115
60137
  }, []);
60116
60138
  const getSnapshot = () => {
60117
- if (connectionStatus !== "connected" /* Connected */) {
60139
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
60118
60140
  return void 0;
60119
60141
  }
60120
60142
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -60819,7 +60841,7 @@ async function initializeApp(config, settings) {
60819
60841
  await ideClient.connect();
60820
60842
  logIdeConnection(
60821
60843
  config,
60822
- new IdeConnectionEvent("start" /* START */)
60844
+ new IdeConnectionEvent(IdeConnectionType.START)
60823
60845
  );
60824
60846
  }).catch((e) => {
60825
60847
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -60837,17 +60859,17 @@ async function initializeApp(config, settings) {
60837
60859
  // packages/cli/src/config/auth.ts
60838
60860
  async function validateAuthMethod(authMethod) {
60839
60861
  loadEnvironment(loadSettings().merged, process.cwd());
60840
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
60862
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
60841
60863
  return null;
60842
60864
  }
60843
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
60865
+ if (authMethod === AuthType.USE_GEMINI) {
60844
60866
  const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
60845
60867
  if (!key) {
60846
60868
  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)!";
60847
60869
  }
60848
60870
  return null;
60849
60871
  }
60850
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
60872
+ if (authMethod === AuthType.USE_VERTEX_AI) {
60851
60873
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
60852
60874
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
60853
60875
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -65373,7 +65395,7 @@ var ExtensionManager = class extends ExtensionLoader {
65373
65395
  const trustedFolders = loadTrustedFolders();
65374
65396
  await trustedFolders.setValue(
65375
65397
  this.workspaceDir,
65376
- "TRUST_FOLDER" /* TRUST_FOLDER */
65398
+ TrustLevel.TRUST_FOLDER
65377
65399
  );
65378
65400
  } else {
65379
65401
  throw new Error(
@@ -65559,7 +65581,7 @@ Would you like to attempt to install via "git clone" instead?`
65559
65581
  newExtensionConfig.version,
65560
65582
  previousExtensionConfig.version,
65561
65583
  installMetadata.type,
65562
- "success" /* Success */
65584
+ CoreToolCallStatus.Success
65563
65585
  )
65564
65586
  );
65565
65587
  if (newExtensionName !== previousName) {
@@ -65582,7 +65604,7 @@ Would you like to attempt to install via "git clone" instead?`
65582
65604
  getExtensionId(newExtensionConfig, installMetadata),
65583
65605
  newExtensionConfig.version,
65584
65606
  installMetadata.type,
65585
- "success" /* Success */
65607
+ CoreToolCallStatus.Success
65586
65608
  )
65587
65609
  );
65588
65610
  await this.enableExtension(
@@ -65615,7 +65637,7 @@ Would you like to attempt to install via "git clone" instead?`
65615
65637
  newExtensionConfig?.version ?? "",
65616
65638
  previousExtensionConfig.version,
65617
65639
  installMetadata.type,
65618
- "error" /* Error */
65640
+ CoreToolCallStatus.Error
65619
65641
  )
65620
65642
  );
65621
65643
  } else {
@@ -65627,7 +65649,7 @@ Would you like to attempt to install via "git clone" instead?`
65627
65649
  extensionId ?? "",
65628
65650
  newExtensionConfig?.version ?? "",
65629
65651
  installMetadata.type,
65630
- "error" /* Error */
65652
+ CoreToolCallStatus.Error
65631
65653
  )
65632
65654
  );
65633
65655
  }
@@ -65658,7 +65680,7 @@ Would you like to attempt to install via "git clone" instead?`
65658
65680
  extension.name,
65659
65681
  hashValue(extension.name),
65660
65682
  extension.id,
65661
- "success" /* Success */
65683
+ CoreToolCallStatus.Success
65662
65684
  )
65663
65685
  );
65664
65686
  }
@@ -65920,7 +65942,7 @@ Would you like to attempt to install via "git clone" instead?`
65920
65942
  if (eventHooks) {
65921
65943
  for (const definition of eventHooks) {
65922
65944
  for (const hook of definition.hooks) {
65923
- if (hook.type === "command" /* Command */) {
65945
+ if (hook.type === HookType.Command) {
65924
65946
  hook.env = { ...hook.env, ...hookEnv };
65925
65947
  }
65926
65948
  }
@@ -66468,9 +66490,13 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66468
66490
  /**
66469
66491
  * Check if server is enabled in FILE (persistent config only).
66470
66492
  * Does NOT include session state.
66493
+ * Fails closed (`false`) if the config file exists on disk but cannot be read or parsed.
66471
66494
  */
66472
66495
  async isFileEnabled(serverName) {
66473
66496
  const config = await this.readConfig();
66497
+ if (!config) {
66498
+ return false;
66499
+ }
66474
66500
  const state = config[normalizeServerId(serverName)];
66475
66501
  return state?.enabled ?? true;
66476
66502
  }
@@ -66493,10 +66519,14 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66493
66519
  /**
66494
66520
  * Enable a server persistently.
66495
66521
  * Removes the server from config file (defaults to enabled).
66522
+ * Does not overwrite the config file if existing contents cannot be read or parsed.
66496
66523
  */
66497
66524
  async enable(serverName) {
66498
66525
  const normalizedName = normalizeServerId(serverName);
66499
66526
  const config = await this.readConfig();
66527
+ if (!config) {
66528
+ return;
66529
+ }
66500
66530
  if (normalizedName in config) {
66501
66531
  delete config[normalizedName];
66502
66532
  await this.writeConfig(config);
@@ -66505,9 +66535,13 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66505
66535
  /**
66506
66536
  * Disable a server persistently.
66507
66537
  * Adds server to config file with enabled: false.
66538
+ * Does not overwrite the config file if existing contents cannot be read or parsed.
66508
66539
  */
66509
66540
  async disable(serverName) {
66510
66541
  const config = await this.readConfig();
66542
+ if (!config) {
66543
+ return;
66544
+ }
66511
66545
  config[normalizeServerId(serverName)] = { enabled: false };
66512
66546
  await this.writeConfig(config);
66513
66547
  }
@@ -66566,7 +66600,9 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66566
66600
  let wasDisabled = false;
66567
66601
  if (state.isPersistentDisabled) {
66568
66602
  await this.enable(normalizedName);
66569
- wasDisabled = true;
66603
+ if (await this.isFileEnabled(normalizedName)) {
66604
+ wasDisabled = true;
66605
+ }
66570
66606
  }
66571
66607
  if (state.isSessionDisabled) {
66572
66608
  this.clearSessionDisable(normalizedName);
@@ -66580,11 +66616,22 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66580
66616
  }
66581
66617
  /**
66582
66618
  * Read config from file asynchronously.
66619
+ * Returns `{}` if the file does not exist (`ENOENT`), or `null` if the file
66620
+ * cannot be read or parsed as a valid JSON object.
66583
66621
  */
66584
66622
  async readConfig() {
66585
66623
  try {
66586
66624
  const content = await fs17.readFile(this.configFilePath, "utf-8");
66587
- return JSON.parse(content);
66625
+ const parsed = JSON.parse(content);
66626
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
66627
+ coreEvents.emitFeedback(
66628
+ "error",
66629
+ "Failed to read MCP server enablement config.",
66630
+ new Error("MCP server enablement config must be a JSON object.")
66631
+ );
66632
+ return null;
66633
+ }
66634
+ return parsed;
66588
66635
  } catch (error) {
66589
66636
  if (error instanceof Error && "code" in error && error.code === "ENOENT") {
66590
66637
  return {};
@@ -66594,7 +66641,7 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
66594
66641
  "Failed to read MCP server enablement config.",
66595
66642
  error
66596
66643
  );
66597
- return {};
66644
+ return null;
66598
66645
  }
66599
66646
  }
66600
66647
  /**
@@ -67023,7 +67070,7 @@ async function readMcpResources(resourceParts, config, signal) {
67023
67070
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
67024
67071
  name: `resources/read (${resource.serverName})`,
67025
67072
  description: resource.uri,
67026
- status: "success" /* Success */,
67073
+ status: CoreToolCallStatus.Success,
67027
67074
  isClientInitiated: true,
67028
67075
  resultDisplay: `Successfully read resource ${resource.uri}`,
67029
67076
  confirmationDetails: void 0
@@ -67038,7 +67085,7 @@ async function readMcpResources(resourceParts, config, signal) {
67038
67085
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
67039
67086
  name: `resources/read (${resource.serverName})`,
67040
67087
  description: resource.uri,
67041
- status: "error" /* Error */,
67088
+ status: CoreToolCallStatus.Error,
67042
67089
  isClientInitiated: true,
67043
67090
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
67044
67091
  confirmationDetails: void 0
@@ -67063,7 +67110,7 @@ Content from @${result.uri}:
67063
67110
  }
67064
67111
  if (hasError) {
67065
67112
  const firstError = displays.find(
67066
- (d) => d.status === "error" /* Error */
67113
+ (d) => d.status === CoreToolCallStatus.Error
67067
67114
  );
67068
67115
  return {
67069
67116
  parts: [],
@@ -67104,7 +67151,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
67104
67151
  callId: `client-read-${userMessageTimestamp}`,
67105
67152
  name: readManyFilesTool.displayName,
67106
67153
  description: invocation.getDescription(),
67107
- status: "success" /* Success */,
67154
+ status: CoreToolCallStatus.Success,
67108
67155
  isClientInitiated: true,
67109
67156
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
67110
67157
  confirmationDetails: void 0
@@ -67151,7 +67198,7 @@ Content from @${displayPath}:
67151
67198
  callId: `client-read-${userMessageTimestamp}`,
67152
67199
  name: readManyFilesTool.displayName,
67153
67200
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
67154
- status: "error" /* Error */,
67201
+ status: CoreToolCallStatus.Error,
67155
67202
  isClientInitiated: true,
67156
67203
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
67157
67204
  confirmationDetails: void 0
@@ -70418,7 +70465,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
70418
70465
  if (wasRaw) {
70419
70466
  setRawMode?.(true);
70420
70467
  }
70421
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
70468
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
70422
70469
  }
70423
70470
  }
70424
70471
 
@@ -73113,7 +73160,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
73113
73160
  extension.name,
73114
73161
  installMetadata
73115
73162
  );
73116
- if (status === "invalid" /* INVALID */) {
73163
+ if (status === IntegrityDataStatus.INVALID) {
73117
73164
  throw new Error("Extension integrity cannot be verified");
73118
73165
  }
73119
73166
  } catch (e) {
@@ -74534,11 +74581,11 @@ var ShellProcessor = class {
74534
74581
  },
74535
74582
  void 0
74536
74583
  );
74537
- if (decision === "deny" /* DENY */) {
74584
+ if (decision === PolicyDecision.DENY) {
74538
74585
  throw new Error(
74539
74586
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
74540
74587
  );
74541
- } else if (decision === "ask_user" /* ASK_USER */) {
74588
+ } else if (decision === PolicyDecision.ASK_USER) {
74542
74589
  commandsToConfirm.add(command);
74543
74590
  }
74544
74591
  }
@@ -75653,7 +75700,7 @@ var MultiFolderTrustDialog = ({
75653
75700
  if (choice === 1 /* YES_AND_REMEMBER */) {
75654
75701
  await trustedFolders.setValue(
75655
75702
  expandedPath,
75656
- "TRUST_FOLDER" /* TRUST_FOLDER */
75703
+ TrustLevel.TRUST_FOLDER
75657
75704
  );
75658
75705
  }
75659
75706
  workspaceContext.addDirectory(expandedPath);
@@ -75939,10 +75986,10 @@ function isShellTool(name) {
75939
75986
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
75940
75987
  }
75941
75988
  function isThisShellFocusable(name, status, config) {
75942
- return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
75989
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
75943
75990
  }
75944
75991
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
75945
- return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
75992
+ return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
75946
75993
  }
75947
75994
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
75948
75995
  const [userHasFocused, setUserHasFocused] = (0, import_react56.useState)(false);
@@ -76102,14 +76149,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
76102
76149
  if (isTrackedToolCall(t)) {
76103
76150
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
76104
76151
  } else {
76105
- return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
76152
+ return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
76106
76153
  }
76107
76154
  });
76108
76155
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
76109
76156
  if (isTrackedToolCall(t)) {
76110
76157
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
76111
76158
  } else {
76112
- return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
76159
+ return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
76113
76160
  }
76114
76161
  });
76115
76162
  const isShellCommand = toolsToInspect.some((t) => {
@@ -77547,7 +77594,7 @@ var authCommand = {
77547
77594
  import process29 from "node:process";
77548
77595
 
77549
77596
  // packages/cli/src/generated/git-commit.ts
77550
- var GIT_COMMIT_INFO = "f50ba8608";
77597
+ var GIT_COMMIT_INFO = "2fe7c2d3f";
77551
77598
 
77552
77599
  // packages/cli/src/ui/utils/historyExportUtils.ts
77553
77600
  import * as fsPromises from "node:fs/promises";
@@ -78193,7 +78240,7 @@ var clearCommand = {
78193
78240
  const config = context.services.agentContext?.config;
78194
78241
  const hookSystem = config?.getHookSystem();
78195
78242
  if (hookSystem) {
78196
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
78243
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
78197
78244
  }
78198
78245
  config?.injectionService.clear();
78199
78246
  let newSessionId;
@@ -78210,7 +78257,7 @@ var clearCommand = {
78210
78257
  }
78211
78258
  let result;
78212
78259
  if (hookSystem) {
78213
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
78260
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
78214
78261
  }
78215
78262
  await new Promise((resolve9) => setImmediate(resolve9));
78216
78263
  if (config) {
@@ -81209,7 +81256,7 @@ var Footer = () => {
81209
81256
  case "auth": {
81210
81257
  if (!settings.merged.ui.showUserIdentity) break;
81211
81258
  if (!authType) break;
81212
- const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
81259
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
81213
81260
  addCol(
81214
81261
  id,
81215
81262
  header,
@@ -82977,12 +83024,12 @@ import path29 from "node:path";
82977
83024
  function getIdeStatusMessage(ideClient) {
82978
83025
  const connection = ideClient.getConnectionStatus();
82979
83026
  switch (connection.status) {
82980
- case "connected" /* Connected */:
83027
+ case IDEConnectionStatus.Connected:
82981
83028
  return {
82982
83029
  messageType: "info",
82983
83030
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
82984
83031
  };
82985
- case "connecting" /* Connecting */:
83032
+ case IDEConnectionStatus.Connecting:
82986
83033
  return {
82987
83034
  messageType: "info",
82988
83035
  content: `\u{1F7E1} Connecting...`
@@ -83023,7 +83070,7 @@ ${infoMessage}`;
83023
83070
  async function getIdeStatusMessageWithFiles(ideClient) {
83024
83071
  const connection = ideClient.getConnectionStatus();
83025
83072
  switch (connection.status) {
83026
- case "connected" /* Connected */: {
83073
+ case IDEConnectionStatus.Connected: {
83027
83074
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
83028
83075
  const context = ideContextStore.get();
83029
83076
  const openFiles = context?.workspaceState?.openFiles;
@@ -83035,7 +83082,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
83035
83082
  content
83036
83083
  };
83037
83084
  }
83038
- case "connecting" /* Connecting */:
83085
+ case IDEConnectionStatus.Connecting:
83039
83086
  return {
83040
83087
  messageType: "info",
83041
83088
  content: `\u{1F7E1} Connecting...`
@@ -83057,7 +83104,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
83057
83104
  const ideClient = await IdeClient.getInstance();
83058
83105
  if (value) {
83059
83106
  await ideClient.connect(options);
83060
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
83107
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
83061
83108
  } else {
83062
83109
  await ideClient.disconnect();
83063
83110
  }
@@ -83145,7 +83192,7 @@ var ideCommand = async () => {
83145
83192
  logToConsole: false
83146
83193
  }
83147
83194
  );
83148
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
83195
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
83149
83196
  break;
83150
83197
  }
83151
83198
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -83222,7 +83269,7 @@ var ideCommand = async () => {
83222
83269
  }
83223
83270
  };
83224
83271
  const { status } = ideClient.getConnectionStatus();
83225
- const isConnected = status === "connected" /* Connected */;
83272
+ const isConnected = status === IDEConnectionStatus.Connected;
83226
83273
  if (isConnected) {
83227
83274
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
83228
83275
  } else {
@@ -83322,13 +83369,13 @@ Use /mcp auth <server-name> to authenticate.`
83322
83369
  const displayListener = (message) => {
83323
83370
  context.ui.addItem({ type: "info", text: message });
83324
83371
  };
83325
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
83372
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
83326
83373
  try {
83327
83374
  context.ui.addItem({
83328
83375
  type: "info",
83329
83376
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
83330
83377
  });
83331
- const { MCPOAuthProvider } = await import("./core-CYZFUAYU.js");
83378
+ const { MCPOAuthProvider } = await import("./dist-QMOHSH2B.js");
83332
83379
  let oauthConfig = server.oauth;
83333
83380
  if (!oauthConfig) {
83334
83381
  oauthConfig = { enabled: false };
@@ -83365,7 +83412,7 @@ Use /mcp auth <server-name> to authenticate.`
83365
83412
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
83366
83413
  };
83367
83414
  } finally {
83368
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
83415
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
83369
83416
  }
83370
83417
  },
83371
83418
  completion: async (context, partialArg) => {
@@ -83411,10 +83458,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
83411
83458
  }
83412
83459
  const serverNames = Object.keys(mcpServers);
83413
83460
  const connectingServers = serverNames.filter(
83414
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
83461
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
83415
83462
  );
83416
83463
  const discoveryState = getMCPDiscoveryState();
83417
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
83464
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
83418
83465
  const allTools = toolRegistry.getAllTools();
83419
83466
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
83420
83467
  const promptRegistry = config.getPromptRegistry();
@@ -99186,7 +99233,7 @@ Return a JSON object with:
99186
99233
  },
99187
99234
  abortSignal: new AbortController().signal,
99188
99235
  promptId: "triage-duplicates",
99189
- role: "utility_tool" /* UTILITY_TOOL */
99236
+ role: LlmRole.UTILITY_TOOL
99190
99237
  });
99191
99238
  const rec = response;
99192
99239
  let canonical;
@@ -100020,7 +100067,7 @@ Return a JSON object with:
100020
100067
  },
100021
100068
  abortSignal: abortControllerRef.current.signal,
100022
100069
  promptId: "triage-issues",
100023
- role: "utility_tool" /* UTILITY_TOOL */
100070
+ role: LlmRole.UTILITY_TOOL
100024
100071
  });
100025
100072
  return response;
100026
100073
  },
@@ -100594,8 +100641,8 @@ var planCommand = {
100594
100641
  return;
100595
100642
  }
100596
100643
  const previousApprovalMode = config.getApprovalMode();
100597
- config.setApprovalMode("plan" /* PLAN */);
100598
- if (previousApprovalMode !== "plan" /* PLAN */) {
100644
+ config.setApprovalMode(ApprovalMode.PLAN);
100645
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
100599
100646
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
100600
100647
  }
100601
100648
  if (context.invocation?.args) {
@@ -100654,10 +100701,10 @@ var categorizeRulesByMode = (rules) => {
100654
100701
  rules.forEach((rule) => {
100655
100702
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
100656
100703
  const modeSet = new Set(modes);
100657
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
100658
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
100659
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
100660
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
100704
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
100705
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
100706
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
100707
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
100661
100708
  });
100662
100709
  return result;
100663
100710
  };
@@ -102038,7 +102085,7 @@ var upgradeCommand = {
102038
102085
  action: async (context) => {
102039
102086
  const config = context.services.agentContext?.config;
102040
102087
  const authType = config?.getContentGeneratorConfig()?.authType;
102041
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
102088
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
102042
102089
  return {
102043
102090
  type: "message",
102044
102091
  messageType: "error",
@@ -102267,7 +102314,7 @@ var BuiltinCommandLoader = class {
102267
102314
  setupGithubCommand,
102268
102315
  terminalSetupCommand,
102269
102316
  ...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
102270
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
102317
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
102271
102318
  ];
102272
102319
  handle?.end();
102273
102320
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  CoreToolCallStatus,
4
4
  checkExhaustive
5
- } from "./chunk-7LRWECUM.js";
5
+ } from "./chunk-ERMD62K5.js";
6
6
  import {
7
7
  __commonJS,
8
8
  __toESM