@google/gemini-cli 0.63.0-preview.0 → 0.64.0-nightly.20261001.gc6bccb7ec

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 (67) hide show
  1. package/bundle/{chunk-EIMVJG2V.js → chunk-2AWGKUBT.js} +1 -1
  2. package/bundle/{chunk-GRSO6OI3.js → chunk-33M6KTJD.js} +11 -9
  3. package/bundle/{chunk-2J6RC447.js → chunk-3V7PFNJW.js} +3 -3
  4. package/bundle/{chunk-NWSCUKK3.js → chunk-5Q2IR4AT.js} +1512 -1317
  5. package/bundle/{chunk-RXHIISMM.js → chunk-5S3XVXG6.js} +1 -1
  6. package/bundle/{chunk-R6Q6D3UA.js → chunk-A7EL6FWX.js} +1 -1
  7. package/bundle/{chunk-UEOEM4H5.js → chunk-AMALQQ3Z.js} +3 -3
  8. package/bundle/{chunk-EWEUWTBB.js → chunk-CBYMGCHX.js} +75 -60
  9. package/bundle/{chunk-2NCBQURB.js → chunk-CFKLEVXK.js} +1 -1
  10. package/bundle/{chunk-RC6VJ6FT.js → chunk-DGM2IXGQ.js} +1 -1
  11. package/bundle/{chunk-NTWFJ2RF.js → chunk-EUQCH4QF.js} +2 -2
  12. package/bundle/{chunk-KCB54UJ5.js → chunk-FLYR6TVJ.js} +9279 -16064
  13. package/bundle/{chunk-H4WLRV6U.js → chunk-FQCPUDNE.js} +2 -2
  14. package/bundle/{chunk-BVDTRESW.js → chunk-FSELSFI5.js} +1 -1
  15. package/bundle/{chunk-5VYF5TVF.js → chunk-G4FAHQEH.js} +2 -2
  16. package/bundle/{chunk-Z5RCAIV5.js → chunk-I5GYMICM.js} +7 -5
  17. package/bundle/{chunk-JEUVKR2X.js → chunk-IGVQSZBB.js} +3 -3
  18. package/bundle/{chunk-HBZBBLAV.js → chunk-JMQIN5UZ.js} +1521 -1323
  19. package/bundle/{chunk-KPPDDNGJ.js → chunk-JW5YA5WN.js} +9 -8
  20. package/bundle/chunk-KTIX6VY2.js +17446 -0
  21. package/bundle/{chunk-SNGNFODQ.js → chunk-KUSXLIPR.js} +1 -1
  22. package/bundle/{chunk-ZDQYLJYN.js → chunk-KVZWFEJY.js} +1 -1
  23. package/bundle/{chunk-2P4ETAEG.js → chunk-LTM347XQ.js} +1 -1
  24. package/bundle/chunk-LXT3NLFW.js +118 -0
  25. package/bundle/chunk-PAWJR2VY.js +1571 -0
  26. package/bundle/chunk-RVS5CHWO.js +425 -0
  27. package/bundle/{chunk-B2C7BQ4Z.js → chunk-RW6IRAFG.js} +11 -9
  28. package/bundle/{chunk-CTL6DZSY.js → chunk-U4667HKR.js} +1 -1
  29. package/bundle/chunk-WTO5SKFR.js +400730 -0
  30. package/bundle/chunk-WXSWGEUJ.js +512 -0
  31. package/bundle/chunk-XKSEOGBW.js +154 -0
  32. package/bundle/chunk-ZG5IQP2R.js +102953 -0
  33. package/bundle/{cleanup-EX2L3L3E.js → cleanup-I7CTORMX.js} +2 -2
  34. package/bundle/{cleanup-IT7XR7KS.js → cleanup-MOFJ6BES.js} +2 -2
  35. package/bundle/{cleanup-WWLYKZIX.js → cleanup-OAR3IBTA.js} +2 -2
  36. package/bundle/cleanup-WFLHSVPH.js +32 -0
  37. package/bundle/{core-GAJB2LOX.js → core-VXMTLS6K.js} +1 -1
  38. package/bundle/{devtoolsService-TJPENQSW.js → devtoolsService-4QAJJ6WJ.js} +2 -2
  39. package/bundle/{devtoolsService-S4ZTRGJL.js → devtoolsService-54XKSYYW.js} +4 -3
  40. package/bundle/{devtoolsService-4YTFHHPN.js → devtoolsService-L6BPP3IA.js} +2 -2
  41. package/bundle/devtoolsService-LSDQLZ62.js +4359 -0
  42. package/bundle/{dist-MTMOCTIW.js → dist-BNMP57Q5.js} +1 -1
  43. package/bundle/{core-D5D4MF5H.js → dist-FJ7DKGAM.js} +1 -1
  44. package/bundle/dist-U5DFAJ4Y.js +2250 -0
  45. package/bundle/docs/changelogs/preview.md +54 -65
  46. package/bundle/{gemini-5T5BS7L7.js → gemini-L553JD26.js} +66 -95
  47. package/bundle/{gemini-FHORRYHM.js → gemini-LN35PXGR.js} +66 -95
  48. package/bundle/gemini-VZOPAMKQ.js +17834 -0
  49. package/bundle/{gemini-UQRS6TBE.js → gemini-W63I3AHM.js} +266 -279
  50. package/bundle/gemini.js +7 -7
  51. package/bundle/{interactiveCli-WOM6QZHM.js → interactiveCli-2JCDVYVC.js} +26 -23
  52. package/bundle/{interactiveCli-I5K7O5Z6.js → interactiveCli-KN6ETEWY.js} +26 -23
  53. package/bundle/{interactiveCli-5YNYZTMK.js → interactiveCli-N7HBJ434.js} +329 -307
  54. package/bundle/interactiveCli-TX7INBPE.js +34918 -0
  55. package/bundle/{liteRtServerManager-EH2L2UVH.js → liteRtServerManager-GIDPQRR4.js} +4 -4
  56. package/bundle/{liteRtServerManager-ZLIHBLZP.js → liteRtServerManager-NK3OA5CI.js} +4 -4
  57. package/bundle/{liteRtServerManager-3N5KI6YS.js → liteRtServerManager-NSDSBW7B.js} +4 -4
  58. package/bundle/liteRtServerManager-PKOODTU4.js +65 -0
  59. package/bundle/{oauth2-provider-TA2KRXWQ.js → oauth2-provider-DE3RVHTQ.js} +1 -1
  60. package/bundle/{oauth2-provider-5GFYTXFU.js → oauth2-provider-FDRYB63N.js} +38 -72
  61. package/bundle/{oauth2-provider-NGSH2JQK.js → oauth2-provider-KMACQ2PX.js} +1 -1
  62. package/bundle/oauth2-provider-UAZAD3AF.js +235 -0
  63. package/bundle/{start-M3IUNCYH.js → start-5X2H6QGN.js} +6 -6
  64. package/bundle/{start-MWDNIQUY.js → start-AMYT67DW.js} +6 -6
  65. package/bundle/{start-CWI6OP6N.js → start-QYGGE4KC.js} +6 -6
  66. package/bundle/start-WWUBZPNX.js +18 -0
  67. 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-UEOEM4H5.js";
