@google/gemini-cli 0.53.0-preview.0 → 0.53.1

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-5RDOS7UZ.js → chunk-2NH5AG3B.js} +175 -39
  2. package/bundle/{chunk-PVCJCQWY.js → chunk-2W4AGAXV.js} +1 -1
  3. package/bundle/{chunk-HF533LET.js → chunk-3A32ZSG7.js} +7774 -14246
  4. package/bundle/{chunk-BX6DTJOD.js → chunk-3QXIQPRB.js} +1 -1
  5. package/bundle/{chunk-SLQKIE73.js → chunk-4SJPXUBO.js} +1 -1
  6. package/bundle/{chunk-XH7QC2TB.js → chunk-4TO4ZFXG.js} +2 -2
  7. package/bundle/{chunk-PKFZO3SN.js → chunk-5544MKWC.js} +1 -1
  8. package/bundle/{chunk-27C6XFMY.js → chunk-5Y7N3RFB.js} +198 -42
  9. package/bundle/{chunk-4OVORMGE.js → chunk-AGHZJVUR.js} +1 -1
  10. package/bundle/{chunk-UJVAPQ7V.js → chunk-AT7LBPDZ.js} +1 -1
  11. package/bundle/{chunk-7VUO7T2C.js → chunk-EVNGSSTE.js} +3 -3
  12. package/bundle/{chunk-SXKIOLLX.js → chunk-I2LQOUTQ.js} +7 -7
  13. package/bundle/chunk-IU6WDAMY.js +1571 -0
  14. package/bundle/chunk-JEAU27VO.js +154 -0
  15. package/bundle/chunk-JR6IZCRZ.js +397034 -0
  16. package/bundle/{chunk-WVDR5L2V.js → chunk-KELPZKO5.js} +67 -54
  17. package/bundle/{chunk-PLMRBJEA.js → chunk-KNB5JW7H.js} +2 -2
  18. package/bundle/{chunk-IODN6H35.js → chunk-KUOIDGSH.js} +1 -1
  19. package/bundle/{chunk-UEI42N7R.js → chunk-KW3DD4IB.js} +3 -3
  20. package/bundle/{chunk-BDSSP5BZ.js → chunk-LPTVZ4FJ.js} +1 -1
  21. package/bundle/{chunk-BRZT2CQU.js → chunk-N2KH22XD.js} +1 -1
  22. package/bundle/{chunk-LUM47MYE.js → chunk-N4JX5RHY.js} +1 -1
  23. package/bundle/{chunk-6AD4A2WF.js → chunk-OFMYNLJO.js} +8 -5
  24. package/bundle/chunk-QUZIMBPB.js +102505 -0
  25. package/bundle/{chunk-HVYOZEAP.js → chunk-RDVVXMLN.js} +3 -3
  26. package/bundle/chunk-TAOISOL2.js +118 -0
  27. package/bundle/{chunk-CTNBR234.js → chunk-TIUOC6Z4.js} +2 -2
  28. package/bundle/chunk-UQGV7WFA.js +398 -0
  29. package/bundle/{chunk-GHVD6PXK.js → chunk-VQ5JKD47.js} +9 -8
  30. package/bundle/chunk-XV2XVUWW.js +512 -0
  31. package/bundle/{chunk-QSTUV3QH.js → chunk-YF4RJFUM.js} +7 -7
  32. package/bundle/chunk-ZJENN63T.js +17332 -0
  33. package/bundle/{cleanup-4FVUYQ7H.js → cleanup-CLX27ZSM.js} +2 -2
  34. package/bundle/{cleanup-XETKRH7X.js → cleanup-HE6L3KVJ.js} +2 -2
  35. package/bundle/{cleanup-ZR34H2GU.js → cleanup-QTYIWJJQ.js} +2 -2
  36. package/bundle/cleanup-WQLF5LTO.js +32 -0
  37. package/bundle/{core-PVG4D2MR.js → core-FG5GQN5T.js} +15 -1
  38. package/bundle/{devtoolsService-OUX7PWP3.js → devtoolsService-6MCOO7GD.js} +2 -2
  39. package/bundle/{devtoolsService-IVPTF5ZJ.js → devtoolsService-ALVEJOWU.js} +2 -2
  40. package/bundle/{devtoolsService-QYDPHHFN.js → devtoolsService-LWOTA4XY.js} +4 -3
  41. package/bundle/devtoolsService-NLJPFQBD.js +4359 -0
  42. package/bundle/{dist-PRJQFPSQ.js → dist-FACZYJNK.js} +15 -1
  43. package/bundle/{core-I73XKBPY.js → dist-KYMVPMD2.js} +15 -1
  44. package/bundle/dist-YR3L73K3.js +2168 -0
  45. package/bundle/{gemini-LA6TNI44.js → gemini-2TTBMK7L.js} +84 -20
  46. package/bundle/{gemini-QKB55UV6.js → gemini-EEGDTU6Z.js} +282 -202
  47. package/bundle/{gemini-E2E3U6PR.js → gemini-HMY2YBVR.js} +84 -20
  48. package/bundle/gemini-RNN5D7OL.js +16491 -0
  49. package/bundle/gemini.js +7 -7
  50. package/bundle/{interactiveCli-OD2LO24X.js → interactiveCli-47BG5E33.js} +99 -9
  51. package/bundle/{interactiveCli-ADLAWPXN.js → interactiveCli-HJK54NFF.js} +406 -297
  52. package/bundle/{interactiveCli-FS3OVPXQ.js → interactiveCli-PIOEDBQZ.js} +99 -9
  53. package/bundle/interactiveCli-UQQGETBL.js +34906 -0
  54. package/bundle/{liteRtServerManager-O7PFOUFD.js → liteRtServerManager-BZXTWG2T.js} +4 -4
  55. package/bundle/{liteRtServerManager-T2Z3RLS3.js → liteRtServerManager-ULQCSZ6V.js} +4 -4
  56. package/bundle/{liteRtServerManager-3SKK7MNE.js → liteRtServerManager-YXO26SKL.js} +4 -4
  57. package/bundle/liteRtServerManager-ZN3L6BPO.js +65 -0
  58. package/bundle/{oauth2-provider-Q433RA6I.js → oauth2-provider-G4XOGQD7.js} +1 -1
  59. package/bundle/{oauth2-provider-E3S5DGLL.js → oauth2-provider-H33CP2XJ.js} +1 -1
  60. package/bundle/{oauth2-provider-DFVE3NYF.js → oauth2-provider-KEB5OWVK.js} +38 -72
  61. package/bundle/oauth2-provider-MZRAKSIZ.js +235 -0
  62. package/bundle/{start-5G2UDZZ6.js → start-AOVRZOK6.js} +6 -6
  63. package/bundle/{start-XMJ23QZN.js → start-JQESP66T.js} +6 -6
  64. package/bundle/{start-3FPYJBRX.js → start-KJPOXM4W.js} +6 -6
  65. package/bundle/start-UN2U7AFE.js +18 -0
  66. package/package.json +1 -1
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
2
2
  import {
3
3
  startCommand,
4
4
  startServer
5
- } from "./chunk-7VUO7T2C.js";
5
+ } from "./chunk-TAOISOL2.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -45,11 +45,11 @@ import {
45
45
  updateAllUpdatableExtensions,
