@google/gemini-cli 0.40.0-preview.2 → 0.40.0-preview.3

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 (66) hide show
  1. package/bundle/{chunk-WL5MCPV2.js → chunk-35STMVQ6.js} +2 -2
  2. package/bundle/{chunk-EFCQXWIF.js → chunk-47HVBRLD.js} +3 -3
  3. package/bundle/{chunk-HV36F4CL.js → chunk-5UA5NDVP.js} +134 -354
  4. package/bundle/{chunk-IUVLJUOL.js → chunk-B4NHGUNE.js} +2 -2
  5. package/bundle/{chunk-NO7STVVM.js → chunk-EEQGWBJU.js} +1413 -1089
  6. package/bundle/{chunk-IMEC72NS.js → chunk-EJ5U5A3P.js} +1 -1
  7. package/bundle/{chunk-33ANPP4S.js → chunk-ELANWZTZ.js} +3 -3
  8. package/bundle/{chunk-3GU3LF3I.js → chunk-F2KGMQCY.js} +180 -9
  9. package/bundle/{chunk-VCGILCZV.js → chunk-F73F75XM.js} +16 -0
  10. package/bundle/{chunk-PLUWJHZZ.js → chunk-FRCZJECU.js} +237 -54
  11. package/bundle/{chunk-UBXB5AEJ.js → chunk-GDNYA45E.js} +3 -3
  12. package/bundle/{chunk-TDW6FM3A.js → chunk-KITSDDOZ.js} +1 -1
  13. package/bundle/{chunk-WHIWQCI5.js → chunk-KKO2XSBY.js} +1 -1
  14. package/bundle/{chunk-GXRQOXQF.js → chunk-KUAEOA2Q.js} +177 -7
  15. package/bundle/{chunk-4IJPDKI6.js → chunk-KVGAAOEJ.js} +146 -364
  16. package/bundle/{chunk-QK7UWGBN.js → chunk-MRSOTTBM.js} +1380 -1081
  17. package/bundle/{chunk-MUGUV6RZ.js → chunk-MUEKKRWF.js} +2 -2
  18. package/bundle/chunk-R4ZCSDPK.js +80018 -0
  19. package/bundle/chunk-RMQT572G.js +156 -0
  20. package/bundle/chunk-RVU5Q4NB.js +118 -0
  21. package/bundle/{chunk-2RHFUIH4.js → chunk-UHHRGNIO.js} +16 -0
  22. package/bundle/chunk-UX5CFZ75.js +17505 -0
  23. package/bundle/{chunk-RM43GNQQ.js → chunk-UZ5SUJO4.js} +7709 -12907
  24. package/bundle/chunk-VQVLJLWD.js +1571 -0
  25. package/bundle/{chunk-NIVCRM5L.js → chunk-VUHGADMU.js} +134 -354
  26. package/bundle/chunk-YCTQOSY2.js +351149 -0
  27. package/bundle/{cleanup-A7WXWAMI.js → cleanup-BWZ7GONS.js} +3 -3
  28. package/bundle/{cleanup-EWPIME2M.js → cleanup-F6XR3KDW.js} +3 -3
  29. package/bundle/{cleanup-IPLJJT5S.js → cleanup-PS3UGKWX.js} +3 -3
  30. package/bundle/cleanup-VV6AV4T2.js +33 -0
  31. package/bundle/{core-VCDK23ZC.js → core-NDKZ44LE.js} +28 -2
  32. package/bundle/{devtoolsService-B5VVZ752.js → devtoolsService-DNFLMYOX.js} +3 -3
  33. package/bundle/{devtoolsService-2JXSALRU.js → devtoolsService-F6QBRWPB.js} +5 -4
  34. package/bundle/{devtoolsService-6Y6YER6T.js → devtoolsService-XGIYIDBD.js} +3 -3
  35. package/bundle/devtoolsService-YD6JSR34.js +852 -0
  36. package/bundle/{dist-UIXQETMC.js → dist-54TUMSKA.js} +28 -2
  37. package/bundle/{core-BQT6T3CH.js → dist-6KUUELBS.js} +28 -2
  38. package/bundle/dist-QHCXV4N4.js +2046 -0
  39. package/bundle/docs/cli/cli-reference.md +1 -0
  40. package/bundle/docs/cli/trusted-folders.md +28 -0
  41. package/bundle/docs/reference/configuration.md +14 -0
  42. package/bundle/{gemini-ID44Z5SV.js → gemini-HLGERR6W.js} +65 -21
  43. package/bundle/{gemini-54LH6RUH.js → gemini-IRPF2U4N.js} +241 -182
  44. package/bundle/gemini-QZM4UKD6.js +16087 -0
  45. package/bundle/{gemini-44W2QEZI.js → gemini-TU6PHHWE.js} +63 -20
  46. package/bundle/gemini.js +3 -3
  47. package/bundle/{interactiveCli-5MTJDFYC.js → interactiveCli-374EDFUA.js} +17 -167
  48. package/bundle/{interactiveCli-JFBPGMNM.js → interactiveCli-EKTBCA5F.js} +30 -179
  49. package/bundle/{interactiveCli-5B3X6RNB.js → interactiveCli-GRSDCSR3.js} +300 -432
  50. package/bundle/interactiveCli-HN4DKCW5.js +34448 -0
  51. package/bundle/{liteRtServerManager-76V63PRJ.js → liteRtServerManager-46V57ROR.js} +4 -4
  52. package/bundle/{liteRtServerManager-WQMDPACQ.js → liteRtServerManager-E34UIEBJ.js} +4 -4
  53. package/bundle/{liteRtServerManager-6GJWEP5W.js → liteRtServerManager-EAWDC35K.js} +4 -4
  54. package/bundle/liteRtServerManager-HTDKEOQC.js +65 -0
  55. package/bundle/{memoryDiscovery-RYHYLAPJ.js → memoryDiscovery-CZURD35O.js} +1 -1
  56. package/bundle/{memoryDiscovery-HWEYBJE7.js → memoryDiscovery-GZLXKRGB.js} +1 -1
  57. package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
  58. package/bundle/{oauth2-provider-JCKLNKRV.js → oauth2-provider-N7Q7FNNA.js} +2 -2
  59. package/bundle/{oauth2-provider-EX6SQEZP.js → oauth2-provider-TW3RXTUS.js} +2 -2
  60. package/bundle/{oauth2-provider-ZF52AWQY.js → oauth2-provider-UQIDMKYA.js} +39 -73
  61. package/bundle/oauth2-provider-WTRWHBI2.js +237 -0
  62. package/bundle/{start-CYDJTOAP.js → start-4D5PYHGK.js} +6 -6
  63. package/bundle/{start-SHOUHW3Y.js → start-7DJXXKMH.js} +6 -6
  64. package/bundle/{start-B6EMQCH5.js → start-ERRBQVDH.js} +6 -6
  65. package/bundle/start-TKRKH572.js +18 -0
  66. package/package.json +1 -1
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  exitCli,
8
8
  require_source