5
+ } from "./chunk-3V7PFNJW.js";
6
6
  import {
7
7
  BuiltinCommandLoader,
8
8
  CommandService,
@@ -46,11 +46,11 @@ import {
46
46
  updateExtension,
47
47
  validateAuthMethod,
48
48
  validateContextFilePath
49
- } from "./chunk-EWEUWTBB.js";
49
+ } from "./chunk-RW6IRAFG.js";
50
50
  import {
51
51
  exitCli,
52
52
  require_source
53
- } from "./chunk-SNGNFODQ.js";
53
+ } from "./chunk-PAWJR2VY.js";
54
54
  import {
55
55
  appEvents
56
56
  } from "./chunk-5PS3AYFU.js";
@@ -88,11 +88,11 @@ import {
88
88
  resolveGemmaConfig,
89
89
  saveModelChange,
90
90
  stripAnsi
91
- } from "./chunk-RC6VJ6FT.js";
91
+ } from "./chunk-DGM2IXGQ.js";
92
92
  import {
93
93
  RELAUNCH_EXIT_CODE
94
- } from "./chunk-5VYF5TVF.js";
95
- import "./chunk-ZDQYLJYN.js";
94
+ } from "./chunk-FQCPUDNE.js";
95
+ import "./chunk-KVZWFEJY.js";
96
96
  import {
97
97
  cleanupCheckpoints,
98
98
  registerCleanup,
@@ -101,7 +101,7 @@ import {
101
101
  runExitCleanup,
102
102
  runSyncCleanup,
103
103
  setupSignalHandlers
104
- } from "./chunk-CTL6DZSY.js";
104
+ } from "./chunk-FSELSFI5.js";
105
105
  import {
106
106
  ASK_USER_TOOL_NAME,
107
107
  AuthType,
@@ -235,11 +235,12 @@ import {
235
235
  shouldEnterAlternateScreen,
236
236
  showMemory,
237
237
  startupProfiler,
238
+ tokenLimit,
238
239
  uiTelemetryService,
239
240
  updatePolicy,
240
241
  writeToStderr,
241
242
  writeToStdout
242
- } from "./chunk-KCB54UJ5.js";
243
+ } from "./chunk-JMQIN5UZ.js";
243
244
  import "./chunk-664ZODQF.js";
