@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-UEI42N7R.js";
5
+ } from "./chunk-EVNGSSTE.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-QSTUV3QH.js";
48
+ } from "./chunk-YF4RJFUM.js";
49
49
  import {
50
50
  exitCli,
51
51
  require_source
52
- } from "./chunk-4OVORMGE.js";
52
+ } from "./chunk-4SJPXUBO.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-IODN6H35.js";
90
+ } from "./chunk-KUOIDGSH.js";
91
91
  import {
92
92
  RELAUNCH_EXIT_CODE
93
- } from "./chunk-XH7QC2TB.js";
94
- import "./chunk-BDSSP5BZ.js";
93
+ } from "./chunk-TIUOC6Z4.js";
94
+ import "./chunk-LPTVZ4FJ.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-PKFZO3SN.js";
103
+ } from "./chunk-3QXIQPRB.js";
104
104
  import {
105
105
  ASK_USER_TOOL_NAME,
106
106
  AuthType,
@@ -132,21 +132,27 @@ import {
132
132
  JsonFormatter,
133
133
  LegacyAgentSession,
134
134
  Logger,
135
+ MAX_TOKENS_EXCEEDED_SUGGESTION,
135
136
  MCPServerConfig,
137
+ OTHER_BLOCKED_MESSAGE,
136
138
  PREVIEW_GEMINI_3_1_CUSTOM_TOOLS_MODEL,
137
139
  PREVIEW_GEMINI_3_1_MODEL,
138
140
  PREVIEW_GEMINI_FLASH_LITE_MODEL,
139
141
  PREVIEW_GEMINI_FLASH_MODEL,
140
142
  PREVIEW_GEMINI_MODEL,
141
143
  PolicyIntegrityManager,
144
+ RECITATION_BLOCKED_MESSAGE,
142
145
  REFERENCE_CONTENT_START,
143
146
  ROOT_SCHEDULER_ID,
144
147
  ReadManyFilesTool,
148
+ SAFETY_BLOCKED_MESSAGE,
145
149
  Scheduler,
146
150
  ShellExecutionService,
147
151
  SimpleExtensionLoader,
148
152
  Storage,
149
153
  StreamJsonFormatter,
154
+ THINKING_ONLY_COMPRESS_SUGGESTION,
155
+ TRUE_EMPTY_RESPONSE_MESSAGE,
150
156
  ToolCallEvent,
151
157
  ToolConfirmationOutcome,
152
158
  UserAccountManager,
@@ -231,7 +237,7 @@ import {
231
237
  updatePolicy,
232
238
  writeToStderr,
233
239
  writeToStdout
234
- } from "./chunk-27C6XFMY.js";
240
+ } from "./chunk-5Y7N3RFB.js";
235
241
  import "./chunk-664ZODQF.js";
236
242
  import "./chunk-IUUIT4SU.js";
237
243
  import "./chunk-TUDYL3X4.js";
@@ -7825,7 +7831,7 @@ async function loadSandboxConfig(settings, argv) {
7825
7831
  }
7826
7832
  const command2 = getSandboxCommand(sandboxValue);
7827
7833
  const packageJson = await getPackageJson(__dirname3);
7828
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.52.0-nightly.20260715.gfa975395b" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7834
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.53.0" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7829
7835
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7830
7836
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7831
7837
  }
@@ -10233,7 +10239,7 @@ async function runNonInteractive({
10233
10239
  }
10234
10240
  });
10235
10241
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10236
- const { setupInitialActivityLogger } = await import("./devtoolsService-QYDPHHFN.js");
10242
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ALVEJOWU.js");
10237
10243
  setupInitialActivityLogger(config);
10238
10244
  }
10239
10245
  const { stdout: workingStdout } = createWorkingStdio();
