@google/gemini-cli 0.64.0-preview.0 → 0.65.0-nightly.20261008.g44d764ee5

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 (72) hide show
  1. package/bundle/{chunk-2NQXIWQK.js → chunk-3E6LR7PD.js} +32 -4
  2. package/bundle/{chunk-EBP6K2WG.js → chunk-3HM2DUPL.js} +50 -18
  3. package/bundle/{chunk-HSZIYPL6.js → chunk-4YOFVKC3.js} +3 -3
  4. package/bundle/{chunk-KCCVXZ52.js → chunk-63N5Z55Y.js} +114 -69
  5. package/bundle/{chunk-UFQDAROY.js → chunk-7BGM6KG2.js} +1 -1
  6. package/bundle/{chunk-EDYPRCAA.js → chunk-7PODN7KW.js} +2 -2
  7. package/bundle/{chunk-ZQW7OGUO.js → chunk-ARJWMIGO.js} +628 -124
  8. package/bundle/{chunk-U76XPSKR.js → chunk-AUU7WOFW.js} +50 -18
  9. package/bundle/{chunk-SDWOC67Z.js → chunk-BA5YFKKS.js} +1 -1
  10. package/bundle/{chunk-UBGF6JU5.js → chunk-BIHX2DZB.js} +1 -1
  11. package/bundle/{chunk-HN74ORTP.js → chunk-EZGM7WCW.js} +32 -4
  12. package/bundle/{chunk-NX7TO2DU.js → chunk-G73R7Q4K.js} +1 -1
  13. package/bundle/{chunk-EFX5XL6M.js → chunk-HN32MQMG.js} +2 -2
  14. package/bundle/{chunk-VBVCLWLA.js → chunk-HRPULK65.js} +2 -2
  15. package/bundle/{chunk-A4TO2DY2.js → chunk-IL5DA7Y5.js} +8460 -14960
  16. package/bundle/{chunk-2VN53SWW.js → chunk-IUZHBNL5.js} +9 -8
  17. package/bundle/{chunk-EDVFNWRG.js → chunk-JPVUKQJ7.js} +1 -1
  18. package/bundle/{chunk-QUCRASYB.js → chunk-LGG27U7G.js} +1 -1
  19. package/bundle/{chunk-MLSLNORV.js → chunk-MV5ZEQKH.js} +3 -3
  20. package/bundle/chunk-PFU4B5QN.js +154 -0
  21. package/bundle/{chunk-ZPLFLZQA.js → chunk-PPUDMLP4.js} +38 -8
  22. package/bundle/{chunk-VJYKQD5D.js → chunk-Q2G3IFID.js} +3 -3
  23. package/bundle/chunk-Q6FM3IBA.js +512 -0
  24. package/bundle/chunk-RUV5VETL.js +17535 -0
  25. package/bundle/chunk-SQDLQBAY.js +118 -0
  26. package/bundle/chunk-UB5UMEXC.js +401700 -0
  27. package/bundle/{chunk-ZOHM7BPT.js → chunk-UCDMKAAW.js} +1 -1
  28. package/bundle/{chunk-Y2HXXBXI.js → chunk-XDI7ON7P.js} +1 -1
  29. package/bundle/{chunk-6OFXOGEG.js → chunk-XMBLOFHQ.js} +667 -128
  30. package/bundle/chunk-YMVWBWWO.js +1571 -0
  31. package/bundle/chunk-ZCMBTRVW.js +425 -0
  32. package/bundle/chunk-ZQB4PBVQ.js +103153 -0
  33. package/bundle/{cleanup-GGCB2LVD.js → cleanup-333PJ32W.js} +2 -2
  34. package/bundle/{cleanup-JRDG3OTL.js → cleanup-FAR6AR3H.js} +2 -2
  35. package/bundle/{cleanup-SSW6IXTR.js → cleanup-GL3Y6D27.js} +2 -2
  36. package/bundle/cleanup-JB3GTDPK.js +32 -0
  37. package/bundle/{core-IUIZE6JW.js → core-4FIJ3NBL.js} +13 -1
  38. package/bundle/{devtoolsService-3SADPKKB.js → devtoolsService-2WM4AKWJ.js} +2 -2
  39. package/bundle/{devtoolsService-XZCKFZP5.js → devtoolsService-3VV6G7M6.js} +2 -2
  40. package/bundle/{devtoolsService-MF6JKRUV.js → devtoolsService-4Q6IMJZW.js} +4 -3
  41. package/bundle/devtoolsService-MNAMTUTD.js +4359 -0
  42. package/bundle/{dist-7L3BRW6V.js → dist-B6O7SDYJ.js} +13 -1
  43. package/bundle/{core-6HRWFQZW.js → dist-BBUYPVDB.js} +13 -1
  44. package/bundle/dist-HG6AYV4Z.js +2264 -0
  45. package/bundle/docs/changelogs/index.md +14 -0
  46. package/bundle/docs/changelogs/latest.md +55 -34
  47. package/bundle/docs/changelogs/preview.md +59 -54
  48. package/bundle/docs/cli/telemetry.md +1 -0
  49. package/bundle/docs/reference/configuration.md +7 -0
  50. package/bundle/docs/tools/mcp-server.md +41 -12
  51. package/bundle/{gemini-JPMMQ3KA.js → gemini-3RQKEPRX.js} +41 -21
  52. package/bundle/{gemini-QOQNG5VY.js → gemini-O5W6WLU3.js} +241 -205
  53. package/bundle/gemini-PE5RKGLA.js +17954 -0
  54. package/bundle/{gemini-ZMMDUAQJ.js → gemini-TZNM5EXD.js} +41 -21
  55. package/bundle/gemini.js +7 -7
  56. package/bundle/{interactiveCli-UDWGRVJL.js → interactiveCli-EY52EA4C.js} +50 -32
  57. package/bundle/{interactiveCli-3I4TG5SK.js → interactiveCli-P4I2OMIO.js} +354 -317
  58. package/bundle/{interactiveCli-R3P4A3FC.js → interactiveCli-PGWKO5T6.js} +50 -32
  59. package/bundle/interactiveCli-T2TOLST3.js +34997 -0
  60. package/bundle/{liteRtServerManager-OVPUSK2T.js → liteRtServerManager-52LZHRIE.js} +4 -4
  61. package/bundle/{liteRtServerManager-RAV63AGE.js → liteRtServerManager-GG66IH7W.js} +4 -4
  62. package/bundle/{liteRtServerManager-4MWCEVVM.js → liteRtServerManager-TAPI266B.js} +4 -4
  63. package/bundle/liteRtServerManager-ZMK3WM5V.js +65 -0
  64. package/bundle/{oauth2-provider-FVTRRJZR.js → oauth2-provider-7PEUKPJH.js} +47 -9
  65. package/bundle/{oauth2-provider-XFP63FGJ.js → oauth2-provider-EU3BXPHB.js} +84 -80
  66. package/bundle/oauth2-provider-JB36DOZE.js +273 -0
  67. package/bundle/{oauth2-provider-EWOA64PR.js → oauth2-provider-W7KEN635.js} +51 -9
  68. package/bundle/{start-DJAIXPPY.js → start-2D4TOWA4.js} +6 -6
  69. package/bundle/{start-VQQ2Q5KT.js → start-G7MFP7R2.js} +6 -6
  70. package/bundle/{start-5O7TBK5L.js → start-VJAR6RFJ.js} +6 -6
  71. package/bundle/start-VWUPOWW5.js +18 -0
  72. package/package.json +1 -1
