@google/gemini-cli 0.61.0-preview.0 → 0.62.0-nightly.20260917.g6a466a7e2

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-HQQJ2XNS.js → chunk-2TMMVNOE.js} +1 -1
  2. package/bundle/{chunk-YJFCJUWN.js → chunk-3ZF5XZOW.js} +1 -1
  3. package/bundle/{chunk-UUSSUQWL.js → chunk-5WSRRFVH.js} +9 -8
  4. package/bundle/{chunk-KUWKDEHW.js → chunk-6MRHUUCE.js} +8 -5
  5. package/bundle/{chunk-AIMNGITH.js → chunk-A2H7KTL6.js} +3 -3
  6. package/bundle/{chunk-3KWHN3A7.js → chunk-A7UWNGLN.js} +1 -1
  7. package/bundle/{chunk-GLGFO33Y.js → chunk-CITNSBTB.js} +1 -1
  8. package/bundle/{chunk-DO6WSZ5A.js → chunk-CLN3AE74.js} +2 -2
  9. package/bundle/chunk-D6CZRIXL.js +512 -0
  10. package/bundle/{chunk-WFZMFTEE.js → chunk-DZD5OCWY.js} +3 -3
  11. package/bundle/{chunk-LDL5PSV7.js → chunk-E7PZYN2A.js} +2 -2
  12. package/bundle/chunk-FQQZQKPJ.js +17353 -0
  13. package/bundle/{chunk-FIYKTSCR.js → chunk-GDZZYEDB.js} +1 -1
  14. package/bundle/{chunk-DOJZLPDE.js → chunk-GGPWDDFF.js} +1 -1
  15. package/bundle/{chunk-4WJNJ3DK.js → chunk-HDSCCQMH.js} +1 -1
  16. package/bundle/{chunk-ACTC6X24.js → chunk-K3NKSX2H.js} +94 -20
  17. package/bundle/{chunk-6HVPDYWM.js → chunk-K4AORAJT.js} +3 -3
  18. package/bundle/chunk-KEX2M7LY.js +118 -0
  19. package/bundle/{chunk-OANXWSAG.js → chunk-LCP6W7OE.js} +7849 -14610
  20. package/bundle/{chunk-HGJ3LRCZ.js → chunk-LRE7RNQM.js} +1 -1
  21. package/bundle/{chunk-FH2AJT7C.js → chunk-NSC3QBEC.js} +110 -20
  22. package/bundle/{chunk-BCGPZKAR.js → chunk-OGTVBT3K.js} +1 -1
  23. package/bundle/chunk-OKRWB4BV.js +154 -0
  24. package/bundle/chunk-OOQPFL3D.js +1571 -0
  25. package/bundle/{chunk-OZG5CLDY.js → chunk-R2NSHNMX.js} +7 -7
  26. package/bundle/chunk-RWMOTXNW.js +399552 -0
  27. package/bundle/{chunk-UCLFGIUA.js → chunk-SEUCOV6F.js} +2 -2
  28. package/bundle/{chunk-XL4BRDNV.js → chunk-UUUOULJ2.js} +7 -7
  29. package/bundle/chunk-VJTRCRRE.js +398 -0
  30. package/bundle/{chunk-ZOKIJ2CA.js → chunk-VRV77ZWV.js} +67 -54
  31. package/bundle/{chunk-ZJHBR7W3.js → chunk-XQ7FVW42.js} +1 -1
  32. package/bundle/chunk-ZSPN4JUH.js +102678 -0
  33. package/bundle/{cleanup-AM5TUWBB.js → cleanup-BQVBD7FP.js} +2 -2
  34. package/bundle/{cleanup-FLPPBDLV.js → cleanup-DIILMXEW.js} +2 -2
  35. package/bundle/{cleanup-KI735Y45.js → cleanup-HEOQHGM6.js} +2 -2
  36. package/bundle/cleanup-TFF46WPZ.js +32 -0
  37. package/bundle/{core-R7CF7CQD.js → core-4DHKTWZ2.js} +7 -1
  38. package/bundle/{devtoolsService-UUGXHVTK.js → devtoolsService-3RY5PM2Z.js} +2 -2
  39. package/bundle/{devtoolsService-WOA7VJLA.js → devtoolsService-DNJNJQZM.js} +4 -3
  40. package/bundle/{devtoolsService-MA34M6Q7.js → devtoolsService-QJHOMSYF.js} +2 -2
  41. package/bundle/devtoolsService-ZIP35XF5.js +4359 -0
  42. package/bundle/{dist-VH7RJCTA.js → dist-56CPDJ4S.js} +7 -1
  43. package/bundle/{core-F6IWXMFD.js → dist-7FYHIT6B.js} +7 -1
  44. package/bundle/dist-ZH5RL5SW.js +2222 -0
  45. package/bundle/docs/changelogs/index.md +14 -0
  46. package/bundle/docs/changelogs/latest.md +55 -21
  47. package/bundle/docs/changelogs/preview.md +30 -54
  48. package/bundle/{gemini-N24ID3HC.js → gemini-4CJ3SSKF.js} +18 -17
  49. package/bundle/{gemini-SRSLV7D2.js → gemini-DK47V65B.js} +218 -201
  50. package/bundle/{gemini-NLU2EPRF.js → gemini-DLBDVVA3.js} +18 -17
  51. package/bundle/gemini-WEMSASPO.js +17763 -0
  52. package/bundle/gemini.js +7 -7
  53. package/bundle/{interactiveCli-SOMGNC7U.js → interactiveCli-4PM25PCZ.js} +8 -8
  54. package/bundle/{interactiveCli-DDJZ4B26.js → interactiveCli-HQILQ7YP.js} +315 -296
  55. package/bundle/interactiveCli-LHN6WWUZ.js +35024 -0
  56. package/bundle/{interactiveCli-PNXXOFIE.js → interactiveCli-TUXEPH5P.js} +8 -8
  57. package/bundle/{liteRtServerManager-HDIBGLHN.js → liteRtServerManager-D62XYX4N.js} +4 -4
  58. package/bundle/{liteRtServerManager-XEOODEAA.js → liteRtServerManager-ISZAREVH.js} +4 -4
  59. package/bundle/{liteRtServerManager-GW22Q7F4.js → liteRtServerManager-SNXJPNND.js} +4 -4
  60. package/bundle/liteRtServerManager-WIM3YWCR.js +65 -0
  61. package/bundle/{oauth2-provider-SADAKLZ2.js → oauth2-provider-5EU7U6FM.js} +1 -1
  62. package/bundle/{oauth2-provider-ZC45IIOS.js → oauth2-provider-6C2WVQI4.js} +1 -1
  63. package/bundle/{oauth2-provider-347DWYC5.js → oauth2-provider-NKYLHBYL.js} +38 -72
  64. package/bundle/oauth2-provider-OHYS7A6V.js +235 -0
  65. package/bundle/{start-IVH46CBG.js → start-6IM4YLMK.js} +6 -6
  66. package/bundle/{start-PRP35I6V.js → start-7YML3ZO4.js} +6 -6
  67. package/bundle/{start-H7F3LFFN.js → start-JJUNWR7U.js} +6 -6
  68. package/bundle/start-JMS3GDG2.js +18 -0
  69. package/package.json +1 -1