244
245
  import "./chunk-IUUIT4SU.js";
245
246
  import "./chunk-L6PII3GR.js";
@@ -7839,7 +7840,7 @@ async function loadSandboxConfig(settings, argv) {
7839
7840
  }
7840
7841
  const command2 = getSandboxCommand(sandboxValue);
7841
7842
  const packageJson = await getPackageJson(__dirname3);
7842
- const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.63.0-nightly.20260923.gf50ba8608" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7843
+ const image = process.env["GEMINI_SANDBOX_IMAGE"] ?? "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.64.0-nightly.20260929.gd75234cae" ?? customImage ?? packageJson?.config?.sandboxImageUri;
7843
7844
  const isNative = command2 === "windows-native" || command2 === "sandbox-exec" || command2 === "lxc";
7844
7845
  return command2 && (image || isNative) ? { enabled: true, allowedPaths, networkAccess, command: command2, image } : void 0;
7845
7846
  }
@@ -11510,7 +11511,7 @@ async function runNonInteractive({
11510
11511
  }
11511
11512
  });
11512
11513
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
11513
- const { setupInitialActivityLogger } = await import("./devtoolsService-S4ZTRGJL.js");
11514
+ const { setupInitialActivityLogger } = await import("./devtoolsService-L6BPP3IA.js");
11514
11515
  setupInitialActivityLogger(config);
11515
11516
  }
11516
11517
  const { stdout: workingStdout } = createWorkingStdio();
@@ -12020,7 +12021,7 @@ async function runNonInteractive2(params) {
12020
12021
  }
12021
12022
  });
12022
12023
  if (process.env["GEMINI_CLI_ACTIVITY_LOG_TARGET"]) {
12023
- const { setupInitialActivityLogger } = await import("./devtoolsService-S4ZTRGJL.js");
12024
+ const { setupInitialActivityLogger } = await import("./devtoolsService-L6BPP3IA.js");
12024
12025
  setupInitialActivityLogger(config);
12025
12026
  }
12026
12027
  const { stdout: workingStdout } = createWorkingStdio();
@@ -15294,6 +15295,11 @@ ${thought.description}`;
15294
15295
  if (handled) {
15295
15296
  return {
15296
15297
  stopReason: "end_turn",
15298
+ usage: {
15299
+ inputTokens: 0,
15300
+ outputTokens: 0,
15301
+ totalTokens: 0
15302
+ },
15297
15303
  _meta: {
15298
15304
  quota: {
15299
15305
  token_count: { input_tokens: 0, output_tokens: 0 },
@@ -15305,33 +15311,43 @@ ${thought.description}`;
15305
15311
  }
15306
15312
  let totalInputTokens = 0;
15307
15313
  let totalOutputTokens = 0;
15314
+ let totalCachedTokens = 0;
15315
+ let totalThoughtTokens = 0;
15308
15316
  const modelUsageMap = /* @__PURE__ */ new Map();