9
- } from "./chunk-TDW6FM3A.js";
9
+ } from "./chunk-VQVLJLWD.js";
10
10
  import {
11
11
  DEFAULT_BACKGROUND_OPACITY,
12
12
  DEFAULT_BORDER_OPACITY,
@@ -32,6 +32,7 @@ import {
32
32
  escapeAnsiCtrlCodes,
33
33
  getBinaryPath,
34
34
  getCachedStringWidth,
35
+ getSettingsSchema,
35
36
  getThemeTypeFromBackgroundColor,
36
37
  interpolateColor,
37
38
  isBinaryInstalled,
@@ -58,13 +59,15 @@ import {
58
59
  stripUnsafeCharacters,
59
60
  toCodePoints,
60
61
  validateCustomTheme
61
- } from "./chunk-NIVCRM5L.js";
62
+ } from "./chunk-KVGAAOEJ.js";
62
63
  import {
63
64
  runExitCleanup
64
- } from "./chunk-IUVLJUOL.js";
65
+ } from "./chunk-RMQT572G.js";
65
66
  import {
66
67
  AsyncFzf,
68
+ AuthType,
67
69
  Config,
70
+ CoreToolCallStatus,
68
71
  ExtensionDisableEvent,
69
72
  ExtensionEnableEvent,
70
73
  ExtensionInstallEvent,
@@ -73,17 +76,27 @@ import {
73
76
  ExtensionUninstallEvent,
74
77
  ExtensionUpdateEvent,
75
78
  GEMINI_CLI_COMPANION_EXTENSION_NAME,
79
+ HookType,
80
+ IDEConnectionStatus,
76
81
  INITIAL_HISTORY_LENGTH,
77
82
  IdeClient,
78
83
  IdeConnectionEvent,
84
+ IdeConnectionType,
85
+ IntegrityDataStatus,
79
86
  KeychainTokenStorage,
87
+ LlmRole,
88
+ MCPDiscoveryState,
80
89
  MCPOAuthTokenStorage,
90
+ MCPServerStatus,
81
91
  ModelSlashCommandEvent,
82
92
  ProjectIdRequiredError,
83
93
  ReadManyFilesTool,
84
94
  RewindEvent,
95
+ SessionEndReason,
96
+ SessionStartSource,
85
97
  ShellExecutionService,
86
98
  StartSessionEvent,
99
+ TrustLevel,
87
100
  UPGRADE_URL_PAGE,
88
101
  UserAccountManager,
89
102
  ValidationRequiredError,
@@ -195,12 +208,13 @@ import {
195
208
  stripAnsi,
196
209
  tokenLimit,
197
210
  uiTelemetryService
198
- } from "./chunk-NO7STVVM.js";
211
+ } from "./chunk-YCTQOSY2.js";
199
212
  import {
200
213
  ApprovalMode,
201
214
  CoreEvent,
202
215
  DiscoveredMCPTool,
203
216
  GEMINI_DIR,
217
+ PolicyDecision,
204
218
  REFERENCE_CONTENT_END,
205
219
  REFERENCE_CONTENT_START,
206
220
  Storage,
@@ -221,7 +235,7 @@ import {
221
235
  shortenPath,
222
236
  tildeifyPath,
223
237
  unescapePath
224
- } from "./chunk-2RHFUIH4.js";
238
+ } from "./chunk-F73F75XM.js";
225
239
  import {
226
240
  require_src
227
241
  } from "./chunk-RJTRUG2J.js";
@@ -39430,7 +39444,7 @@ var import_react34 = __toESM(require_react(), 1);
39430
39444
  function useIdeTrustListener() {
39431
39445
  const settings = useSettings();
39432
39446
  const [connectionStatus, setConnectionStatus] = (0, import_react34.useState)(
39433
- "disconnected" /* Disconnected */
39447
+ IDEConnectionStatus.Disconnected
39434
39448
  );
39435
39449
  const previousTrust = (0, import_react34.useRef)(void 0);
39436
39450
  const [restartReason, setRestartReason] = (0, import_react34.useState)("NONE");
@@ -39460,7 +39474,7 @@ function useIdeTrustListener() {
39460
39474
  };
39461
39475
  }, []);