@@ -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-BCGPZKAR.js";
4
+ } from "./chunk-OGTVBT3K.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-FH2AJT7C.js";
8
+ } from "./chunk-RWMOTXNW.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-OANXWSAG.js";
8
+ } from "./chunk-NSC3QBEC.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -274589,6 +274589,83 @@ function isMcpToolAnnotation(annotation) {
274589
274589
  const serverName = record2["_serverName"];
274590
274590
  return typeof serverName === "string";
274591
274591
  }
274592
+ var CONVERSATIONAL_PARAM_KEYS = /* @__PURE__ */ new Set([
274593
+ "description",
274594
+ "explanation",
274595
+ "reason",
274596
+ "thought"
274597
+ ]);
274598
+ function formatParamValue(value) {
274599
+ if (value === null || value === void 0) {
274600
+ return String(value);
274601
+ }
274602
+ if (typeof value === "string") {
274603
+ return value;
274604
+ }
274605
+ if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") {
274606
+ return String(value);
274607
+ }
274608
+ if (Array.isArray(value)) {
274609
+ return `[${value.map(formatParamValue).join(", ")}]`;
274610
+ }
274611
+ if (typeof value === "object") {
274612
+ const entries = Object.entries(value).filter(([, v]) => v !== void 0).map(([k, v]) => `${k}: ${formatParamValue(v)}`);
274613
+ return `(${entries.join(", ")})`;
274614
+ }
274615
+ return String(value);
274616
+ }
274617
+ function formatToolDescription(toolName, fallbackDisplayName, params) {
274618
+ const functionalEntries = Object.entries(params).filter(([key, val]) => !CONVERSATIONAL_PARAM_KEYS.has(key.toLowerCase()) && val !== void 0);
274619
+ const command = params["command"];
274620
+ if (typeof command === "string" && functionalEntries.length === 1 && functionalEntries[0]?.[0] === "command") {
274621
+ return command;
274622
+ }
274623
+ if (functionalEntries.length === 0) {
274624
+ return fallbackDisplayName || toolName;
274625
+ }
274626
+ const formattedArgs = functionalEntries.map(([key, val]) => `${key}: ${formatParamValue(val)}`).join(", ");
274627
+ return `${toolName}(${formattedArgs})`;
274628
+ }
274629
+ function formatToolDisplayTitle(toolName, fallbackDisplayName, params) {
274630
+ const command = params["command"];
274631
+ if (typeof command === "string" && command.trim().length > 0) {
274632
+ return command;
274633
+ }
274634
+ return formatToolDescription(toolName, fallbackDisplayName, params);
274635
+ }
274636
+ function extractToolExplanation(params) {
274637
+ const MAX_EXPLANATION_LENGTH = 500;
274638
+ const parts2 = [];
274639
+ const command = params["command"];
274640
+ const hasCommand = typeof command === "string" && command.trim().length > 0;
274641
+ if (hasCommand) {
274642
+ const contextEntries = Object.entries(params).filter(([key, val]) => key !== "command" && !CONVERSATIONAL_PARAM_KEYS.has(key.toLowerCase()) && val !== void 0);
274643
+ if (contextEntries.length > 0) {
274644
+ const formattedContext = contextEntries.map(([key, val]) => `${key}: ${formatParamValue(val)}`).join(", ");
274645
+ if (formattedContext.length > MAX_EXPLANATION_LENGTH) {
274646
+ const keys = Object.keys(params);
274647
+ const displayedKeys = keys.slice(0, 5);
274648
+ const keysDesc = displayedKeys.length > 0 ? ` with parameters: ${displayedKeys.join(", ")}${keys.length > 5 ? ", ..." : ""}` : "";
274649
+ parts2.push(`[Payload omitted due to length${keysDesc}]`);
274650
+ } else {
274651
+ parts2.push(`[${formattedContext}]`);
274652
+ }
274653
+ }
274654
+ }
274655
+ for (const [key, val] of Object.entries(params)) {
274656
+ if (CONVERSATIONAL_PARAM_KEYS.has(key.toLowerCase()) && typeof val === "string" && val.trim().length > 0) {
274657
+ parts2.push(val.trim());
274658
+ }
274659
+ }
274660
+ if (parts2.length === 0) {
274661
+ return "";
274662
+ }
274663
+ const combined = parts2.join(" ");
274664
+ if (combined.length > MAX_EXPLANATION_LENGTH) {
274665
+ return `${combined.slice(0, MAX_EXPLANATION_LENGTH)}...`;
274666
+ }
274667
+ return combined;
274668
+ }
274592
274669
  var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends BaseToolInvocation {
274593
274670
  mcpTool;
274594
274671
  serverName;
@@ -274718,25 +274795,13 @@ var DiscoveredMCPToolInvocation = class _DiscoveredMCPToolInvocation extends Bas
274718
274795
  };
