@google/gemini-cli 0.71.0-nightly.20261123.geecccfcd5 → 0.72.0-preview.0

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 (74) hide show
  1. package/bundle/{chunk-74F5ZRXI.js → chunk-2LHOWVR4.js} +2 -2
  2. package/bundle/{chunk-NBZ3S2OI.js → chunk-357SHFSP.js} +1 -1
  3. package/bundle/{chunk-DNLZQS6M.js → chunk-5URPLR2H.js} +1 -1
  4. package/bundle/{chunk-6FOUJKOM.js → chunk-7554FKWM.js} +4 -4
  5. package/bundle/{chunk-YHOSX4HX.js → chunk-7ZTBMXIU.js} +2 -2
  6. package/bundle/{chunk-L2ISE4LK.js → chunk-AJWHZBWZ.js} +6 -8
  7. package/bundle/{chunk-66M6QVYR.js → chunk-BRYTKVAX.js} +4 -4
  8. package/bundle/{chunk-DWF6VLET.js → chunk-BZ5FSDRR.js} +3 -3
  9. package/bundle/{chunk-6MLLHGAR.js → chunk-CIX33OUZ.js} +2 -2
  10. package/bundle/{chunk-3IQPEEFT.js → chunk-DDPEWL4G.js} +1 -1
  11. package/bundle/{chunk-RJEQTG6S.js → chunk-DIMNI6AC.js} +2 -2
  12. package/bundle/{chunk-QADAHCRT.js → chunk-ENSJIXBN.js} +1 -1
  13. package/bundle/{chunk-L2B5JJZC.js → chunk-EUWUJXIY.js} +1 -1
  14. package/bundle/{chunk-BTUHEN4Y.js → chunk-IGFGTPGV.js} +1 -1
  15. package/bundle/{chunk-YYWNIP3F.js → chunk-JTWV2RYT.js} +1 -1
  16. package/bundle/{chunk-GNXMAFUR.js → chunk-MNOSCPOM.js} +7 -7
  17. package/bundle/{chunk-A3SNIZ4K.js → chunk-N4ZMA5CZ.js} +1 -1
  18. package/bundle/{chunk-BVNLNGFD.js → chunk-QESC7SGF.js} +7 -7
  19. package/bundle/{chunk-4DJQWGT3.js → chunk-SJKJH5QA.js} +1 -1
  20. package/bundle/{chunk-QWS2TBZG.js → chunk-SMYIRL3Y.js} +3 -3
  21. package/bundle/{chunk-3OVOJOQV.js → chunk-TLQ4STKV.js} +58 -71
  22. package/bundle/{chunk-YEEWGYBU.js → chunk-UUAR3JIA.js} +2 -2
  23. package/bundle/{chunk-EUUDSNXQ.js → chunk-WHSJKDVL.js} +1 -1
  24. package/bundle/{chunk-PL6IIPTX.js → chunk-XER4IQTC.js} +1 -1
  25. package/bundle/{chunk-NLZKOWER.js → chunk-Y2AE7RGI.js} +8 -9
  26. package/bundle/{chunk-6NXCSVSN.js → chunk-YFNHROPZ.js} +15422 -8067
  27. package/bundle/{chunk-SLTPPXVT.js → chunk-Z4LLSOJM.js} +3 -3
  28. package/bundle/{cleanup-JXHWEYF4.js → cleanup-A7CTJL7Z.js} +2 -2
  29. package/bundle/{cleanup-NXI65SJI.js → cleanup-ACKRM2TX.js} +2 -2
  30. package/bundle/{cleanup-PQFQN5PN.js → cleanup-DSTWENO3.js} +2 -2
  31. package/bundle/{dist-YWJAC3IM.js → core-3V44EMV6.js} +1 -1
  32. package/bundle/{core-DQSJHYG4.js → core-UF6OK2YN.js} +1 -1
  33. package/bundle/{devtoolsService-CVJOOHGM.js → devtoolsService-7MR7MUMD.js} +2 -2
  34. package/bundle/{devtoolsService-NOXMAH56.js → devtoolsService-NP7EGEMK.js} +2 -2
  35. package/bundle/{devtoolsService-UZFFGBEG.js → devtoolsService-Q5HYPUU7.js} +3 -4
  36. package/bundle/{dist-G5K3DGI7.js → dist-J3MSC3FF.js} +1 -1
  37. package/bundle/{formatError-CAMIQWHM.js → formatError-EFFRJTZP.js} +2 -2
  38. package/bundle/{formatError-PB6SEHWE.js → formatError-RG2BTO6O.js} +2 -2
  39. package/bundle/{formatError-Q33TSKEK.js → formatError-RZ6FNHFK.js} +2 -2
  40. package/bundle/{gemini-QKY2KKYF.js → gemini-5N7SJRYD.js} +208 -224
  41. package/bundle/{gemini-TQYJRVJP.js → gemini-DQYZ2M5M.js} +14 -14
  42. package/bundle/{gemini-OAKFBKMR.js → gemini-NGMQM6D3.js} +15 -15
  43. package/bundle/gemini.js +8 -8
  44. package/bundle/{interactiveCli-L5IOZTYF.js → interactiveCli-3QAMPJPK.js} +8 -8
  45. package/bundle/{interactiveCli-3FEZU7GJ.js → interactiveCli-DBUWQW3L.js} +300 -319
  46. package/bundle/{interactiveCli-W4IK4C6F.js → interactiveCli-M2IE6ZF4.js} +8 -8
  47. package/bundle/{liteRtServerManager-7GQLUYCC.js → liteRtServerManager-LX6B5CI3.js} +4 -4
  48. package/bundle/{liteRtServerManager-GSYRGOB6.js → liteRtServerManager-TI6LO5RU.js} +4 -4
  49. package/bundle/{liteRtServerManager-TVKXINGU.js → liteRtServerManager-TW3MMGOA.js} +4 -4
  50. package/bundle/{oauth2-provider-XADKJYM3.js → oauth2-provider-2JRAM5FI.js} +1 -1
  51. package/bundle/{oauth2-provider-JAYH53PG.js → oauth2-provider-3PBBHV75.js} +1 -1
  52. package/bundle/{oauth2-provider-LZKJKLFG.js → oauth2-provider-PG5AFZDD.js} +79 -41
  53. package/bundle/{start-4GERR54C.js → start-2XM3XTTW.js} +6 -6
  54. package/bundle/{start-5Q2AJMC5.js → start-HGHTVHPT.js} +6 -6
  55. package/bundle/{start-7ZXOELXX.js → start-TDNB5CJ6.js} +6 -6
  56. package/package.json +1 -1
  57. package/bundle/chunk-5VAAW2SW.js +0 -118
  58. package/bundle/chunk-CPZ55WK4.js +0 -40031
  59. package/bundle/chunk-GPIHTZ7M.js +0 -190
  60. package/bundle/chunk-IOX7QOR4.js +0 -1962
  61. package/bundle/chunk-M2J4XK5W.js +0 -60338
  62. package/bundle/chunk-OSBXDFYN.js +0 -512
  63. package/bundle/chunk-TE62WOO3.js +0 -65
  64. package/bundle/chunk-VTIY77BF.js +0 -1571
  65. package/bundle/chunk-Y3VJ5NLZ.js +0 -420386
  66. package/bundle/cleanup-UNQWTWUR.js +0 -34
  67. package/bundle/devtoolsService-OCTFSUNQ.js +0 -919
  68. package/bundle/dist-GPX2ZA4V.js +0 -2372
  69. package/bundle/formatError-QRSNJJ27.js +0 -14
  70. package/bundle/gemini-Z66TS6IL.js +0 -20021
  71. package/bundle/interactiveCli-DBDBYD65.js +0 -36447
  72. package/bundle/liteRtServerManager-YUBDDMLI.js +0 -65
  73. package/bundle/oauth2-provider-ZOXGSM7Y.js +0 -273
  74. package/bundle/start-O7HDURUW.js +0 -18