46
46
  updateExtension,
47
47
  validateAuthMethod
48
- } from "./chunk-SXKIOLLX.js";
48
+ } from "./chunk-KELPZKO5.js";
49
49
  import {
50
50
  exitCli,
51
51
  require_source
52
- } from "./chunk-UJVAPQ7V.js";
52
+ } from "./chunk-AGHZJVUR.js";
53
53
  import {
54
54
  appEvents
55
55
  } from "./chunk-5PS3AYFU.js";
@@ -87,11 +87,11 @@ import {
87
87
  resolveGemmaConfig,
88
88
  saveModelChange,
89
89
  stripAnsi
90
- } from "./chunk-LUM47MYE.js";
90
+ } from "./chunk-ZJENN63T.js";
91
91
  import {
92
92
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-PLMRBJEA.js";
94
- import "./chunk-BRZT2CQU.js";
93
+ } from "./chunk-UQGV7WFA.js";
94
+ import "./chunk-XV2XVUWW.js";
95
95
  import {
96
96
  cleanupCheckpoints,
97
97
  registerCleanup,
@@ -100,7 +100,7 @@ import {
100
100
  runExitCleanup,
101
101
  runSyncCleanup,
102
102
  setupSignalHandlers
103
- } from "./chunk-BX6DTJOD.js";
103
+ } from "./chunk-5544MKWC.js";
104
104
  import {
105
105
  ASK_USER_TOOL_NAME,
106
106
  ApprovalMode,
@@ -139,9 +139,11 @@ import {
139
139
  Kind,
140
140
  LegacyAgentSession,
141
141
  Logger,
142
+ MAX_TOKENS_EXCEEDED_SUGGESTION,
142
143
  MCPServerConfig,
143
144
  MCPServerStatus,
144
145
  MessageBusType,
146
+ OTHER_BLOCKED_MESSAGE,
145
147
  OutputFormat,
146
148
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
147
149
  PREVIEW_GEMINI_3_1_MODEL,
@@ -150,9 +152,11 @@ import {
150
152
  PREVIEW_GEMINI_MODEL,
151
153
  PolicyDecision,
152
154
  PolicyIntegrityManager,
155
+ RECITATION_BLOCKED_MESSAGE,
153
156
  REFERENCE_CONTENT_START,
154
157
  ROOT_SCHEDULER_ID,
155
158
  ReadManyFilesTool,
159
+ SAFETY_BLOCKED_MESSAGE,
156
160
  Scheduler,
157
161
  SessionEndReason,
158
162
  SessionStartSource,
@@ -160,6 +164,8 @@ import {
160
164
  SimpleExtensionLoader,
161
165
  Storage,
162
166
  StreamJsonFormatter,
167
+ THINKING_ONLY_COMPRESS_SUGGESTION,
168
+ TRUE_EMPTY_RESPONSE_MESSAGE,
163
169
  ToolCallEvent,
164
170
  ToolConfirmationOutcome,
165
171
  ToolErrorType,
@@ -247,7 +253,7 @@ import {
247
253
  updatePolicy,
248
254
  writeToStderr,
249
255
  writeToStdout
250
- } from "./chunk-5RDOS7UZ.js";
256
+ } from "./chunk-2NH5AG3B.js";
251
257
  import "./chunk-664ZODQF.js";
252
258
  import "./chunk-IUUIT4SU.js";
253
259
  import "./chunk-TUDYL3X4.js";
@@ -7841,7 +7847,7 @@ async function loadSandboxConfig(settings, argv) {
7841
7847
  }
7842
7848
  const command2 = getSandboxCommand(sandboxValue);
7843
7849
  const packageJson = await getPackageJson(__dirname3);
7844
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.53.0-preview.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7850
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.53.1" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7845
7851
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7846
7852
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7847
7853
  }
@@ -10249,7 +10255,7 @@ async function runNonInteractive({
10249
10255
  }
10250
10256
  });
10251
10257
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10252
- const { setupInitialActivityLogger } = await import("./devtoolsService-OUX7PWP3.js");
10258
+ const { setupInitialActivityLogger } = await import("./devtoolsService-NLJPFQBD.js");
10253
10259
  setupInitialActivityLogger(config);
10254
10260
  }