274719
274796
  }
274720
274797
  getDescription() {
274721
- return safeJsonStringify(this.params);
274798
+ return formatToolDescription(this.serverToolName, this.displayName, this.params);
274722
274799
  }
274723
274800
  getDisplayTitle() {
274724
- const command = this.params["command"];
274725
- if (typeof command === "string") {
274726
- return command;
274727
- }
274728
- return this.displayName || this.serverToolName;
274801
+ return formatToolDisplayTitle(this.serverToolName, this.displayName, this.params);
274729
274802
  }
274730
274803
  getExplanation() {
274731
- const MAX_EXPLANATION_LENGTH = 500;
274732
- const stringified = safeJsonStringify(this.params);
274733
- if (stringified.length > MAX_EXPLANATION_LENGTH) {
274734
- const keys = Object.keys(this.params);
274735
- const displayedKeys = keys.slice(0, 5);
274736
- const keysDesc = displayedKeys.length > 0 ? ` with parameters: ${displayedKeys.join(", ")}${keys.length > 5 ? ", ..." : ""}` : "";
274737
- return `[Payload omitted due to length${keysDesc}]`;
274738
- }
274739
- return stringified;
274804
+ return extractToolExplanation(this.params);
274740
274805
  }
274741
274806
  };
274742
274807
  var DiscoveredMCPTool = class extends BaseDeclarativeTool {
@@ -283246,8 +283311,8 @@ function isValidToolName(name3, options = {}) {
283246
283311
  }
283247
283312
 
283248
283313
  // packages/core/dist/src/generated/git-commit.js
283249
- var GIT_COMMIT_INFO = "ae28844fb";
283250
- var CLI_VERSION = "0.61.0-preview.0";
283314
+ var GIT_COMMIT_INFO = "6a466a7e2";
283315
+ var CLI_VERSION = "0.62.0-nightly.20260915.gae28844fb";
283251
283316
 
283252
283317
  // packages/core/dist/src/ide/detect-ide.js
283253
283318
  var IDE_DEFINITIONS = {
@@ -306541,7 +306606,7 @@ function getVersion() {
306541
306606
  }
306542
306607
  versionPromise = (async () => {
306543
306608
  const pkgJson = await getPackageJson(__dirname4);
306544
- return "0.61.0-preview.0";
306609
+ return "0.62.0-nightly.20260917.g6a466a7e2";
306545
306610
  })();
306546
306611
  return versionPromise;
306547
306612
  }
@@ -312124,7 +312189,13 @@ var DiscoveredToolInvocation = class extends BaseToolInvocation {
312124
312189
  this.originalToolName = originalToolName;
312125
312190
  }
312126
312191
  getDescription() {
312127
- return safeJsonStringify(this.params);
312192
+ return formatToolDescription(this.originalToolName, void 0, this.params);
312193
+ }
312194
+ getDisplayTitle() {
312195
+ return formatToolDisplayTitle(this.originalToolName, void 0, this.params);
312196
+ }
312197
+ getExplanation() {
312198
+ return extractToolExplanation(this.params);
312128
312199
  }
312129
312200
  async execute({ abortSignal: _signal, updateOutput: _updateOutput }) {
312130
312201
  const callCommand = this.config.getToolCallCommand();
@@ -340084,7 +340155,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
340084
340155
  return provider;
340085
340156
  }
340086
340157
  case "oauth2": {
340087
- const { OAuth2AuthProvider } = await import("./oauth2-provider-SADAKLZ2.js");
340158
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-OHYS7A6V.js");
340088
340159
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
340089
340160
  await provider.initialize();
340090
340161
  return provider;
@@ -397895,6 +397966,9 @@ export {
397895
397966
  parseMcpToolName,
397896
397967
  formatMcpToolName,
397897
397968
  isMcpToolAnnotation,
397969
+ formatToolDescription,
397970
+ formatToolDisplayTitle,
397971
+ extractToolExplanation,
397898
397972
  DiscoveredMCPToolInvocation,
397899
397973
  DiscoveredMCPTool,
397900
397974
  generateValidName,
@@ -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-HGJ3LRCZ.js";
5
+ } from "./chunk-LRE7RNQM.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-GLGFO33Y.js";
17
+ } from "./chunk-2TMMVNOE.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-FH2AJT7C.js";
20
+ } from "./chunk-LCP6W7OE.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -0,0 +1,118 @@
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
+ exitCli,
4
+ require_source
5
+ } from "./chunk-GDZZYEDB.js";
6
+ import {
7
+ DEFAULT_PORT,
8
+ SERVER_START_WAIT_MS,
9
+ getBinaryPath,
10
+ getLiteRtBinDir,
11
+ getLogFilePath,
12
+ getPidFilePath,
13
+ isBinaryInstalled,
14
+ isServerRunning,
15
+ resolveGemmaConfig,
16
+ writeServerProcessInfo
17
+ } from "./chunk-FQQZQKPJ.js";
18
+ import {
19
+ debugLogger
20
+ } from "./chunk-K3NKSX2H.js";
21
+ import {
22
+ __toESM
23
+ } from "./chunk-34MYV7JD.js";
24
+
25
+ // packages/cli/src/commands/gemma/start.ts
26
+ var import_chalk = __toESM(require_source(), 1);
27
+ import fs from "node:fs";
28
+ import path from "node:path";
29
+ import { spawn } from "node:child_process";
30
+ async function startServer(binaryPath, port) {
31
+ const alreadyRunning = await isServerRunning(port);
32
+ if (alreadyRunning) {
33
+ debugLogger.log(`LiteRT server already running on port ${port}`);
34
+ return true;
35
+ }
36
+ const logPath = getLogFilePath();
37
+ fs.mkdirSync(getLiteRtBinDir(), { recursive: true });
38
+ const tmpDir = path.dirname(getPidFilePath());
39
+ fs.mkdirSync(tmpDir, { recursive: true });
40
+ const logFd = fs.openSync(logPath, "a");
41
+ try {
42
+ const child = spawn(binaryPath, ["serve", `--port=${port}`, "--verbose"], {
43
+ detached: true,
44
+ stdio: ["ignore", logFd, logFd]
45
+ });
46
+ if (child.pid) {
47
+ writeServerProcessInfo({
48
+ pid: child.pid,
49
+ binaryPath,
50
+ port
51
+ });
52
+ }
53
+ child.unref();
54
+ } finally {
55
+ fs.closeSync(logFd);
56
+ }
57
+ await new Promise((resolve) => setTimeout(resolve, SERVER_START_WAIT_MS));
58
+ return isServerRunning(port);
59
+ }
60
+ var startCommand = {
61
+ command: "start",
62
+ describe: "Start the LiteRT-LM server",
63
+ builder: (yargs) => yargs.option("port", {
64
+ type: "number",
65
+ description: "Port for the LiteRT server"
66
+ }),
67
+ handler: async (argv) => {
68
+ let port;
69
+ if (argv["port"] !== void 0) {
70
+ port = Number(argv["port"]);
71
+ }
72
+ if (!port) {
73
+ const { configuredPort } = resolveGemmaConfig(DEFAULT_PORT);
74
+ port = configuredPort;
75
+ }
76
+ const binaryPath = getBinaryPath();
77
+ if (!binaryPath || !isBinaryInstalled(binaryPath)) {
78
+ debugLogger.error(
79
+ import_chalk.default.red(
80
+ 'LiteRT-LM binary not found. Run "gemini gemma setup" first.'
81
+ )
82
+ );
83
+ await exitCli(1);
84
+ return;
85
+ }
86
+ const alreadyRunning = await isServerRunning(port);
87
+ if (alreadyRunning) {
88
+ debugLogger.log(
89
+ import_chalk.default.green(`LiteRT server is already running on port ${port}.`)
90
+ );
91
+ await exitCli(0);
92
+ return;
93
+ }
94
+ debugLogger.log(`Starting LiteRT server on port ${port}...`);
95
+ const started = await startServer(binaryPath, port);
96
+ if (started) {
97
+ debugLogger.log(import_chalk.default.green(`LiteRT server started on port ${port}.`));
98
+ debugLogger.log(import_chalk.default.dim(`Logs: ${getLogFilePath()}`));
99
+ await exitCli(0);
100
+ } else {
101
+ debugLogger.error(
102
+ import_chalk.default.red("Server may not have started correctly. Check logs:")
103
+ );
104
+ debugLogger.error(import_chalk.default.dim(` ${getLogFilePath()}`));
105
+ await exitCli(1);
106
+ }
107
+ }
108
+ };
109
+
110
+ export {
111
+ startServer,
112
+ startCommand
113
+ };
114
+ /**
115
+ * @license
116
+ * Copyright 2026 Google LLC
117
+ * SPDX-License-Identifier: Apache-2.0
118
+ */