@@ -10406,14 +10412,14 @@ async function runNonInteractive({
10406
10412
  const text = parts?.map((part) => part.type === "text" ? part.text : "").join("");
10407
10413
  return text ? text : void 0;
10408
10414
  };
10409
- const emitFinalSuccessResult = () => {
10415
+ const emitFinalResult = (errorPayload) => {
10410
10416
  if (streamFormatter) {
10411
10417
  const metrics = uiTelemetryService.getMetrics();
10412
10418
  const durationMs = Date.now() - startTime;
10413
10419
  streamFormatter.emitEvent({
10414
10420
  type: "result" /* RESULT */,
10415
10421
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10416
- status: "success",
10422
+ status: errorPayload ? "error" : "success",
10417
10423
  stats: streamFormatter.convertToStreamStats(metrics, durationMs)
10418
10424
  });
10419
10425
  } else if (config.getOutputFormat() === "json" /* JSON */) {
@@ -10424,7 +10430,7 @@ async function runNonInteractive({
10424
10430
  config.getSessionId(),
10425
10431
  responseText,
10426
10432
  stats,
10427
- void 0,
10433
+ errorPayload,
10428
10434
  warnings
10429
10435
  )
10430
10436
  );
@@ -10591,6 +10597,45 @@ async function runNonInteractive({
10591
10597
  break;
10592
10598
  }
10593
10599
  case "error": {
10600
+ if (event._meta?.["code"] === "INVALID_STREAM") {
10601
+ const errorTypeVal = event._meta?.["errorType"];
10602
+ const errorType = typeof errorTypeVal === "string" ? errorTypeVal : void 0;
10603
+ let errorMessage = event.message;
10604
+ if (errorType === "NO_RESPONSE_TEXT") {
10605
+ errorMessage = TRUE_EMPTY_RESPONSE_MESSAGE;
10606
+ } else if (errorType === "THINKING_ONLY_RESPONSE") {
10607
+ errorMessage = THINKING_ONLY_COMPRESS_SUGGESTION;
10608
+ } else if (errorType === "MAX_TOKENS_EXCEEDED") {
10609
+ errorMessage = MAX_TOKENS_EXCEEDED_SUGGESTION;
10610
+ } else if (errorType === "SAFETY_BLOCKED") {
10611
+ errorMessage = SAFETY_BLOCKED_MESSAGE;
10612
+ } else if (errorType === "RECITATION_BLOCKED") {
10613
+ errorMessage = RECITATION_BLOCKED_MESSAGE;
10614
+ } else if (errorType === "OTHER_BLOCKED") {
10615
+ errorMessage = OTHER_BLOCKED_MESSAGE;
10616
+ }
10617
+ if (streamFormatter) {
10618
+ streamFormatter.emitEvent({
10619
+ type: "error" /* ERROR */,
10620
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
10621
+ severity: "error",
10622
+ message: errorMessage
10623
+ });
10624
+ } else if (config.getOutputFormat() === "text" /* TEXT */) {
10625
+ process.stderr.write(`[ERROR] ${errorMessage}
10626
+ `);
10627
+ }
10628
+ uiTelemetryService.recordSemanticValidationError(
10629
+ geminiClient.getCurrentSequenceModel() ?? config.getModel(),
10630
+ errorType || "INVALID_STREAM"
10631
+ );
10632
+ emitFinalResult({
10633
+ type: "INVALID_STREAM",
10634
+ message: errorMessage
10635
+ });
10636
+ streamEnded = true;
10637
+ break;
10638
+ }
10594
10639
  if (event.fatal) {
10595
10640
  throw reconstructFatalError(event);
10596
10641
  }
@@ -10650,7 +10695,7 @@ async function runNonInteractive({
10650
10695
  process.stderr.write(`Agent execution stopped: ${stopMessage}
10651
10696
  `);
10652
10697
  }
10653
- emitFinalSuccessResult();
10698
+ emitFinalResult();
10654
10699
  streamEnded = true;
10655
10700
  break;
10656
10701
  }
@@ -10704,7 +10749,7 @@ async function runNonInteractive2(params) {
10704
10749
  }
10705
10750
  });
10706
10751
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
10707
- const { setupInitialActivityLogger } = await import("./devtoolsService-QYDPHHFN.js");
10752
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ALVEJOWU.js");
10708
10753
  setupInitialActivityLogger(config);
10709
10754
  }
10710
10755
  const { stdout: workingStdout } = createWorkingStdio();
@@ -10969,7 +11014,26 @@ async function runNonInteractive2(params) {
10969
11014
  }
10970
11015
  warnings.push(blockMessage);
10971
11016
  } else if (event.type === "invalid_stream" /* InvalidStream */) {
10972
- invalidStreamError = "Invalid stream: The model returned an empty response or malformed tool call.";
11017
+ const eventValue = event.value;
11018
+ if (eventValue?.type === "NO_RESPONSE_TEXT") {
11019
+ invalidStreamError = TRUE_EMPTY_RESPONSE_MESSAGE;
11020
+ } else if (eventValue?.type === "THINKING_ONLY_RESPONSE") {
11021
+ invalidStreamError = THINKING_ONLY_COMPRESS_SUGGESTION;
11022
+ } else if (eventValue?.type === "MAX_TOKENS_EXCEEDED") {
11023
+ invalidStreamError = MAX_TOKENS_EXCEEDED_SUGGESTION;
11024
+ } else if (eventValue?.type === "SAFETY_BLOCKED") {
11025
+ invalidStreamError = SAFETY_BLOCKED_MESSAGE;
11026
+ } else if (eventValue?.type === "RECITATION_BLOCKED") {
11027
+ invalidStreamError = RECITATION_BLOCKED_MESSAGE;
11028
+ } else if (eventValue?.type === "OTHER_BLOCKED") {
11029
+ invalidStreamError = OTHER_BLOCKED_MESSAGE;
11030
+ } else {
11031
+ invalidStreamError = eventValue?.message?.trim() || "Invalid stream: The model returned an empty response or malformed tool call.";
11032
+ }
11033
+ uiTelemetryService.recordSemanticValidationError(
11034
+ geminiClient.getCurrentSequenceModel() ?? config.getModel(),
11035
+ eventValue?.type || "INVALID_STREAM"
11036
+ );
10973
11037
  if (streamFormatter) {
10974
11038
  streamFormatter.emitEvent({
10975
11039
  type: "error" /* ERROR */,
@@ -14085,7 +14149,7 @@ ${event.value.description}`;
14085
14149
  if (error instanceof RequestError) {
14086
14150
  throw error;
14087
14151
  }
14088
- 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")) {
14152
+ 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")) {
14089
14153
  return {
14090
14154
  stopReason: "end_turn",
14091
14155
  _meta: {
@@ -15895,7 +15959,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
15895
15959
  }
15896
15960
  }
15897
15961
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
15898
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-FS3OVPXQ.js");
15962
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-PIOEDBQZ.js");
15899
15963
  await doStartUI(
15900
15964
  config,
15901
15965
  settings,
@@ -16104,7 +16168,7 @@ ${finalArgs[promptIndex + 1]}`;
16104
16168
  await config.storage.initialize();
16105
16169
  adminControlsListner.setConfig(config);
16106
16170
  if (config.isInteractive() && settings.merged.general.devtools) {
16107
- const { setupInitialActivityLogger } = await import("./devtoolsService-QYDPHHFN.js");
16171
+ const { setupInitialActivityLogger } = await import("./devtoolsService-ALVEJOWU.js");
16108
16172
  setupInitialActivityLogger(config);
16109
16173
  }
16110
16174
  registerTelemetryConfig(config);
@@ -16163,7 +16227,7 @@ ${finalArgs[promptIndex + 1]}`;
16163
16227
  const initAppHandle = startupProfiler.start("initialize_app");
16164
16228
  const initializationResult = await initializeApp(config, settings);
16165
16229
  initAppHandle?.end();
16166
- import("./liteRtServerManager-T2Z3RLS3.js").then(({ LiteRtServerManager }) => {
16230
+ import("./liteRtServerManager-ULQCSZ6V.js").then(({ LiteRtServerManager }) => {
16167
16231
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
16168
16232
  if (!mergedGemma) return;
16169
16233
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;