@@ -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-VTIY77BF.js";
5
+ } from "./chunk-SJKJH5QA.js";
6
6
  import {
7
7
  AppEvent,
8
8
  appEvents
@@ -69,24 +69,22 @@ import {
69
69
  use_stdin_default,
70
70
  use_stdout_default,
71
71
  validateCustomTheme
72
- } from "./chunk-L2ISE4LK.js";
72
+ } from "./chunk-AJWHZBWZ.js";
73
73
  import {
74
74
  isDevelopment,
75
75
  require_semver
76
- } from "./chunk-RJEQTG6S.js";
76
+ } from "./chunk-DIMNI6AC.js";
77
77
  import {
78
78
  emptyIcon,
79
79
  mapCoreStatusToDisplayStatus,
80
80
  require_react
81
- } from "./chunk-NLZKOWER.js";
81
+ } from "./chunk-JTWV2RYT.js";
82
82
  import {
83
83
  ALL_EDITORS,
84
84
  ApprovalMode,
85
85
  AsyncFzf,
86
- AuthType,
87
86
  Config,
88
87
  CoreEvent,
89
- CoreToolCallStatus,
90
88
  Cs,
91
89
  DEFAULT_GEMINI_MODEL_AUTO,
92
90
  DEFAULT_HEATMAP_WINDOW_DAYS,
@@ -105,33 +103,22 @@ import {
105
103
  GEMINI_MODEL_ALIAS_FLASH,
106
104
  GEMINI_MODEL_ALIAS_FLASH_LITE,
107
105
  GEMINI_MODEL_ALIAS_PRO,
108
- HookType,
109
- IDEConnectionStatus,
110
106
  INITIAL_HISTORY_LENGTH,
111
107
  IdeClient,
112
108
  IdeConnectionEvent,
113
- IdeConnectionType,
114
- IntegrityDataStatus,
115
109
  KeychainTokenStorage,
116
- LlmRole,
117
- MCPDiscoveryState,
118
110
  MCPOAuthTokenStorage,
119
- MCPServerStatus,
120
111
  ModelSlashCommandEvent,
121
112
  PREVIEW_GEMINI_MODEL_AUTO,
122
- PolicyDecision,
123
113
  ProjectIdRequiredError,
124
114
  REFERENCE_CONTENT_END,
125
115
  REFERENCE_CONTENT_START,
126
116
  ReadManyFilesTool,
127
117
  RewindEvent,
128
118
  SHELL_TOOL_NAME,
129
- SessionEndReason,
130
- SessionStartSource,
131
119
  ShellExecutionService,
132
120
  StartSessionEvent,
133
121
  Storage,
134
- TrustLevel,
135
122
  UPGRADE_URL_PAGE,
136
123
  UserAccountManager,
137
124
  VALID_GEMINI_MODELS,
@@ -269,7 +256,7 @@ import {
269
256
  unescapePath,
270
257
  validateUrlDestination,
271
258
  wo
272
- } from "./chunk-66M6QVYR.js";
259
+ } from "./chunk-YFNHROPZ.js";
273
260
  import {
274
261
  require_src
275
262
  } from "./chunk-L6PII3GR.js";
@@ -11234,17 +11221,17 @@ var require_core2 = __commonJS({
11234
11221
  // packages/cli/src/config/auth.ts
11235
11222
  async function validateAuthMethod(authMethod) {
11236
11223
  loadEnvironment(loadSettings().merged, process.cwd());
11237
- if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
11224
+ if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
11238
11225
  return null;
11239
11226
  }
11240
- if (authMethod === AuthType.USE_GEMINI) {
11227
+ if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
11241
11228
  const key = process.env["GEMINI_API_KEY"] || await loadApiKey();
11242
11229
  if (!key) {
11243
11230
  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)!";
11244
11231
  }
11245
11232
  return null;
11246
11233
  }
11247
- if (authMethod === AuthType.USE_VERTEX_AI) {
11234
+ if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
11248
11235
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
11249
11236
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
11250
11237
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -16936,7 +16923,7 @@ var import_react8 = __toESM(require_react(), 1);
16936
16923
  function useIdeTrustListener() {
16937
16924
  const settings = useSettings();
16938
16925
  const [connectionStatus, setConnectionStatus] = (0, import_react8.useState)(
16939
- IDEConnectionStatus.Disconnected
16926
+ "disconnected" /* Disconnected */
16940
16927
  );
16941
16928
  const previousTrust = (0, import_react8.useRef)(void 0);
16942
16929
  const [restartReason, setRestartReason] = (0, import_react8.useState)("NONE");
@@ -16966,7 +16953,7 @@ function useIdeTrustListener() {
16966
16953
  };
16967
16954
  }, []);
16968
16955
  const getSnapshot = () => {
16969
- if (connectionStatus !== IDEConnectionStatus.Connected) {
16956
+ if (connectionStatus !== "connected" /* Connected */) {
16970
16957
  return void 0;
16971
16958
  }
16972
16959
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -17671,7 +17658,7 @@ async function initializeApp(config, settings) {
17671
17658
  await ideClient.connect();
17672
17659
  logIdeConnection(
17673
17660
  config,
17674
- new IdeConnectionEvent(IdeConnectionType.START)
17661
+ new IdeConnectionEvent("start" /* START */)
17675
17662
  );
17676
17663
  }).catch((e) => {
17677
17664
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -22614,7 +22601,7 @@ var ExtensionManager = class extends ExtensionLoader {
22614
22601
  const trustedFolders = loadTrustedFolders();
22615
22602
  await trustedFolders.setValue(
22616
22603
  this.workspaceDir,
22617
- TrustLevel.TRUST_FOLDER
22604
+ "TRUST_FOLDER" /* TRUST_FOLDER */
22618
22605
  );
22619
22606
  } else {
22620
22607
  throw new Error(
@@ -22812,7 +22799,7 @@ Would you like to attempt to install via "git clone" instead?`
22812
22799
  newExtensionConfig.version,
22813
22800
  previousExtensionConfig.version,
22814
22801
  installMetadata.type,
22815
- CoreToolCallStatus.Success
22802
+ "success" /* Success */
22816
22803
  )
22817
22804
  );
22818
22805
  if (newExtensionName !== previousName) {
@@ -22835,7 +22822,7 @@ Would you like to attempt to install via "git clone" instead?`
22835
22822
  getExtensionId(newExtensionConfig, installMetadata),
22836
22823
  newExtensionConfig.version,
22837
22824
  installMetadata.type,
22838
- CoreToolCallStatus.Success
22825
+ "success" /* Success */
22839
22826
  )
22840
22827
  );
22841
22828
  await this.enableExtension(
@@ -22883,7 +22870,7 @@ Would you like to attempt to install via "git clone" instead?`
22883
22870
  newExtensionConfig?.version ?? "",
22884
22871
  previousExtensionConfig.version,
22885
22872
  installMetadata.type,
22886
- CoreToolCallStatus.Error
22873
+ "error" /* Error */
22887
22874
  )
22888
22875
  );
22889
22876
  } else {
@@ -22895,7 +22882,7 @@ Would you like to attempt to install via "git clone" instead?`
22895
22882
  extensionId ?? "",
22896
22883
  newExtensionConfig?.version ?? "",
22897
22884
  installMetadata.type,
22898
- CoreToolCallStatus.Error
22885
+ "error" /* Error */
22899
22886
  )
22900
22887
  );
22901
22888
  }
@@ -22923,7 +22910,7 @@ Would you like to attempt to install via "git clone" instead?`
22923
22910
  extension.name,
22924
22911
  hashValue(extension.name),
22925
22912
  extension.id,
22926
- CoreToolCallStatus.Success
22913
+ "success" /* Success */
22927
22914
  )
22928
22915
  );
22929
22916
  }
@@ -23189,7 +23176,7 @@ Would you like to attempt to install via "git clone" instead?`
23189
23176
  if (eventHooks) {
23190
23177
  for (const definition of eventHooks) {
23191
23178
  for (const hook of definition.hooks) {
23192
- if (hook.type === HookType.Command) {
23179
+ if (hook.type === "command" /* Command */) {
23193
23180
  hook.env = { ...hook.env, ...hookEnv };
23194
23181
  }
23195
23182
  }
@@ -24352,7 +24339,7 @@ async function readMcpResources(resourceParts, config, signal) {
24352
24339
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
24353
24340
  name: `resources/read (${resource.serverName})`,
24354
24341
  description: resource.uri,
24355
- status: CoreToolCallStatus.Success,
24342
+ status: "success" /* Success */,
24356
24343
  isClientInitiated: true,
24357
24344
  resultDisplay: `Successfully read resource ${resource.uri}`,
24358
24345
  confirmationDetails: void 0
@@ -24367,7 +24354,7 @@ async function readMcpResources(resourceParts, config, signal) {
24367
24354
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
24368
24355
  name: `resources/read (${resource.serverName})`,
24369
24356
  description: resource.uri,
24370
- status: CoreToolCallStatus.Error,
24357
+ status: "error" /* Error */,
24371
24358
  isClientInitiated: true,
24372
24359
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
24373
24360
  confirmationDetails: void 0
@@ -24392,7 +24379,7 @@ Content from @${result.uri}:
24392
24379
  }
24393
24380
  if (hasError) {
24394
24381
  const firstError = displays.find(
24395
- (d) => d.status === CoreToolCallStatus.Error
24382
+ (d) => d.status === "error" /* Error */
24396
24383
  );
24397
24384
  return {
24398
24385
  parts: [],
@@ -24431,7 +24418,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
24431
24418
  callId: `client-read-${userMessageTimestamp}`,
24432
24419
  name: readManyFilesTool.displayName,
24433
24420
  description: invocation.getDescription(),
24434
- status: CoreToolCallStatus.Success,
24421
+ status: "success" /* Success */,
24435
24422
  isClientInitiated: true,
24436
24423
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
24437
24424
  confirmationDetails: void 0
@@ -24480,7 +24467,7 @@ Content from @${displayPath}:
24480
24467
  callId: `client-read-${userMessageTimestamp}`,
24481
24468
  name: readManyFilesTool.displayName,
24482
24469
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
24483
- status: CoreToolCallStatus.Error,
24470
+ status: "error" /* Error */,
24484
24471
  isClientInitiated: true,
24485
24472
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
24486
24473
  confirmationDetails: void 0
@@ -27747,7 +27734,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
27747
27734
  if (wasRaw) {
27748
27735
  setRawMode?.(true);
27749
27736
  }
27750
- coreEvents.emit(CoreEvent.ExternalEditorClosed);
27737
+ coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
27751
27738
  }
27752
27739
  }
27753
27740
 
@@ -30441,7 +30428,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
30441
30428
  extension.name,
30442
30429
  installMetadata
30443
30430
  );
30444
- if (status === IntegrityDataStatus.INVALID) {
30431
+ if (status === "invalid" /* INVALID */) {
30445
30432
  throw new Error("Extension integrity cannot be verified");
30446
30433
  }
30447
30434
  } catch (e) {
@@ -31947,11 +31934,11 @@ var ShellProcessor = class {
31947
31934
  },
31948
31935
  void 0
31949
31936
  );
31950
- if (decision === PolicyDecision.DENY) {
31937
+ if (decision === "deny" /* DENY */) {
31951
31938
  throw new Error(
31952
31939
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
31953
31940
  );
31954
- } else if (decision === PolicyDecision.ASK_USER) {
31941
+ } else if (decision === "ask_user" /* ASK_USER */) {
31955
31942
  commandsToConfirm.add(command);
31956
31943
  }
31957
31944
  }
@@ -33081,7 +33068,7 @@ var MultiFolderTrustDialog = ({
33081
33068
  if (choice === 1 /* YES_AND_REMEMBER */) {
33082
33069
  await trustedFolders.setValue(
33083
33070
  expandedPath,
33084
- TrustLevel.TRUST_FOLDER
33071
+ "TRUST_FOLDER" /* TRUST_FOLDER */
33085
33072
  );
33086
33073
  }
33087
33074
  workspaceContext.addDirectory(expandedPath);
@@ -33412,10 +33399,10 @@ function isShellTool(name) {
33412
33399
  return name === SHELL_COMMAND_NAME || name === SHELL_NAME || name === SHELL_TOOL_NAME || normalized === "shell";
33413
33400
  }
33414
33401
  function isThisShellFocusable(name, status, config) {
33415
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && config?.getEnableInteractiveShell());
33402
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && config?.getEnableInteractiveShell());
33416
33403
  }
33417
33404
  function isThisShellFocused(name, status, ptyId, activeShellPtyId, embeddedShellFocused) {
33418
- return !!(isShellTool(name) && status === CoreToolCallStatus.Executing && ptyId === activeShellPtyId && embeddedShellFocused);
33405
+ return !!(isShellTool(name) && status === "executing" /* Executing */ && ptyId === activeShellPtyId && embeddedShellFocused);
33419
33406
  }
33420
33407
  function useFocusHint(isThisShellFocusable2, isThisShellFocused2, resultDisplay) {
33421
33408
  const [userHasFocused, setUserHasFocused] = (0, import_react30.useState)(false);
@@ -33575,14 +33562,14 @@ function getToolGroupBorderAppearance(item, activeShellPtyId, embeddedShellFocus
33575
33562
  if (isTrackedToolCall(t)) {
33576
33563
  return t.status !== "success" && t.status !== "error" && t.status !== "cancelled";
33577
33564
  } else {
33578
- return t.status !== CoreToolCallStatus.Success && t.status !== CoreToolCallStatus.Error && t.status !== CoreToolCallStatus.Cancelled;
33565
+ return t.status !== "success" /* Success */ && t.status !== "error" /* Error */ && t.status !== "cancelled" /* Cancelled */;
33579
33566
  }
33580
33567
  });
33581
33568
  const isEmbeddedShellFocused = toolsToInspect.some((t) => {
33582
33569
  if (isTrackedToolCall(t)) {
33583
33570
  return isShellTool(t.request.name) && t.status === "executing" && t.pid === activeShellPtyId && !!embeddedShellFocused;
33584
33571
  } else {
33585
- return isShellTool(t.name) && t.status === CoreToolCallStatus.Executing && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
33572
+ return isShellTool(t.name) && t.status === "executing" /* Executing */ && t.ptyId === activeShellPtyId && !!embeddedShellFocused;
33586
33573
  }
33587
33574
  });
33588
33575
  const isShellCommand = toolsToInspect.some((t) => {
@@ -35020,7 +35007,7 @@ var authCommand = {
35020
35007
  import process12 from "node:process";
35021
35008
 
35022
35009
  // packages/cli/src/generated/git-commit.ts
35023
- var GIT_COMMIT_INFO = "eecccfcd5";
35010
+ var GIT_COMMIT_INFO = "aafdfdfb5";
35024
35011
 
35025
35012
  // packages/cli/src/ui/utils/historyExportUtils.ts
35026
35013
  import * as fsPromises from "node:fs/promises";
@@ -35666,7 +35653,7 @@ var clearCommand = {
35666
35653
  const config = context.services.agentContext?.config;
35667
35654
  const hookSystem = config?.getHookSystem();
35668
35655
  if (hookSystem) {
35669
- await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
35656
+ await hookSystem.fireSessionEndEvent("clear" /* Clear */);
35670
35657
  }
35671
35658
  config?.injectionService.clear();
35672
35659
  let newSessionId;
@@ -35683,7 +35670,7 @@ var clearCommand = {
35683
35670
  }
35684
35671
  let result;
35685
35672
  if (hookSystem) {
35686
- result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
35673
+ result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
35687
35674
  }
35688
35675
  await new Promise((resolve9) => setImmediate(resolve9));
35689
35676
  if (config) {
@@ -38692,7 +38679,7 @@ var Footer = () => {
38692
38679
  case "auth": {
38693
38680
  if (!settings.merged.ui.showUserIdentity) break;
38694
38681
  if (!authType) break;
38695
- const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
38682
+ const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
38696
38683
  addCol(
38697
38684
  id,
38698
38685
  header,
@@ -40491,12 +40478,12 @@ import path28 from "node:path";
40491
40478
  function getIdeStatusMessage(ideClient) {
40492
40479
  const connection = ideClient.getConnectionStatus();
40493
40480
  switch (connection.status) {
40494
- case IDEConnectionStatus.Connected:
40481
+ case "connected" /* Connected */:
40495
40482
  return {
40496
40483
  messageType: "info",
40497
40484
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
40498
40485
  };
40499
- case IDEConnectionStatus.Connecting:
40486
+ case "connecting" /* Connecting */:
40500
40487
  return {
40501
40488
  messageType: "info",
40502
40489
  content: `\u{1F7E1} Connecting...`
@@ -40537,7 +40524,7 @@ ${infoMessage}`;
40537
40524
  async function getIdeStatusMessageWithFiles(ideClient) {
40538
40525
  const connection = ideClient.getConnectionStatus();
40539
40526
  switch (connection.status) {
40540
- case IDEConnectionStatus.Connected: {
40527
+ case "connected" /* Connected */: {
40541
40528
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
40542
40529
  const context = ideContextStore.get();
40543
40530
  const openFiles = context?.workspaceState?.openFiles;
@@ -40549,7 +40536,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
40549
40536
  content
40550
40537
  };
40551
40538
  }
40552
- case IDEConnectionStatus.Connecting:
40539
+ case "connecting" /* Connecting */:
40553
40540
  return {
40554
40541
  messageType: "info",
40555
40542
  content: `\u{1F7E1} Connecting...`
@@ -40571,7 +40558,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
40571
40558
  const ideClient = await IdeClient.getInstance();
40572
40559
  if (value) {
40573
40560
  await ideClient.connect(options);
40574
- logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
40561
+ logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
40575
40562
  } else {
40576
40563
  await ideClient.disconnect();
40577
40564
  }
@@ -40659,7 +40646,7 @@ var ideCommand = async () => {
40659
40646
  logToConsole: false
40660
40647
  }
40661
40648
  );
40662
- if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
40649
+ if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
40663
40650
  break;
40664
40651
  }
40665
40652
  await new Promise((resolve9) => setTimeout(resolve9, 500));
@@ -40736,7 +40723,7 @@ var ideCommand = async () => {
40736
40723
  }
40737
40724
  };
40738
40725
  const { status } = ideClient.getConnectionStatus();
40739
- const isConnected = status === IDEConnectionStatus.Connected;
40726
+ const isConnected = status === "connected" /* Connected */;
40740
40727
  if (isConnected) {
40741
40728
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
40742
40729
  } else {
@@ -40836,13 +40823,13 @@ Use /mcp auth <server-name> to authenticate.`
40836
40823
  const displayListener = (message) => {
40837
40824
  context.ui.addItem({ type: "info", text: message });
40838
40825
  };
40839
- coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
40826
+ coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
40840
40827
  try {
40841
40828
  context.ui.addItem({
40842
40829
  type: "info",
40843
40830
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
40844
40831
  });
40845
- const { MCPOAuthProvider } = await import("./dist-YWJAC3IM.js");
40832
+ const { MCPOAuthProvider } = await import("./core-UF6OK2YN.js");
40846
40833
  let oauthConfig = server.oauth;
40847
40834
  if (!oauthConfig) {
40848
40835
  oauthConfig = { enabled: false };
@@ -40879,7 +40866,7 @@ Use /mcp auth <server-name> to authenticate.`
40879
40866
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
40880
40867
  };
40881
40868
  } finally {
40882
- coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
40869
+ coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
40883
40870
  }
40884
40871
  },
40885
40872
  completion: async (context, partialArg) => {
@@ -40925,10 +40912,10 @@ var listAction2 = async (context, showDescriptions = false, showSchema = false,
40925
40912
  }
40926
40913
  const serverNames = Object.keys(mcpServers);
40927
40914
  const connectingServers = serverNames.filter(
40928
- (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
40915
+ (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
40929
40916
  );
40930
40917
  const discoveryState = getMCPDiscoveryState();
40931
- const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
40918
+ const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
40932
40919
  const allTools = toolRegistry.getAllTools();
40933
40920
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
40934
40921
  const promptRegistry = config.getPromptRegistry();
@@ -56755,7 +56742,7 @@ Return a JSON object with:
56755
56742
  },
56756
56743
  abortSignal: new AbortController().signal,
56757
56744
  promptId: "triage-duplicates",
56758
- role: LlmRole.UTILITY_TOOL
56745
+ role: "utility_tool" /* UTILITY_TOOL */
56759
56746
  });
56760
56747
  const rec = response;
56761
56748
  let canonical;
@@ -57589,7 +57576,7 @@ Return a JSON object with:
57589
57576
  },
57590
57577
  abortSignal: abortControllerRef.current.signal,
57591
57578
  promptId: "triage-issues",
57592
- role: LlmRole.UTILITY_TOOL
57579
+ role: "utility_tool" /* UTILITY_TOOL */
57593
57580
  });
57594
57581
  return response;
57595
57582
  },
@@ -58163,8 +58150,8 @@ var planCommand = {
58163
58150
  return;
58164
58151
  }
58165
58152
  const previousApprovalMode = config.getApprovalMode();
58166
- config.setApprovalMode(ApprovalMode.PLAN);
58167
- if (previousApprovalMode !== ApprovalMode.PLAN) {
58153
+ config.setApprovalMode("plan" /* PLAN */);
58154
+ if (previousApprovalMode !== "plan" /* PLAN */) {
58168
58155
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
58169
58156
  }
58170
58157
  if (context.invocation?.args) {
@@ -58223,10 +58210,10 @@ var categorizeRulesByMode = (rules) => {
58223
58210
  rules.forEach((rule) => {
58224
58211
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
58225
58212
  const modeSet = new Set(modes);
58226
- if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
58227
- if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
58228
- if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
58229
- if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
58213
+ if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
58214
+ if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
58215
+ if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
58216
+ if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
58230
58217
  });
58231
58218
  return result;
58232
58219
  };
@@ -59665,7 +59652,7 @@ var upgradeCommand = {
59665
59652
  action: async (context) => {
59666
59653
  const config = context.services.agentContext?.config;
59667
59654
  const authType = config?.getContentGeneratorConfig()?.authType;
59668
- if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
59655
+ if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
59669
59656
  return {
59670
59657
  type: "message",
59671
59658
  messageType: "error",
@@ -59894,7 +59881,7 @@ var BuiltinCommandLoader = class {
59894
59881
  setupGithubCommand,
59895
59882
  terminalSetupCommand,
59896
59883
  ...this.config?.isVoiceModeEnabled() ? [voiceCommand] : [],
59897
- ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
59884
+ ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
59898
59885
  ];
59899
59886
  handle?.end();
59900
59887
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -1,7 +1,7 @@
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-EUUDSNXQ.js";
4
+ } from "./chunk-DDPEWL4G.js";
5
5
  import {
6
6
  RELEASE_CHANNEL_STABILITY,
7
7
  debugLogger,
@@ -17,7 +17,7 @@ import {
17
17
  require_re,
18
18
  require_semver,
19
19
  require_valid
20
- } from "./chunk-6FOUJKOM.js";
20
+ } from "./chunk-7554FKWM.js";
21
21
  import {
22
22
  __commonJS,
23
23
  __toESM
@@ -6,7 +6,7 @@ import {
6
6
  isTelemetrySdkInitialized,
7
7
  resetBrowserSession,
8
8
  shutdownTelemetry
9
- } from "./chunk-6FOUJKOM.js";
9
+ } from "./chunk-YFNHROPZ.js";
10
10
 
11
11
  // packages/cli/src/utils/cleanup.ts
12
12
  import { promises as fs } from "node:fs";
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  normalizeError,
4
4
  safeSerializeErrorValue
5
- } from "./chunk-Y3VJ5NLZ.js";
5
+ } from "./chunk-YFNHROPZ.js";
6
6
 
7
7
  // packages/cli/src/utils/formatError.ts
8
8
  function isCliDebugEnabled(argv = process.argv.slice(2), env = process.env) {
@@ -1,8 +1,7 @@
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
- CoreToolCallStatus,
4
3
  checkExhaustive
5
- } from "./chunk-66M6QVYR.js";
4
+ } from "./chunk-7554FKWM.js";
6
5
  import {
7
6
  __commonJS,
8
7
  __toESM
@@ -465,19 +464,19 @@ var require_react = __commonJS({
465
464
  var import_react = __toESM(require_react(), 1);
466
465
  function mapCoreStatusToDisplayStatus(coreStatus) {
467
466
  switch (coreStatus) {
468
- case CoreToolCallStatus.Validating:
467
+ case "validating" /* Validating */:
469
468
  return "Pending" /* Pending */;
470
- case CoreToolCallStatus.AwaitingApproval:
469
+ case "awaiting_approval" /* AwaitingApproval */:
471
470
  return "Confirming" /* Confirming */;
472
- case CoreToolCallStatus.Executing:
471
+ case "executing" /* Executing */:
473
472
  return "Executing" /* Executing */;
474
- case CoreToolCallStatus.Success:
473
+ case "success" /* Success */:
475
474
  return "Success" /* Success */;
476
- case CoreToolCallStatus.Cancelled:
475
+ case "cancelled" /* Cancelled */:
477
476
  return "Canceled" /* Canceled */;
478
- case CoreToolCallStatus.Error:
477
+ case "error" /* Error */:
479
478
  return "Error" /* Error */;
480
- case CoreToolCallStatus.Scheduled:
479
+ case "scheduled" /* Scheduled */:
481
480
  return "Pending" /* Pending */;
482
481
  default:
483
482
  return checkExhaustive(coreStatus);