10255
10261
  const { stdout: workingStdout } = createWorkingStdio();
@@ -10422,14 +10428,14 @@ async function runNonInteractive({
10422
10428
  const text = parts?.map((part) => part.type === "text" ? part.text : "").join("");
10423
10429
  return text ? text : void 0;
10424
10430
  };
10425
- const emitFinalSuccessResult = () => {
10431
+ const emitFinalResult = (errorPayload) => {
10426
10432
  if (streamFormatter) {
10427
10433
  const metrics = uiTelemetryService.getMetrics();
10428
10434
  const durationMs = Date.now() - startTime;
10429
10435
  streamFormatter.emitEvent({
10430
10436
  type: JsonStreamEventType.RESULT,
10431
10437
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10432
- status: "success",
10438
+ status: errorPayload ? "error" : "success",
10433
10439
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
10434
10440
  });
10435
10441
  } else if (config.getOutputFormat() === OutputFormat.JSON) {
@@ -10440,7 +10446,7 @@ async function runNonInteractive({
10440
10446
  config.getSessionId(),
10441
10447
  responseText,
10442
10448
  stats,
10443
- void 0,
10449
+ errorPayload,
10444
10450
  warnings
10445
10451
  )
10446
10452
  );
@@ -10607,6 +10613,45 @@ async function runNonInteractive({
10607
10613
  break;
10608
10614
  }
10609
10615
  case "error": {
10616
+ if (event._meta?.["code"] === "INVALID_STREAM") {
10617
+ const errorTypeVal = event._meta?.["errorType"];
10618
+ const errorType = typeof errorTypeVal === "string" ? errorTypeVal : void 0;
10619
+ let errorMessage = event.message;
10620
+ if (errorType === "NO_RESPONSE_TEXT") {
10621
+ errorMessage = TRUE_EMPTY_RESPONSE_MESSAGE;
10622
+ } else if (errorType === "THINKING_ONLY_RESPONSE") {
10623
+ errorMessage = THINKING_ONLY_COMPRESS_SUGGESTION;
10624
+ } else if (errorType === "MAX_TOKENS_EXCEEDED") {
10625
+ errorMessage = MAX_TOKENS_EXCEEDED_SUGGESTION;
10626
+ } else if (errorType === "SAFETY_BLOCKED") {
10627
+ errorMessage = SAFETY_BLOCKED_MESSAGE;
10628
+ } else if (errorType === "RECITATION_BLOCKED") {
10629
+ errorMessage = RECITATION_BLOCKED_MESSAGE;
10630
+ } else if (errorType === "OTHER_BLOCKED") {
10631
+ errorMessage = OTHER_BLOCKED_MESSAGE;
10632
+ }
10633
+ if (streamFormatter) {
10634
+ streamFormatter.emitEvent({
10635
+ type: JsonStreamEventType.ERROR,
10636
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10637
+ severity: "error",
10638
+ message: errorMessage
10639
+ });
10640
+ } else if (config.getOutputFormat() === OutputFormat.TEXT) {
10641
+ process.stderr.write(`[ERROR] ${errorMessage}
10642
+ `);
10643
+ }
10644
+ uiTelemetryService.recordSemanticValidationError(
10645
+ geminiClient.getCurrentSequenceModel() ?? config.getModel(),
10646
+ errorType || "INVALID_STREAM"
10647
+ );
10648
+ emitFinalResult({
10649
+ type: "INVALID_STREAM",
10650
+ message: errorMessage
10651
+ });
10652
+ streamEnded = true;
10653
+ break;
10654
+ }
10610
10655
  if (event.fatal) {
10611
10656
  throw reconstructFatalError(event);
10612
10657
  }
@@ -10666,7 +10711,7 @@ async function runNonInteractive({
10666
10711
  process.stderr.write(`Agent execution stopped: ${stopMessage}
10667
10712
  `);
10668
10713
  }
10669
- emitFinalSuccessResult();
10714
+ emitFinalResult();
10670
10715
  streamEnded = true;
10671
10716
  break;
10672
10717
  }
@@ -10720,7 +10765,7 @@ async function runNonInteractive2(params) {
10720
10765
  }
10721
10766
  });
10722
10767
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10723
- const { setupInitialActivityLogger } = await import("./devtoolsService-OUX7PWP3.js");
10768
+ const { setupInitialActivityLogger } = await import("./devtoolsService-NLJPFQBD.js");
10724
10769
  setupInitialActivityLogger(config);
10725
10770
  }
10726
10771
  const { stdout: workingStdout } = createWorkingStdio();
@@ -10985,7 +11030,26 @@ async function runNonInteractive2(params) {
10985
11030
  }
10986
11031
  warnings.push(blockMessage);
10987
11032
  } else if (event.type === GeminiEventType.InvalidStream) {
10988
- invalidStreamError = "Invalid stream: The model returned an empty response or malformed tool call.";
11033
+ const eventValue = event.value;
11034
+ if (eventValue?.type === "NO_RESPONSE_TEXT") {
11035
+ invalidStreamError = TRUE_EMPTY_RESPONSE_MESSAGE;
11036
+ } else if (eventValue?.type === "THINKING_ONLY_RESPONSE") {
11037
+ invalidStreamError = THINKING_ONLY_COMPRESS_SUGGESTION;
11038
+ } else if (eventValue?.type === "MAX_TOKENS_EXCEEDED") {
11039
+ invalidStreamError = MAX_TOKENS_EXCEEDED_SUGGESTION;
11040
+ } else if (eventValue?.type === "SAFETY_BLOCKED") {
11041
+ invalidStreamError = SAFETY_BLOCKED_MESSAGE;
11042
+ } else if (eventValue?.type === "RECITATION_BLOCKED") {
11043
+ invalidStreamError = RECITATION_BLOCKED_MESSAGE;
11044
+ } else if (eventValue?.type === "OTHER_BLOCKED") {
11045
+ invalidStreamError = OTHER_BLOCKED_MESSAGE;
11046
+ } else {
11047
+ invalidStreamError = eventValue?.message?.trim() || "Invalid stream: The model returned an empty response or malformed tool call.";
11048
+ }
11049
+ uiTelemetryService.recordSemanticValidationError(
11050
+ geminiClient.getCurrentSequenceModel() ?? config.getModel(),
11051
+ eventValue?.type || "INVALID_STREAM"
11052
+ );
10989
11053
  if (streamFormatter) {
10990
11054
  streamFormatter.emitEvent({
10991
11055
  type: JsonStreamEventType.ERROR,
@@ -14101,7 +14165,7 @@ ${event.value.description}`;
14101
14165
  if (error instanceof RequestError) {
14102
14166
  throw error;
14103
14167
  }
14104
- if (error instanceof InvalidStreamError || error && typeof error === "object" && "type" in error && (error.type === "NO_RESPONSE_TEXT" || error.type === "NO_FINISH_REASON" || error.type === "MALFORMED_FUNCTION_CALL" || error.type === "UNEXPECTED_TOOL_CALL")) {
14168
+ if (error instanceof InvalidStreamError || error && typeof error === "object" && "type" in error && (error.type === "NO_RESPONSE_TEXT" || error.type === "NO_FINISH_REASON" || error.type === "MALFORMED_FUNCTION_CALL" || error.type === "UNEXPECTED_TOOL_CALL" || error.type === "MAX_TOKENS_EXCEEDED" || error.type === "SAFETY_BLOCKED" || error.type === "RECITATION_BLOCKED" || error.type === "OTHER_BLOCKED" || error.type === "THINKING_ONLY_RESPONSE")) {
14105
14169
  return {
14106
14170
  stopReason: "end_turn",
14107
14171
  _meta: {
@@ -15911,7 +15975,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
15911
15975
  }
15912
15976
  }
15913
15977
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
15914
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-OD2LO24X.js");
15978
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-HJK54NFF.js");
15915
15979
  await doStartUI(
15916
15980
  config,
15917
15981
  settings,
@@ -16120,7 +16184,7 @@ ${finalArgs[promptIndex + 1]}`;
16120
16184
  await config.storage.initialize();
16121
16185
  adminControlsListner.setConfig(config);
16122
16186
  if (config.isInteractive() && settings.merged.general.devtools) {
16123
- const { setupInitialActivityLogger } = await import("./devtoolsService-OUX7PWP3.js");
16187
+ const { setupInitialActivityLogger } = await import("./devtoolsService-NLJPFQBD.js");
16124
16188
  setupInitialActivityLogger(config);
16125
16189
  }
16126
16190
  registerTelemetryConfig(config);
@@ -16179,7 +16243,7 @@ ${finalArgs[promptIndex + 1]}`;
16179
16243
  const initAppHandle = startupProfiler.start("initialize_app");
16180
16244
  const initializationResult = await initializeApp(config, settings);
16181
16245
  initAppHandle?.end();
16182
- import("./liteRtServerManager-3SKK7MNE.js").then(({ LiteRtServerManager }) => {
16246
+ import("./liteRtServerManager-ZN3L6BPO.js").then(({ LiteRtServerManager }) => {
16183
16247
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
16184
16248
  if (!mergedGemma) return;
16185
16249
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;