@@ -1,7 +1,8 @@
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,
3
4
  checkExhaustive
4
- } from "./chunk-A4TO2DY2.js";
5
+ } from "./chunk-IL5DA7Y5.js";
5
6
  import {
6
7
  __commonJS,
7
8
  __toESM
@@ -464,19 +465,19 @@ var require_react = __commonJS({
464
465
  var import_react = __toESM(require_react(), 1);
465
466
  function mapCoreStatusToDisplayStatus(coreStatus) {
466
467
  switch (coreStatus) {
467
- case "validating" /* Validating */:
468
+ case CoreToolCallStatus.Validating:
468
469
  return "Pending" /* Pending */;
469
- case "awaiting_approval" /* AwaitingApproval */:
470
+ case CoreToolCallStatus.AwaitingApproval:
470
471
  return "Confirming" /* Confirming */;
471
- case "executing" /* Executing */:
472
+ case CoreToolCallStatus.Executing:
472
473
  return "Executing" /* Executing */;
473
- case "success" /* Success */:
474
+ case CoreToolCallStatus.Success:
474
475
  return "Success" /* Success */;
475
- case "cancelled" /* Cancelled */:
476
+ case CoreToolCallStatus.Cancelled:
476
477
  return "Canceled" /* Canceled */;
477
- case "error" /* Error */:
478
+ case CoreToolCallStatus.Error:
478
479
  return "Error" /* Error */;
479
- case "scheduled" /* Scheduled */:
480
+ case CoreToolCallStatus.Scheduled:
480
481
  return "Pending" /* Pending */;
481
482
  default:
482
483
  return checkExhaustive(coreStatus);
@@ -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-SDWOC67Z.js";
4
+ } from "./chunk-BA5YFKKS.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-UFQDAROY.js";
4
+ } from "./chunk-PFU4B5QN.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -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-ZOHM7BPT.js";
5
+ } from "./chunk-LGG27U7G.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-HN74ORTP.js";
17
+ } from "./chunk-PPUDMLP4.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-ZQW7OGUO.js";
20
+ } from "./chunk-UB5UMEXC.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -0,0 +1,154 @@
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
+ import {
3
+ ExitCodes,
4
+ Storage,
5
+ isTelemetrySdkInitialized,
6
+ resetBrowserSession,
7
+ shutdownTelemetry
8
+ } from "./chunk-UB5UMEXC.js";
9
+
10
+ // packages/cli/src/utils/cleanup.ts
11
+ import { promises as fs } from "node:fs";
12
+ import { join } from "node:path";
13
+ var cleanupFunctions = [];
14
+ var syncCleanupFunctions = [];
15
+ var configForTelemetry = null;
16
+ var isShuttingDown = false;
17
+ function registerCleanup(fn) {
18
+ cleanupFunctions.push(fn);
19
+ }
20
+ function removeCleanup(fn) {
21
+ const index = cleanupFunctions.indexOf(fn);
22
+ if (index !== -1) {
23
+ cleanupFunctions.splice(index, 1);
24
+ }
25
+ }
26
+ function registerSyncCleanup(fn) {
27
+ syncCleanupFunctions.push(fn);
28
+ }
29
+ function removeSyncCleanup(fn) {
30
+ const index = syncCleanupFunctions.indexOf(fn);
31
+ if (index !== -1) {
32
+ syncCleanupFunctions.splice(index, 1);
33
+ }
34
+ }
35
+ function resetCleanupForTesting() {
36
+ cleanupFunctions.length = 0;
37
+ syncCleanupFunctions.length = 0;
38
+ configForTelemetry = null;
39
+ isShuttingDown = false;
40
+ }
41
+ function runSyncCleanup() {
42
+ for (const fn of syncCleanupFunctions) {
43
+ try {
44
+ fn();
45
+ } catch {
46
+ }
47
+ }
48
+ syncCleanupFunctions.length = 0;
49
+ }
50
+ function registerTelemetryConfig(config) {
51
+ configForTelemetry = config;
52
+ }
53
+ async function runExitCleanup() {
54
+ await drainStdin();
55
+ runSyncCleanup();
56
+ for (const fn of cleanupFunctions) {
57
+ try {
58
+ await fn();
59
+ } catch {
60
+ }
61
+ }
62
+ cleanupFunctions.length = 0;
63
+ try {
64
+ await resetBrowserSession();
65
+ } catch {
66
+ }
67
+ if (configForTelemetry) {
68
+ try {
69
+ await configForTelemetry.dispose();
70
+ } catch {
71
+ }
72
+ }
73
+ if (configForTelemetry && isTelemetrySdkInitialized()) {
74
+ try {
75
+ await shutdownTelemetry(configForTelemetry);
76
+ } catch {
77
+ }
78
+ }
79
+ }
80
+ async function drainStdin() {
81
+ if (!process.stdin?.isTTY) return;
82
+ process.stdin.resume().removeAllListeners("data").on("data", () => {
83
+ });
84
+ await new Promise((resolve) => setTimeout(resolve, 50));
85
+ }
86
+ async function gracefulShutdown(_reason) {
87
+ if (isShuttingDown) {
88
+ return;
89
+ }
90
+ isShuttingDown = true;
91
+ await runExitCleanup();
92
+ process.exit(ExitCodes.SUCCESS);
93
+ }
94
+ function setupSignalHandlers() {
95
+ process.on("SIGHUP", () => gracefulShutdown("SIGHUP"));
96
+ process.on("SIGTERM", () => gracefulShutdown("SIGTERM"));
97
+ process.on("SIGINT", () => gracefulShutdown("SIGINT"));
98
+ }
99
+ function setupTtyCheck() {
100
+ let intervalId = null;
101
+ let isCheckingTty = false;
102
+ intervalId = setInterval(async () => {
103
+ if (isCheckingTty || isShuttingDown) {
104
+ return;
105
+ }
106
+ if (process.env["SANDBOX"]) {
107
+ return;
108
+ }
109
+ if (!process.stdin.isTTY && !process.stdout.isTTY) {
110
+ isCheckingTty = true;
111
+ if (intervalId) {
112
+ clearInterval(intervalId);
113
+ intervalId = null;
114
+ }
115
+ await gracefulShutdown("TTY loss");
116
+ }
117
+ }, 5e3);
118
+ intervalId.unref();
119
+ return () => {
120
+ if (intervalId) {
121
+ clearInterval(intervalId);
122
+ intervalId = null;
123
+ }
124
+ };
125
+ }
126
+ async function cleanupCheckpoints() {
127
+ const storage = new Storage(process.cwd());
128
+ await storage.initialize();
129
+ const tempDir = storage.getProjectTempDir();
130
+ const checkpointsDir = join(tempDir, "checkpoints");
131
+ try {
132
+ await fs.rm(checkpointsDir, { recursive: true, force: true });
133
+ } catch {
134
+ }
135
+ }
136
+
137
+ export {
138
+ registerCleanup,
139
+ removeCleanup,
140
+ registerSyncCleanup,
141
+ removeSyncCleanup,
142
+ resetCleanupForTesting,
143
+ runSyncCleanup,
144
+ registerTelemetryConfig,
145
+ runExitCleanup,
146
+ setupSignalHandlers,
147
+ setupTtyCheck,
148
+ cleanupCheckpoints
149
+ };
150
+ /**
151
+ * @license
152
+ * Copyright 2025 Google LLC
153
+ * SPDX-License-Identifier: Apache-2.0
154
+ */
@@ -2,6 +2,8 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  AuthProviderType,
4
4
  AuthType,