15317
+ const buildPromptResponse = (stopReason) => ({
15318
+ stopReason,
15319
+ usage: {
15320
+ inputTokens: totalInputTokens,
15321
+ outputTokens: totalOutputTokens,
15322
+ cachedReadTokens: totalCachedTokens || void 0,
15323
+ thoughtTokens: totalThoughtTokens || void 0,
15324
+ totalTokens: totalInputTokens + totalOutputTokens
15325
+ },
15326
+ _meta: {
15327
+ quota: {
15328
+ token_count: {
15329
+ input_tokens: totalInputTokens,
15330
+ output_tokens: totalOutputTokens
15331
+ },
15332
+ model_usage: Array.from(modelUsageMap.entries()).map(
15333
+ ([modelName, counts]) => ({
15334
+ model: modelName,
15335
+ token_count: {
15336
+ input_tokens: counts.input,
15337
+ output_tokens: counts.output
15338
+ }
15339
+ })
15340
+ )
15341
+ }
15342
+ }
15343
+ });
15309
15344
  let currentParts = parts;
15310
15345
  let turnCount = 0;
15311
15346
  const maxTurns = this.context.config.getMaxSessionTurns();
15312
15347
  while (true) {
15313
15348
  turnCount++;
15314
15349
  if (maxTurns >= 0 && turnCount > maxTurns) {
15315
- return {
15316
- stopReason: "max_turn_requests",
15317
- _meta: {
15318
- quota: {
15319
- token_count: {
15320
- input_tokens: totalInputTokens,
15321
- output_tokens: totalOutputTokens
15322
- },
15323
- model_usage: Array.from(modelUsageMap.entries()).map(
15324
- ([modelName, counts]) => ({
15325
- model: modelName,
15326
- token_count: {
15327
- input_tokens: counts.input,
15328
- output_tokens: counts.output
15329
- }
15330
- })
15331
- )
15332
- }
15333
- }
15334
- };
15350
+ return buildPromptResponse("max_turn_requests");
15335
15351
  }
15336
15352
  if (pendingSend.signal.aborted) {
15337
15353
  return { stopReason: "cancelled" };
@@ -15341,6 +15357,8 @@ ${thought.description}`;
15341
15357
  let turnModelId = this.context.config.getModel();
15342
15358
  let turnInputTokens = 0;
15343
15359
  let turnOutputTokens = 0;
15360
+ let turnCachedTokens = 0;
15361
+ let turnThoughtTokens = 0;
15344
15362
  try {
15345
15363
  const responseStream = this.context.geminiClient.sendMessageStream(
15346
15364
  currentParts,
@@ -15380,6 +15398,15 @@ ${event.value.description}`;
15380
15398
  if (usage2) {
15381
15399
  turnInputTokens = usage2.promptTokenCount ?? turnInputTokens;
15382
15400
  turnOutputTokens = usage2.candidatesTokenCount ?? turnOutputTokens;
15401
+ turnCachedTokens = usage2.cachedContentTokenCount ?? turnCachedTokens;
15402
+ turnThoughtTokens = usage2.thoughtsTokenCount ?? turnThoughtTokens;
15403
+ await this.sendUpdate({
15404
+ sessionUpdate: "usage_update",
15405
+ used: turnInputTokens + turnOutputTokens,
15406
+ size: tokenLimit(
15407
+ turnModelId || this.context.config.getModel()
15408
+ )
15409
+ });
15383
15410
  }
15384
15411
  break;
15385
15412
  }
@@ -15423,26 +15450,7 @@ ${event.value.description}`;
15423
15450
  throw error;
15424
15451
  }
15425
15452
  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")) {
15426
- return {
15427
- stopReason: "end_turn",
15428
- _meta: {
15429
- quota: {
15430
- token_count: {
15431
- input_tokens: totalInputTokens,
15432
- output_tokens: totalOutputTokens
15433
- },
15434
- model_usage: Array.from(modelUsageMap.entries()).map(
15435
- ([modelName, counts]) => ({
15436
- model: modelName,
15437
- token_count: {
15438
- input_tokens: counts.input,
15439
- output_tokens: counts.output
15440
- }
15441
- })
15442
- )
15443
- }
15444
- }
15445
- };
15453
+ return buildPromptResponse("end_turn");
15446
15454
  }
15447
15455
  throw new RequestError(
15448
15456
  getErrorStatus(error) || 500,
@@ -15451,6 +15459,8 @@ ${event.value.description}`;
15451
15459
  }
15452
15460
  totalInputTokens += turnInputTokens;
15453
15461
  totalOutputTokens += turnOutputTokens;