39462
39476
  const getSnapshot = () => {
39463
- if (connectionStatus !== "connected" /* Connected */) {
39477
+ if (connectionStatus !== IDEConnectionStatus.Connected) {
39464
39478
  return void 0;
39465
39479
  }
39466
39480
  return ideContextStore.get()?.workspaceState?.isTrusted;
@@ -39846,7 +39860,7 @@ async function initializeApp(config, settings) {
39846
39860
  await ideClient.connect();
39847
39861
  logIdeConnection(
39848
39862
  config,
39849
- new IdeConnectionEvent("start" /* START */)
39863
+ new IdeConnectionEvent(IdeConnectionType.START)
39850
39864
  );
39851
39865
  }).catch((e) => {
39852
39866
  debugLogger.error("Failed to initialize IDE client:", e);
@@ -39864,16 +39878,16 @@ async function initializeApp(config, settings) {
39864
39878
  // packages/cli/src/config/auth.ts
39865
39879
  function validateAuthMethod(authMethod) {
39866
39880
  loadEnvironment(loadSettings().merged, process.cwd());
39867
- if (authMethod === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authMethod === "compute-default-credentials" /* COMPUTE_ADC */) {
39881
+ if (authMethod === AuthType.LOGIN_WITH_GOOGLE || authMethod === AuthType.COMPUTE_ADC) {
39868
39882
  return null;
39869
39883
  }
39870
- if (authMethod === "gemini-api-key" /* USE_GEMINI */) {
39884
+ if (authMethod === AuthType.USE_GEMINI) {
39871
39885
  if (!process.env["GEMINI_API_KEY"]) {
39872
39886
  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)!";
39873
39887
  }
39874
39888
  return null;
39875
39889
  }
39876
- if (authMethod === "vertex-ai" /* USE_VERTEX_AI */) {
39890
+ if (authMethod === AuthType.USE_VERTEX_AI) {
39877
39891
  const hasVertexProjectLocationConfig = !!process.env["GOOGLE_CLOUD_PROJECT"] && !!process.env["GOOGLE_CLOUD_LOCATION"];
39878
39892
  const hasGoogleApiKey = !!process.env["GOOGLE_API_KEY"];
39879
39893
  if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
@@ -44604,7 +44618,7 @@ var ExtensionManager = class extends ExtensionLoader {
44604
44618
  const trustedFolders = loadTrustedFolders();
44605
44619
  await trustedFolders.setValue(
44606
44620
  this.workspaceDir,
44607
- "TRUST_FOLDER" /* TRUST_FOLDER */
44621
+ TrustLevel.TRUST_FOLDER
44608
44622
  );
44609
44623
  } else {
44610
44624
  throw new Error(
@@ -44790,7 +44804,7 @@ Would you like to attempt to install via "git clone" instead?`
44790
44804
  newExtensionConfig.version,
44791
44805
  previousExtensionConfig.version,
44792
44806
  installMetadata.type,
44793
- "success" /* Success */
44807
+ CoreToolCallStatus.Success
44794
44808
  )
44795
44809
  );
44796
44810
  if (newExtensionName !== previousName) {
@@ -44813,7 +44827,7 @@ Would you like to attempt to install via "git clone" instead?`
44813
44827
  getExtensionId(newExtensionConfig, installMetadata),
44814
44828
  newExtensionConfig.version,
44815
44829
  installMetadata.type,
44816
- "success" /* Success */
44830
+ CoreToolCallStatus.Success
44817
44831
  )
44818
44832
  );
44819
44833
  await this.enableExtension(
@@ -44846,7 +44860,7 @@ Would you like to attempt to install via "git clone" instead?`
44846
44860
  newExtensionConfig?.version ?? "",
44847
44861
  previousExtensionConfig.version,
44848
44862
  installMetadata.type,
44849
- "error" /* Error */
44863
+ CoreToolCallStatus.Error
44850
44864
  )
44851
44865
  );
44852
44866
  } else {
@@ -44858,7 +44872,7 @@ Would you like to attempt to install via "git clone" instead?`
44858
44872
  extensionId ?? "",
44859
44873
  newExtensionConfig?.version ?? "",
44860
44874
  installMetadata.type,
44861
- "error" /* Error */
44875
+ CoreToolCallStatus.Error
44862
44876
  )
44863
44877
  );
44864
44878
  }
@@ -44889,7 +44903,7 @@ Would you like to attempt to install via "git clone" instead?`
44889
44903
  extension.name,
44890
44904
  hashValue(extension.name),
44891
44905
  extension.id,
44892
- "success" /* Success */
44906
+ CoreToolCallStatus.Success
44893
44907
  )
44894
44908
  );
44895
44909
  }
@@ -45159,7 +45173,7 @@ Would you like to attempt to install via "git clone" instead?`
45159
45173
  if (eventHooks) {
45160
45174
  for (const definition of eventHooks) {
45161
45175
  for (const hook of definition.hooks) {
45162
- if (hook.type === "command" /* Command */) {
45176
+ if (hook.type === HookType.Command) {
45163
45177
  hook.env = { ...hook.env, ...hookEnv };
45164
45178
  }
45165
45179
  }
@@ -45773,6 +45787,165 @@ var McpServerEnablementManager = class _McpServerEnablementManager {
45773
45787
  }
45774
45788
  };
45775
45789
 
45790
+ // packages/cli/src/utils/settingsUtils.ts
45791
+ function flattenSchema(schema, prefix = "") {
45792
+ let result = {};
45793
+ for (const key in schema) {
45794
+ const newKey = prefix ? `${prefix}.${key}` : key;
45795
+ const definition = schema[key];
45796
+ result[newKey] = { ...definition, key: newKey };
45797
+ if (definition.properties) {
45798
+ result = { ...result, ...flattenSchema(definition.properties, newKey) };
45799
+ }
45800
+ }
45801
+ return result;
45802
+ }
45803
+ var _FLATTENED_SCHEMA;
45804
+ function getFlattenedSchema() {
45805
+ return _FLATTENED_SCHEMA ?? (_FLATTENED_SCHEMA = flattenSchema(getSettingsSchema()));
45806
+ }
45807
+ function getSettingDefinition(key) {
45808
+ return getFlattenedSchema()[key];
45809
+ }
45810
+ function getDefaultValue(key) {
45811
+ return getFlattenedSchema()[key]?.default;
45812
+ }
45813
+ function getDialogRestartRequiredSettings() {
45814
+ return Object.values(getFlattenedSchema()).filter(
45815
+ (definition) => definition.requiresRestart && definition.showInDialog !== false
45816
+ ).map((definition) => definition.key);
45817
+ }
45818
+ function isRecord(value) {
45819
+ return typeof value === "object" && value !== null;
45820
+ }
45821
+ function isSettingsValue(value) {
45822
+ if (value === void 0) return true;
45823
+ if (value === null) return false;
45824
+ const type = typeof value;
45825
+ return type === "string" || type === "number" || type === "boolean" || type === "object";
45826
+ }
45827
+ function getNestedValue(obj, path37) {
45828
+ let current = obj;
45829
+ for (const key of path37) {
45830
+ if (!isRecord(current) || !(key in current)) {
45831
+ return void 0;
45832
+ }
45833
+ current = current[key];
45834
+ }
45835
+ return current;
45836
+ }
45837
+ function getEffectiveValue(key, settings) {
45838
+ const definition = getSettingDefinition(key);
45839
+ if (!definition) {
45840
+ return void 0;
45841
+ }
45842
+ const path37 = key.split(".");
45843
+ const value = getNestedValue(settings, path37);
45844
+ if (value !== void 0 && isSettingsValue(value)) {
45845
+ return value;
45846
+ }
45847
+ return definition.default;
45848
+ }
45849
+ function getDialogSettingKeys() {
45850
+ return Object.values(getFlattenedSchema()).filter((definition) => definition.showInDialog !== false).map((definition) => definition.key);
45851
+ }
45852
+ function isInSettingsScope(key, scopeSettings) {
45853
+ const path37 = key.split(".");
45854
+ const value = getNestedValue(scopeSettings, path37);
45855
+ return value !== void 0;
45856
+ }
45857
+ function getDisplayValue(key, scopeSettings, _mergedSettings) {
45858
+ const definition = getSettingDefinition(key);
45859
+ const existsInScope = isInSettingsScope(key, scopeSettings);
45860
+ let value;
45861
+ if (existsInScope) {
45862
+ value = getEffectiveValue(key, scopeSettings);
45863
+ } else {
45864
+ value = getDefaultValue(key);
45865
+ }
45866
+ let valueString = String(value);
45867
+ if (definition?.type === "object" && value !== null && typeof value === "object") {
45868
+ valueString = JSON.stringify(value);
45869
+ } else if (definition?.type === "enum" && definition.options) {
45870
+ const option = definition.options?.find((option2) => option2.value === value);
45871
+ valueString = option?.label ?? `${value}`;
45872
+ }
45873
+ if (definition?.unit === "%" && typeof value === "number") {
45874
+ valueString = `${value} (${Math.round(value * 100)}%)`;
45875
+ } else if (definition?.unit) {
45876
+ valueString = `${valueString}${definition.unit}`;
45877
+ }
45878
+ if (existsInScope) {
45879
+ return `${valueString}*`;
45880
+ }
45881
+ return valueString;
45882
+ }
45883
+ function tryParseJsonStringArray(input) {
45884
+ try {
45885
+ const parsed = JSON.parse(input);
45886
+ if (Array.isArray(parsed) && parsed.every((item) => typeof item === "string")) {
45887
+ return parsed;
45888
+ }
45889
+ return null;
45890
+ } catch {
45891
+ return null;
45892
+ }
45893
+ }
45894
+ function tryParseJsonObject(input) {
45895
+ try {
45896
+ const parsed = JSON.parse(input);
45897
+ if (isRecord(parsed) && !Array.isArray(parsed)) {
45898
+ return parsed;
45899
+ }
45900
+ return null;
45901
+ } catch {
45902
+ return null;
45903
+ }
45904
+ }
45905
+ function parseStringArrayValue(input) {
45906
+ const trimmed = input.trim();
45907
+ if (trimmed === "") return [];
45908
+ return tryParseJsonStringArray(trimmed) ?? input.split(",").map((p2) => p2.trim()).filter((p2) => p2.length > 0);
45909
+ }
45910
+ function parseObjectValue(input) {
45911
+ const trimmed = input.trim();
45912
+ if (trimmed === "") {
45913
+ return null;
45914
+ }
45915
+ return tryParseJsonObject(trimmed);
45916
+ }
45917
+ function parseEditedValue(type, newValue) {
45918
+ if (type === "number") {
45919
+ if (newValue.trim() === "") {
45920
+ return null;
45921
+ }
45922
+ const numParsed = Number(newValue.trim());
45923
+ if (Number.isNaN(numParsed)) {
45924
+ return null;
45925
+ }
45926
+ return numParsed;
45927
+ }
45928
+ if (type === "array") {
45929
+ return parseStringArrayValue(newValue);
45930
+ }
45931
+ if (type === "object") {
45932
+ return parseObjectValue(newValue);
45933
+ }
45934
+ return newValue;
45935
+ }
45936
+ function getEditValue(type, rawValue) {
45937
+ if (rawValue === void 0) {
45938
+ return void 0;
45939
+ }
45940
+ if (type === "array" && Array.isArray(rawValue)) {
45941
+ return rawValue.join(", ");
45942
+ }
45943
+ if (type === "object" && rawValue !== null && typeof rawValue === "object") {
45944
+ return JSON.stringify(rawValue);
45945
+ }
45946
+ return void 0;
45947
+ }
45948
+
45776
45949
  // packages/cli/src/ui/hooks/atCommandProcessor.ts
45777
45950
  import * as fs19 from "node:fs/promises";
45778
45951
  import * as path13 from "node:path";
@@ -46032,7 +46205,7 @@ async function readMcpResources(resourceParts, config, signal) {
46032
46205
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46033
46206
  name: `resources/read (${resource.serverName})`,
46034
46207
  description: resource.uri,
46035
- status: "success" /* Success */,
46208
+ status: CoreToolCallStatus.Success,
46036
46209
  isClientInitiated: true,
46037
46210
  resultDisplay: `Successfully read resource ${resource.uri}`,
46038
46211
  confirmationDetails: void 0
@@ -46047,7 +46220,7 @@ async function readMcpResources(resourceParts, config, signal) {
46047
46220
  callId: `mcp-resource-${resource.serverName}-${resource.uri}`,
46048
46221
  name: `resources/read (${resource.serverName})`,
46049
46222
  description: resource.uri,
46050
- status: "error" /* Error */,
46223
+ status: CoreToolCallStatus.Error,
46051
46224
  isClientInitiated: true,
46052
46225
  resultDisplay: `Error reading resource ${resource.uri}: ${getErrorMessage(error)}`,
46053
46226
  confirmationDetails: void 0
@@ -46072,7 +46245,7 @@ Content from @${result.uri}:
46072
46245
  }
46073
46246
  if (hasError) {
46074
46247
  const firstError = displays.find(
46075
- (d) => d.status === "error" /* Error */
46248
+ (d) => d.status === CoreToolCallStatus.Error
46076
46249
  );
46077
46250
  return {
46078
46251
  parts: [],
@@ -46108,7 +46281,7 @@ async function readLocalFiles(resolvedFiles, config, signal, userMessageTimestam
46108
46281
  callId: `client-read-${userMessageTimestamp}`,
46109
46282
  name: readManyFilesTool.displayName,
46110
46283
  description: invocation.getDescription(),
46111
- status: "success" /* Success */,
46284
+ status: CoreToolCallStatus.Success,
46112
46285
  isClientInitiated: true,
46113
46286
  resultDisplay: result.returnDisplay || `Successfully read: ${fileLabelsForDisplay.join(", ")}`,
46114
46287
  confirmationDetails: void 0
@@ -46155,7 +46328,7 @@ Content from @${displayPath}:
46155
46328
  callId: `client-read-${userMessageTimestamp}`,
46156
46329
  name: readManyFilesTool.displayName,
46157
46330
  description: invocation?.getDescription() ?? "Error attempting to execute tool to read files",
46158
- status: "error" /* Error */,
46331
+ status: CoreToolCallStatus.Error,
46159
46332
  isClientInitiated: true,
46160
46333
  resultDisplay: `Error reading files (${fileLabelsForDisplay.join(", ")}): ${getErrorMessage(error)}`,
46161
46334
  confirmationDetails: void 0
@@ -49384,7 +49557,7 @@ async function openFileInEditor(filePath, stdin, setRawMode, preferredEditorType
49384
49557
  if (wasRaw) {
49385
49558
  setRawMode?.(true);
49386
49559
  }
49387
- coreEvents.emit("external-editor-closed" /* ExternalEditorClosed */);
49560
+ coreEvents.emit(CoreEvent.ExternalEditorClosed);
49388
49561
  }
49389
49562
  }
49390
49563
 
@@ -52064,7 +52237,7 @@ async function updateExtension(extension, extensionManager, currentState, dispat
52064
52237
  extension.name,
52065
52238
  installMetadata
52066
52239
  );
52067
- if (status === "invalid" /* INVALID */) {
52240
+ if (status === IntegrityDataStatus.INVALID) {
52068
52241
  throw new Error("Extension integrity cannot be verified");
52069
52242
  }
52070
52243
  } catch (e) {
@@ -54058,7 +54231,7 @@ var MultiFolderTrustDialog = ({
54058
54231
  if (choice === 1 /* YES_AND_REMEMBER */) {
54059
54232
  await trustedFolders.setValue(
54060
54233
  expandedPath,
54061
- "TRUST_FOLDER" /* TRUST_FOLDER */
54234
+ TrustLevel.TRUST_FOLDER
54062
54235
  );
54063
54236
  }
54064
54237
  workspaceContext.addDirectory(expandedPath);
@@ -54837,7 +55010,7 @@ var authCommand = {
54837
55010
  import process29 from "node:process";
54838
55011
 
54839
55012
  // packages/cli/src/generated/git-commit.ts
54840
- var GIT_COMMIT_INFO = "aa05b4583";
55013
+ var GIT_COMMIT_INFO = "8482eccf5";
54841
55014
 
54842
55015
  // packages/cli/src/ui/utils/historyExportUtils.ts
54843
55016
  import * as fsPromises from "node:fs/promises";
@@ -55351,7 +55524,7 @@ var clearCommand = {
55351
55524
  const config = context.services.agentContext?.config;
55352
55525
  const hookSystem = config?.getHookSystem();
55353
55526
  if (hookSystem) {
55354
- await hookSystem.fireSessionEndEvent("clear" /* Clear */);
55527
+ await hookSystem.fireSessionEndEvent(SessionEndReason.Clear);
55355
55528
  }
55356
55529
  config?.injectionService.clear();
55357
55530
  let newSessionId;
@@ -55368,7 +55541,7 @@ var clearCommand = {
55368
55541
  }
55369
55542
  let result;
55370
55543
  if (hookSystem) {
55371
- result = await hookSystem.fireSessionStartEvent("clear" /* Clear */);
55544
+ result = await hookSystem.fireSessionStartEvent(SessionStartSource.Clear);
55372
55545
  }
55373
55546
  await new Promise((resolve8) => setImmediate(resolve8));
55374
55547
  if (config) {
@@ -58224,7 +58397,7 @@ var Footer = () => {
58224
58397
  case "auth": {
58225
58398
  if (!settings.merged.ui.showUserIdentity) break;
58226
58399
  if (!authType) break;
58227
- const displayStr = authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? email ?? "google" : authType;
58400
+ const displayStr = authType === AuthType.LOGIN_WITH_GOOGLE ? email ?? "google" : authType;
58228
58401
  addCol(
58229
58402
  id,
58230
58403
  header,
@@ -59971,12 +60144,12 @@ import path27 from "node:path";
59971
60144
  function getIdeStatusMessage(ideClient) {
59972
60145
  const connection = ideClient.getConnectionStatus();
59973
60146
  switch (connection.status) {
59974
- case "connected" /* Connected */:
60147
+ case IDEConnectionStatus.Connected:
59975
60148
  return {
59976
60149
  messageType: "info",
59977
60150
  content: `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`
59978
60151
  };
59979
- case "connecting" /* Connecting */:
60152
+ case IDEConnectionStatus.Connecting:
59980
60153
  return {
59981
60154
  messageType: "info",
59982
60155
  content: `\u{1F7E1} Connecting...`
@@ -60017,7 +60190,7 @@ ${infoMessage}`;
60017
60190
  async function getIdeStatusMessageWithFiles(ideClient) {
60018
60191
  const connection = ideClient.getConnectionStatus();
60019
60192
  switch (connection.status) {
60020
- case "connected" /* Connected */: {
60193
+ case IDEConnectionStatus.Connected: {
60021
60194
  let content = `\u{1F7E2} Connected to ${ideClient.getDetectedIdeDisplayName()}`;
60022
60195
  const context = ideContextStore.get();
60023
60196
  const openFiles = context?.workspaceState?.openFiles;
@@ -60029,7 +60202,7 @@ async function getIdeStatusMessageWithFiles(ideClient) {
60029
60202
  content
60030
60203
  };
60031
60204
  }
60032
- case "connecting" /* Connecting */:
60205
+ case IDEConnectionStatus.Connecting:
60033
60206
  return {
60034
60207
  messageType: "info",
60035
60208
  content: `\u{1F7E1} Connecting...`
@@ -60051,7 +60224,7 @@ async function setIdeModeAndSyncConnection(config, value, options = {}) {
60051
60224
  const ideClient = await IdeClient.getInstance();
60052
60225
  if (value) {
60053
60226
  await ideClient.connect(options);
60054
- logIdeConnection(config, new IdeConnectionEvent("session" /* SESSION */));
60227
+ logIdeConnection(config, new IdeConnectionEvent(IdeConnectionType.SESSION));
60055
60228
  } else {
60056
60229
  await ideClient.disconnect();
60057
60230
  }
@@ -60139,7 +60312,7 @@ var ideCommand = async () => {
60139
60312
  logToConsole: false
60140
60313
  }
60141
60314
  );
60142
- if (ideClient.getConnectionStatus().status === "connected" /* Connected */) {
60315
+ if (ideClient.getConnectionStatus().status === IDEConnectionStatus.Connected) {
60143
60316
  break;
60144
60317
  }
60145
60318
  await new Promise((resolve8) => setTimeout(resolve8, 500));
@@ -60216,7 +60389,7 @@ var ideCommand = async () => {
60216
60389
  }
60217
60390
  };
60218
60391
  const { status } = ideClient.getConnectionStatus();
60219
- const isConnected = status === "connected" /* Connected */;
60392
+ const isConnected = status === IDEConnectionStatus.Connected;
60220
60393
  if (isConnected) {
60221
60394
  ideSlashCommand.subCommands = [statusCommand2, disableCommand5];
60222
60395
  } else {
@@ -60316,13 +60489,13 @@ Use /mcp auth <server-name> to authenticate.`
60316
60489
  const displayListener = (message) => {
60317
60490
  context.ui.addItem({ type: "info", text: message });
60318
60491
  };
60319
- coreEvents.on("oauth-display-message" /* OauthDisplayMessage */, displayListener);
60492
+ coreEvents.on(CoreEvent.OauthDisplayMessage, displayListener);
60320
60493
  try {
60321
60494
  context.ui.addItem({
60322
60495
  type: "info",
60323
60496
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
60324
60497
  });
60325
- const { MCPOAuthProvider } = await import("./core-BQT6T3CH.js");
60498
+ const { MCPOAuthProvider } = await import("./dist-QHCXV4N4.js");
60326
60499
  let oauthConfig = server.oauth;
60327
60500
  if (!oauthConfig) {
60328
60501
  oauthConfig = { enabled: false };
@@ -60359,7 +60532,7 @@ Use /mcp auth <server-name> to authenticate.`
60359
60532
  content: `Failed to authenticate with MCP server '${serverName}': ${getErrorMessage(error)}`
60360
60533
  };
60361
60534
  } finally {
60362
- coreEvents.removeListener("oauth-display-message" /* OauthDisplayMessage */, displayListener);
60535
+ coreEvents.removeListener(CoreEvent.OauthDisplayMessage, displayListener);
60363
60536
  }
60364
60537
  },
60365
60538
  completion: async (context, partialArg) => {
@@ -60405,10 +60578,10 @@ var listAction3 = async (context, showDescriptions = false, showSchema = false,
60405
60578
  }
60406
60579
  const serverNames = Object.keys(mcpServers);
60407
60580
  const connectingServers = serverNames.filter(
60408
- (name) => getMCPServerStatus(name) === "connecting" /* CONNECTING */
60581
+ (name) => getMCPServerStatus(name) === MCPServerStatus.CONNECTING
60409
60582
  );
60410
60583
  const discoveryState = getMCPDiscoveryState();
60411
- const discoveryInProgress = discoveryState === "in_progress" /* IN_PROGRESS */ || connectingServers.length > 0;
60584
+ const discoveryInProgress = discoveryState === MCPDiscoveryState.IN_PROGRESS || connectingServers.length > 0;
60412
60585
  const allTools = toolRegistry.getAllTools();
60413
60586
  const mcpTools = allTools.filter((tool) => tool instanceof DiscoveredMCPTool);
60414
60587
  const promptRegistry = config.getPromptRegistry();
@@ -75812,7 +75985,7 @@ Return a JSON object with:
75812
75985
  },
75813
75986
  abortSignal: new AbortController().signal,
75814
75987
  promptId: "triage-duplicates",
75815
- role: "utility_tool" /* UTILITY_TOOL */
75988
+ role: LlmRole.UTILITY_TOOL
75816
75989
  });
75817
75990
  const rec = response;
75818
75991
  let canonical;
@@ -76646,7 +76819,7 @@ Return a JSON object with:
76646
76819
  },
76647
76820
  abortSignal: abortControllerRef.current.signal,
76648
76821
  promptId: "triage-issues",
76649
- role: "utility_tool" /* UTILITY_TOOL */
76822
+ role: LlmRole.UTILITY_TOOL
76650
76823
  });
76651
76824
  return response;
76652
76825
  },
@@ -77220,8 +77393,8 @@ var planCommand = {
77220
77393
  return;
77221
77394
  }
77222
77395
  const previousApprovalMode = config.getApprovalMode();
77223
- config.setApprovalMode("plan" /* PLAN */);
77224
- if (previousApprovalMode !== "plan" /* PLAN */) {
77396
+ config.setApprovalMode(ApprovalMode.PLAN);
77397
+ if (previousApprovalMode !== ApprovalMode.PLAN) {
77225
77398
  coreEvents.emitFeedback("info", "Switched to Plan Mode.");
77226
77399
  }
77227
77400
  if (context.invocation?.args) {
@@ -77280,10 +77453,10 @@ var categorizeRulesByMode = (rules) => {
77280
77453
  rules.forEach((rule) => {
77281
77454
  const modes = rule.modes?.length ? rule.modes : ALL_MODES;
77282
77455
  const modeSet = new Set(modes);
77283
- if (modeSet.has("default" /* DEFAULT */)) result.normal.push(rule);
77284
- if (modeSet.has("autoEdit" /* AUTO_EDIT */)) result.autoEdit.push(rule);
77285
- if (modeSet.has("yolo" /* YOLO */)) result.yolo.push(rule);
77286
- if (modeSet.has("plan" /* PLAN */)) result.plan.push(rule);
77456
+ if (modeSet.has(ApprovalMode.DEFAULT)) result.normal.push(rule);
77457
+ if (modeSet.has(ApprovalMode.AUTO_EDIT)) result.autoEdit.push(rule);
77458
+ if (modeSet.has(ApprovalMode.YOLO)) result.yolo.push(rule);
77459
+ if (modeSet.has(ApprovalMode.PLAN)) result.plan.push(rule);
77287
77460
  });
77288
77461
  return result;
77289
77462
  };
@@ -78632,7 +78805,7 @@ var upgradeCommand = {
78632
78805
  action: async (context) => {
78633
78806
  const config = context.services.agentContext?.config;
78634
78807
  const authType = config?.getContentGeneratorConfig()?.authType;
78635
- if (authType !== "oauth-personal" /* LOGIN_WITH_GOOGLE */) {
78808
+ if (authType !== AuthType.LOGIN_WITH_GOOGLE) {
78636
78809
  return {
78637
78810
  type: "message",
78638
78811
  messageType: "error",
@@ -78834,7 +79007,7 @@ var BuiltinCommandLoader = class {
78834
79007
  vimCommand,
78835
79008
  setupGithubCommand,
78836
79009
  terminalSetupCommand,
78837
- ...this.config?.getContentGeneratorConfig()?.authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ ? [upgradeCommand] : []
79010
+ ...this.config?.getContentGeneratorConfig()?.authType === AuthType.LOGIN_WITH_GOOGLE ? [upgradeCommand] : []
78838
79011
  ];
78839
79012
  handle?.end();
78840
79013
  return allDefinitions.filter((cmd) => cmd !== null);
@@ -78977,11 +79150,11 @@ var ShellProcessor = class {
78977
79150
  },
78978
79151
  void 0
78979
79152
  );
78980
- if (decision === "deny" /* DENY */) {
79153
+ if (decision === PolicyDecision.DENY) {
78981
79154
  throw new Error(
78982
79155
  `${this.commandName} cannot be run. Blocked command: "${command}". Reason: Blocked by policy.`
78983
79156
  );
78984
- } else if (decision === "ask_user" /* ASK_USER */) {
79157
+ } else if (decision === PolicyDecision.ASK_USER) {
78985
79158
  commandsToConfirm.add(command);
78986
79159
  }
78987
79160
  }
@@ -79606,6 +79779,16 @@ export {
79606
79779
  linkSkill,
79607
79780
  uninstallSkill,
79608
79781
  statusCommand,
79782
+ getSettingDefinition,
79783
+ getDialogRestartRequiredSettings,
79784
+ isRecord,
79785
+ getNestedValue,
79786
+ getEffectiveValue,
79787
+ getDialogSettingKeys,
79788
+ isInSettingsScope,
79789
+ getDisplayValue,
79790
+ parseEditedValue,
79791
+ getEditValue,
79609
79792
  ConsolePatcher,
79610
79793
  clipboardy_default,
79611
79794
  escapeAtSymbols,
@@ -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-TDW6FM3A.js";
5
+ } from "./chunk-EJ5U5A3P.js";
6
6
  import {
7
7
  DEFAULT_PORT,
8
8
  SERVER_START_WAIT_MS,
@@ -14,10 +14,10 @@ import {
14
14
  isServerRunning,
15
15
  resolveGemmaConfig,
16
16
  writeServerProcessInfo
17
- } from "./chunk-NIVCRM5L.js";
17
+ } from "./chunk-5UA5NDVP.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-2RHFUIH4.js";
20
+ } from "./chunk-F73F75XM.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -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-IUVLJUOL.js";
4
+ } from "./chunk-35STMVQ6.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -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-MUGUV6RZ.js";
4
+ } from "./chunk-B4NHGUNE.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require