5
+ CoreEvent,
6
+ CoreToolCallStatus,
5
7
  DEFAULT_MODEL_CONFIGS,
6
8
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
7
9
  EDITOR_OPTIONS,
@@ -31,7 +33,7 @@ import {
31
33
  partListUnionToString,
32
34
  require_strip_json_comments,
33
35
  sanitizeFilenamePart
34
- } from "./chunk-A4TO2DY2.js";
36
+ } from "./chunk-UB5UMEXC.js";
35
37
  import {
36
38
  __commonJS,
37
39
  __require,
@@ -10289,7 +10291,7 @@ function convertSessionToHistoryFormats(messages) {
10289
10291
  args: tool.args,
10290
10292
  description: tool.description || "",
10291
10293
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown ?? true,
10292
- status: tool.status === "success" ? "success" /* Success */ : "error" /* Error */,
10294
+ status: tool.status === "success" ? CoreToolCallStatus.Success : CoreToolCallStatus.Error,
10293
10295
  resultDisplay: tool.resultDisplay,
10294
10296
  confirmationDetails: void 0
10295
10297
  }))
@@ -15246,7 +15248,13 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
15246
15248
  oauth: {
15247
15249
  type: "object",
15248
15250
  description: "OAuth configuration for authenticating with the server.",
15249
- additionalProperties: true
15251
+ additionalProperties: true,
15252
+ properties: {
15253
+ authorizationResponseIssParameterSupported: {
15254
+ type: "boolean",
15255
+ description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
15256
+ }
15257
+ }
15250
15258
  },