15462
+ totalCachedTokens += turnCachedTokens;
15463
+ totalThoughtTokens += turnThoughtTokens;
15454
15464
  if (turnInputTokens > 0 || turnOutputTokens > 0) {
15455
15465
  const existing = modelUsageMap.get(turnModelId) ?? {
15456
15466
  input: 0,
@@ -15461,26 +15471,7 @@ ${event.value.description}`;
15461
15471
  modelUsageMap.set(turnModelId, existing);
15462
15472
  }
15463
15473
  if (stopReason !== "end_turn") {
15464
- return {
15465
- stopReason,
15466
- _meta: {
15467
- quota: {
15468
- token_count: {
15469
- input_tokens: totalInputTokens,
15470
- output_tokens: totalOutputTokens
15471
- },
15472
- model_usage: Array.from(modelUsageMap.entries()).map(
15473
- ([modelName, counts]) => ({
15474
- model: modelName,
15475
- token_count: {
15476
- input_tokens: counts.input,
15477
- output_tokens: counts.output
15478
- }
15479
- })
15480
- )
15481
- }
15482
- }
15483
- };
15474
+ return buildPromptResponse(stopReason);
15484
15475
  }
15485
15476
  if (toolCallRequests.length === 0) {
15486
15477
  break;
@@ -15497,27 +15488,7 @@ ${event.value.description}`;
15497
15488
  }
15498
15489
  currentParts = toolResponseParts;
15499
15490
  }
15500
- const modelUsageArray = Array.from(modelUsageMap.entries()).map(
15501
- ([modelName, counts]) => ({
15502
- model: modelName,
15503
- token_count: {
15504
- input_tokens: counts.input,
15505
- output_tokens: counts.output
15506
- }
15507
- })
15508
- );
15509
- return {
15510
- stopReason: "end_turn",
15511
- _meta: {
15512
- quota: {
15513
- token_count: {
15514
- input_tokens: totalInputTokens,
15515
- output_tokens: totalOutputTokens
15516
- },
15517
- model_usage: modelUsageArray
15518
- }
15519
- }
15520
- };
15491
+ return buildPromptResponse("end_turn");
15521
15492
  }
15522
15493
  async handleCommand(commandText, parts) {
15523
15494
  const gitService = await this.context.config.getGitService();
@@ -17331,7 +17302,7 @@ async function resolveSessionId(resumeArg, sessionIdArg, sessionFileArg) {
17331
17302
  }
17332
17303
  }
17333
17304
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), resumedSessionData, initializationResult) {
17334
- const { startInteractiveUI: doStartUI } = await import("./interactiveCli-WOM6QZHM.js");
17305
+ const { startInteractiveUI: doStartUI } = await import("./interactiveCli-2JCDVYVC.js");
17335
17306
  await doStartUI(
17336
17307
  config,
17337
17308
  settings,
@@ -17540,7 +17511,7 @@ ${finalArgs[promptIndex + 1]}`;
17540
17511
  await config.storage.initialize();
17541
17512
  adminControlsListner.setConfig(config);
17542
17513
  if (config.isInteractive() && settings.merged.general.devtools) {
17543
- const { setupInitialActivityLogger } = await import("./devtoolsService-S4ZTRGJL.js");
17514
+ const { setupInitialActivityLogger } = await import("./devtoolsService-L6BPP3IA.js");
17544
17515
  setupInitialActivityLogger(config);
17545
17516
  }
17546
17517
  registerTelemetryConfig(config);
@@ -17599,7 +17570,7 @@ ${finalArgs[promptIndex + 1]}`;
17599
17570
  const initAppHandle = startupProfiler.start("initialize_app");
17600
17571
  const initializationResult = await initializeApp(config, settings);
17601
17572
  initAppHandle?.end();
17602
- import("./liteRtServerManager-EH2L2UVH.js").then(({ LiteRtServerManager }) => {
17573
+ import("./liteRtServerManager-NSDSBW7B.js").then(({ LiteRtServerManager }) => {
17603
17574
  const mergedGemma = settings.merged.experimental?.gemmaModelRouter;
17604
17575
  if (!mergedGemma) return;
17605
17576
  const userGemma = settings.forScope("User" /* User */).settings.experimental?.gemmaModelRouter;