15251
15259
  authProviderType: {
15252
15260
  type: "string",
@@ -15307,7 +15315,13 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
15307
15315
  oauth: {
15308
15316
  type: "object",
15309
15317
  description: "OAuth configuration for authenticating with the server.",
15310
- additionalProperties: true
15318
+ additionalProperties: true,
15319
+ properties: {
15320
+ authorizationResponseIssParameterSupported: {
15321
+ type: "boolean",
15322
+ description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
15323
+ }
15324
+ }
15311
15325
  },
15312
15326
  authProviderType: {
15313
15327
  type: "string",
@@ -15346,6 +15360,11 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
15346
15360
  description: "Protocol for OTLP exporters.",
15347
15361
  enum: ["grpc", "http"]
15348
15362
  },
15363
+ otlpHeaders: {
15364
+ type: "object",
15365
+ description: "Custom headers to send with OTLP exporter requests.",
15366
+ additionalProperties: { type: "string" }
15367
+ },
15349
15368
  traces: {
15350
15369
  type: "boolean",
15351
15370
  description: "Whether detailed traces with large attributes are captured."
@@ -16330,6 +16349,7 @@ function mergeSettings(system, systemDefaults, user, workspace, isTrusted) {
16330
16349
  system
16331
16350
  );
16332
16351
  }
16352
+ var UNTRUSTED_WORKSPACE_SETTINGS_ERROR = "Cannot modify settings in an untrusted workspace. To enable this, verify the source of the repository and set GEMINI_CLI_TRUST_WORKSPACE=true or move your configuration to the global settings file.";
16333
16353
  var LoadedSettings = class {
16334
16354
  constructor(system, systemDefaults, user, workspace, isTrusted, errors = []) {
16335
16355
  this.system = system;
@@ -16376,7 +16396,8 @@ var LoadedSettings = class {
16376
16396
  return {
16377
16397
  ...workspace,
16378
16398
  settings: {},
16379
- originalSettings: {}
16399
+ originalSettings: {},
16400
+ readOnly: true
16380
16401
  };
16381
16402
  }
16382
16403
  computeMergedSettings(forceTrusted = false) {
@@ -16421,8 +16442,8 @@ var LoadedSettings = class {
16421
16442
  // React will pass a listener fn into this subscribe fn
16422
16443
  // that listener fn will perform an object identity check on the snapshot and trigger a React re render if the snapshot has changed
16423
16444
  subscribe(listener) {
16424
- coreEvents.on("settings-changed" /* SettingsChanged */, listener);
16425
- return () => coreEvents.off("settings-changed" /* SettingsChanged */, listener);
16445
+ coreEvents.on(CoreEvent.SettingsChanged, listener);
16446
+ return () => coreEvents.off(CoreEvent.SettingsChanged, listener);
16426
16447
  }
16427
16448
  getSnapshot() {
16428
16449
  return this._snapshot;
@@ -16446,6 +16467,14 @@ var LoadedSettings = class {
16446
16467
  }
16447
16468
  setValue(scope, key, value) {
16448
16469
  const settingsFile = this.forScope(scope);
16470
+ if (scope === "Workspace" /* Workspace */ && !this.isPersistable(settingsFile)) {
16471
+ if (settingsFile.path === "" || settingsFile.path === this.user.path) {
16472
+ throw new Error(
16473
+ "Cannot modify workspace settings in the home directory. Please use user scope instead."
16474
+ );
16475
+ }
16476
+ throw new Error(UNTRUSTED_WORKSPACE_SETTINGS_ERROR);
16477
+ }
16449
16478
  const valueToSet = typeof value === "object" && value !== null ? structuredClone(value) : value;
16450
16479
  setNestedProperty(settingsFile.settings, key, valueToSet);
16451
16480
  if (this.isPersistable(settingsFile)) {
@@ -16566,7 +16595,7 @@ function setUpCloudShellEnvironment(envFilePath, isTrusted, isSandboxed, selecte
16566
16595
  }
16567
16596
  }
16568
16597
  let value = "cloudshell-gca";
16569
- if (selectedAuthType === "vertex-ai" /* USE_VERTEX_AI */) {
16598
+ if (selectedAuthType === AuthType.USE_VERTEX_AI) {
16570
16599
  value = process2.env[USER_GCP_PROJECT];
16571
16600
  }
16572
16601
  if (envFilePath && fs4.existsSync(envFilePath)) {
@@ -17459,6 +17488,7 @@ export {
17459
17488
  USER_SETTINGS_PATH,
17460
17489
  SettingScope,
17461
17490
  isLoadableSettingScope,
17491
+ UNTRUSTED_WORKSPACE_SETTINGS_ERROR,
17462
17492
  loadEnvironment,
17463
17493
  isWorktreeEnabled,
17464
17494
  loadSettings,
@@ -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-EDVFNWRG.js";
5
+ } from "./chunk-UCDMKAAW.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-2NQXIWQK.js";
17
+ } from "./chunk-RUV5VETL.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-6OFXOGEG.js";
20
+ } from "./chunk-ARJWMIGO.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";