@google/gemini-cli 0.54.0 → 0.54.4

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-G7VQ6O6G.js → chunk-4YSWDUQZ.js} +1 -1
  2. package/bundle/{chunk-IM5WJKYT.js → chunk-5NT754WV.js} +1 -1
  3. package/bundle/{chunk-GOQJOV4P.js → chunk-6SBXH4D5.js} +1 -1
  4. package/bundle/{chunk-UTXCUPDT.js → chunk-7ELLCO6U.js} +2 -2
  5. package/bundle/{chunk-MOGTJC2T.js → chunk-7SPI3KN6.js} +1 -1
  6. package/bundle/{chunk-BBNFLOXC.js → chunk-B5CTWZND.js} +1 -1
  7. package/bundle/{chunk-UW4NSSB6.js → chunk-BCKLMRS4.js} +3 -3
  8. package/bundle/{chunk-F6IU45OZ.js → chunk-BS6BSLZD.js} +98 -8
  9. package/bundle/{chunk-VIQEWLM4.js → chunk-D7ZXPN6G.js} +8 -5
  10. package/bundle/{chunk-WJKZRJIC.js → chunk-DFZESNXJ.js} +3 -3
  11. package/bundle/chunk-DJWQKPM3.js +1571 -0
  12. package/bundle/{chunk-NZ6P6XKP.js → chunk-FNQ3CHG6.js} +2 -2
  13. package/bundle/{chunk-OYZ2XVON.js → chunk-GHCTXZXJ.js} +3 -3
  14. package/bundle/{chunk-43HYOV6F.js → chunk-HX3M7TQG.js} +1 -1
  15. package/bundle/{chunk-5SMD2SLQ.js → chunk-IJK6RPHE.js} +2 -2
  16. package/bundle/{chunk-MZBH35ZS.js → chunk-IX4IHGFA.js} +1 -1
  17. package/bundle/{chunk-SQWRALPF.js → chunk-K6DV6ZQJ.js} +9 -8
  18. package/bundle/chunk-K77W7OAI.js +398 -0
  19. package/bundle/{chunk-SHZORH3T.js → chunk-NWWVQCEM.js} +1 -1
  20. package/bundle/{chunk-JPCDQXHB.js → chunk-PGCIAGXU.js} +1 -1
  21. package/bundle/{chunk-HS7THREL.js → chunk-QXLHAGLO.js} +104 -8
  22. package/bundle/{chunk-2MRUXBJ5.js → chunk-RJSQB7MD.js} +7 -7
  23. package/bundle/{chunk-RHINAWEP.js → chunk-TOGB2OXA.js} +67 -54
  24. package/bundle/chunk-TXL73KVK.js +17332 -0
  25. package/bundle/{chunk-YYWWE5GW.js → chunk-TYAF55F7.js} +7720 -14267
  26. package/bundle/chunk-UWHDOUIM.js +154 -0
  27. package/bundle/{chunk-TZAOURRV.js → chunk-WFY6AHA3.js} +1 -1
  28. package/bundle/chunk-YFMY6TMN.js +118 -0
  29. package/bundle/chunk-YMKYUNCI.js +397175 -0
  30. package/bundle/chunk-YOVSXRBK.js +512 -0
  31. package/bundle/{chunk-LH73BY77.js → chunk-ZJ6RWJBB.js} +7 -7
  32. package/bundle/chunk-ZT7DTH6P.js +102505 -0
  33. package/bundle/{cleanup-5UYKVLIF.js → cleanup-ID7KOVH6.js} +2 -2
  34. package/bundle/{cleanup-6OO5MA6W.js → cleanup-IQDM3OQH.js} +2 -2
  35. package/bundle/{cleanup-ODOGWYRM.js → cleanup-VC5QYANG.js} +2 -2
  36. package/bundle/cleanup-XKLXHTQY.js +32 -0
  37. package/bundle/{core-S5B3NEKC.js → core-L2IMO77B.js} +3 -1
  38. package/bundle/{devtoolsService-FUTPYP6V.js → devtoolsService-A4MVL3QX.js} +2 -2
  39. package/bundle/{devtoolsService-YWNTGRUE.js → devtoolsService-FCZAZ7OL.js} +2 -2
  40. package/bundle/{devtoolsService-NZQZUVCI.js → devtoolsService-MTKVT52L.js} +4 -3
  41. package/bundle/devtoolsService-OFTYP7HA.js +4359 -0
  42. package/bundle/{dist-DB6LWOKZ.js → dist-IRKAN2JJ.js} +3 -1
  43. package/bundle/{core-JL633Z4N.js → dist-OMDZCEPS.js} +3 -1
  44. package/bundle/dist-UPFVI32N.js +2172 -0
  45. package/bundle/{gemini-D3BRVDVJ.js → gemini-A2H7FXLW.js} +14 -14
  46. package/bundle/{gemini-AQASGK5V.js → gemini-ANKKRIYC.js} +214 -198
  47. package/bundle/{gemini-PPNY5YY6.js → gemini-RXM642S5.js} +14 -14
  48. package/bundle/gemini-TQ4IKPW2.js +16491 -0
  49. package/bundle/gemini.js +7 -7
  50. package/bundle/{interactiveCli-P7QQLIDS.js → interactiveCli-DCR23VNH.js} +21 -15
  51. package/bundle/{interactiveCli-CXCZMXKQ.js → interactiveCli-LU4ELYJR.js} +21 -15
  52. package/bundle/{interactiveCli-RU7LCVXL.js → interactiveCli-MMQJKAMI.js} +328 -303
  53. package/bundle/interactiveCli-XFHD4NND.js +34912 -0
  54. package/bundle/{liteRtServerManager-ISKYY742.js → liteRtServerManager-3XISBZSR.js} +4 -4
  55. package/bundle/{liteRtServerManager-MPPOFOTR.js → liteRtServerManager-AW53PI2D.js} +4 -4
  56. package/bundle/{liteRtServerManager-FIVLVXQJ.js → liteRtServerManager-D6QKXOSW.js} +4 -4
  57. package/bundle/liteRtServerManager-PKONORB7.js +65 -0
  58. package/bundle/{oauth2-provider-G6DF4NEU.js → oauth2-provider-7KVPKQ4C.js} +1 -1
  59. package/bundle/{oauth2-provider-DOIL6PEC.js → oauth2-provider-CU4P6HIT.js} +38 -72
  60. package/bundle/{oauth2-provider-XR5UQYQV.js → oauth2-provider-MRWRX5R2.js} +1 -1
  61. package/bundle/oauth2-provider-NQD4RC5Z.js +235 -0
  62. package/bundle/{start-S77W5RNK.js → start-7U2NBBF2.js} +6 -6
  63. package/bundle/{start-YWT3TSZW.js → start-HBTVIGJK.js} +6 -6
  64. package/bundle/{start-AJW7OVPU.js → start-JQFBJ44Q.js} +6 -6
  65. package/bundle/start-KLUMUSR7.js +18 -0
  66. package/package.json +1 -1
@@ -282784,8 +282784,8 @@ function isValidToolName(name3, options = {}) {
282784
282784
  }
282785
282785
 
282786
282786
  // packages/core/src/generated/git-commit.ts
282787
- var GIT_COMMIT_INFO = "a81db2768";
282788
- var CLI_VERSION = "0.54.0";
282787
+ var GIT_COMMIT_INFO = "10944dcc4";
282788
+ var CLI_VERSION = "0.54.1";
282789
282789
 
282790
282790
  // packages/core/src/ide/detect-ide.ts
282791
282791
  var IDE_DEFINITIONS = {
@@ -285791,7 +285791,12 @@ var ChatRecordingService = class {
285791
285791
  }
285792
285792
  this.updateMetadata({ sessionId: this.sessionId });
285793
285793
  } else {
285794
- throw new Error("Failed to load resumed session data from file");
285794
+ debugLogger.warn(
285795
+ "Failed to reload resumed session data from file; falling back to the in-memory conversation."
285796
+ );
285797
+ this.cachedConversation = resumedSessionData.conversation;
285798
+ this.projectHash = this.cachedConversation.projectHash;
285799
+ this.rewriteConversationFile(this.cachedConversation);
285795
285800
  }
285796
285801
  } else {
285797
285802
  this.sessionId = this.context.promptId;
@@ -285872,6 +285877,61 @@ var ChatRecordingService = class {
285872
285877
  }
285873
285878
  }
285874
285879
  }
285880
+ /**
285881
+ * Rewrites the session file from an in-memory record. Any existing
285882
+ * (unreadable) file is preserved alongside rather than destroyed, and the
285883
+ * new file is written atomically (temp file + rename).
285884
+ */
285885
+ rewriteConversationFile(conversation) {
285886
+ if (!this.conversationFile) return;
285887
+ if (this.conversationFile.endsWith(".json")) {
285888
+ this.conversationFile = this.conversationFile + "l";
285889
+ }
285890
+ const { messages, memoryScratchpad, ...metadata2 } = conversation;
285891
+ const lines = [JSON.stringify(metadata2)];
285892
+ for (const msg of messages) {
285893
+ lines.push(JSON.stringify(msg));
285894
+ }
285895
+ if (memoryScratchpad) {
285896
+ lines.push(JSON.stringify({ $set: { memoryScratchpad } }));
285897
+ }
285898
+ const content = lines.join("\n") + "\n";
285899
+ try {
285900
+ fs30.mkdirSync(path27.dirname(this.conversationFile), { recursive: true });
285901
+ if (fs30.existsSync(this.conversationFile)) {
285902
+ const backup = `${this.conversationFile}.unreadable-${Date.now()}`;
285903
+ try {
285904
+ fs30.renameSync(this.conversationFile, backup);
285905
+ debugLogger.warn(
285906
+ `Preserved the unreadable session file at ${backup}.`
285907
+ );
285908
+ } catch (backupError) {
285909
+ debugLogger.error(
285910
+ "Failed to preserve the unreadable session file.",
285911
+ backupError
285912
+ );
285913
+ }
285914
+ }
285915
+ const tempFile = `${this.conversationFile}.tmp-${process.pid}`;
285916
+ try {
285917
+ fs30.writeFileSync(tempFile, content);
285918
+ fs30.renameSync(tempFile, this.conversationFile);
285919
+ } catch (error40) {
285920
+ try {
285921
+ fs30.unlinkSync(tempFile);
285922
+ } catch {
285923
+ }
285924
+ throw error40;
285925
+ }
285926
+ } catch (error40) {
285927
+ if (isNodeError(error40) && error40.code === "ENOSPC") {
285928
+ this.conversationFile = null;
285929
+ debugLogger.warn(ENOSPC_WARNING_MESSAGE);
285930
+ } else {
285931
+ throw error40;
285932
+ }
285933
+ }
285934
+ }
285875
285935
  updateMetadata(updates) {
285876
285936
  if (!this.cachedConversation) return;
285877
285937
  Object.assign(this.cachedConversation, updates);
@@ -306307,7 +306367,7 @@ function getVersion() {
306307
306367
  }
306308
306368
  versionPromise = (async () => {
306309
306369
  const pkgJson = await getPackageJson(__dirname4);
306310
- return "0.54.0";
306370
+ return "0.54.1";
306311
306371
  })();
306312
306372
  return versionPromise;
306313
306373
  }
@@ -332516,6 +332576,7 @@ var MID_STREAM_RETRY_OPTIONS = {
332516
332576
  useExponentialBackoff: true
332517
332577
  };
332518
332578
  var SYNTHETIC_THOUGHT_SIGNATURE2 = "skip_thought_signature_validator";
332579
+ var INTERRUPTED_RESPONSE_PLACEHOLDER = "[The previous response was interrupted before it completed.]";
332519
332580
  function isIndexedPart(part) {
332520
332581
  return "callIndex" in part;
332521
332582
  }
@@ -332699,6 +332760,9 @@ var GeminiChat = class {
332699
332760
  this.sendPromise = streamDonePromise;
332700
332761
  let userContent = createUserContent(message);
332701
332762
  const isOriginalFunctionResponse = isFunctionResponse(userContent);
332763
+ if (!isOriginalFunctionResponse) {
332764
+ this.closeUnansweredToolResponseTurn();
332765
+ }
332702
332766
  const { model } = this.context.config.modelConfigService.getResolvedConfig(modelConfigKey);
332703
332767
  const isContextManagementEnabled = this.context.config.isContextManagementEnabled();
332704
332768
  if (!isOriginalFunctionResponse) {
@@ -332904,6 +332968,24 @@ var GeminiChat = class {
332904
332968
  };
332905
332969
  return streamWithRetries.call(this);
332906
332970
  }
332971
+ /**
332972
+ * Appends a closing model turn when history ends with an unanswered tool
332973
+ * response, so the next user message stays a turn of its own.
332974
+ */
332975
+ closeUnansweredToolResponseTurn() {
332976
+ const turns = this.agentHistory.get();
332977
+ const last2 = turns[turns.length - 1];
332978
+ if (last2?.content.role !== "user" || !last2.content.parts?.some((part) => !!part.functionResponse)) {
332979
+ return;
332980
+ }
332981
+ this.agentHistory.push({
332982
+ id: randomUUID6(),
332983
+ content: {
332984
+ role: "model",
332985
+ parts: [{ text: INTERRUPTED_RESPONSE_PLACEHOLDER }]
332986
+ }
332987
+ });
332988
+ }
332907
332989
  extractBinaryInjections(parts2) {
332908
332990
  const binaryParts = [];
332909
332991
  if (parts2) {
@@ -333628,11 +333710,24 @@ function stripThoughts2(history) {
333628
333710
  const hasThought = turn.content.parts.some((p) => p && p.thought);
333629
333711
  if (!hasThought) return turn;
333630
333712
  const nonThoughtParts = turn.content.parts.filter((p) => p && !p.thought);
333713
+ let patchedFirstCall = false;
333714
+ const finalParts = turn.content.role === "model" ? nonThoughtParts.map((p) => {
333715
+ if (!patchedFirstCall && p.functionCall) {
333716
+ patchedFirstCall = true;
333717
+ if (!p.thoughtSignature) {
333718
+ return {
333719
+ ...p,
333720
+ thoughtSignature: SYNTHETIC_THOUGHT_SIGNATURE2
333721
+ };
333722
+ }
333723
+ }
333724
+ return p;
333725
+ }) : nonThoughtParts;
333631
333726
  return {
333632
333727
  ...turn,
333633
333728
  content: {
333634
333729
  ...turn.content,
333635
- parts: nonThoughtParts
333730
+ parts: finalParts
333636
333731
  }
333637
333732
  };
333638
333733
  }).filter((turn) => !turn.content.parts || turn.content.parts.length > 0);
@@ -341074,7 +341169,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
341074
341169
  return provider;
341075
341170
  }
341076
341171
  case "oauth2": {
341077
- const { OAuth2AuthProvider } = await import("./oauth2-provider-XR5UQYQV.js");
341172
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-MRWRX5R2.js");
341078
341173
  const provider = new OAuth2AuthProvider(
341079
341174
  authConfig,
341080
341175
  options.agentName ?? "unknown",
@@ -398387,7 +398482,7 @@ var validateSerializable = (newContents) => {
398387
398482
  };
398388
398483
 
398389
398484
  // node_modules/execa/lib/io/output-sync.js
398390
- import { writeFileSync as writeFileSync4, appendFileSync as appendFileSync4 } from "node:fs";
398485
+ import { writeFileSync as writeFileSync5, appendFileSync as appendFileSync4 } from "node:fs";
398391
398486
 
398392
398487
  // node_modules/execa/lib/verbose/output.js
398393
398488
  var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type: type2, value }) => type2 === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type: type2 }) => TRANSFORM_TYPES.has(type2)));
@@ -398514,7 +398609,7 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
398514
398609
  appendFileSync4(path113, serializedResult);
398515
398610
  } else {
398516
398611
  outputFiles.add(pathString);
398517
- writeFileSync4(path113, serializedResult);
398612
+ writeFileSync5(path113, serializedResult);
398518
398613
  }
398519
398614
  }
398520
398615
  };
@@ -402753,6 +402848,7 @@ export {
402753
402848
  isCompletedAskUserTool,
402754
402849
  StreamEventType,
402755
402850
  SYNTHETIC_THOUGHT_SIGNATURE2 as SYNTHETIC_THOUGHT_SIGNATURE,
402851
+ INTERRUPTED_RESPONSE_PLACEHOLDER,
402756
402852
  isValidNonThoughtTextPart,
402757
402853
  InvalidStreamError,
402758
402854
  AgentExecutionStoppedError,
@@ -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-G7VQ6O6G.js";
5
+ } from "./chunk-DJWQKPM3.js";
6
6
  import {
7
7
  AppEvent,
8
8
  appEvents
@@ -59,14 +59,14 @@ import {
59
59
  stripUnsafeCharacters,
60
60
  toCodePoints,
61
61
  validateCustomTheme
62
- } from "./chunk-GOQJOV4P.js";
62
+ } from "./chunk-6SBXH4D5.js";
63
63
  import {
64
64
  isDevelopment
65
- } from "./chunk-5SMD2SLQ.js";
65
+ } from "./chunk-7ELLCO6U.js";
66
66
  import {
67
67
  emptyIcon,
68
68
  require_react
69
- } from "./chunk-MZBH35ZS.js";
69
+ } from "./chunk-K6DV6ZQJ.js";
70
70
  import {
71
71
  ALL_EDITORS,
72
72
  ApprovalMode,
@@ -243,7 +243,7 @@ import {
243
243
  tokenLimit,
244
244
  uiTelemetryService,
245
245
  unescapePath
246
- } from "./chunk-F6IU45OZ.js";
246
+ } from "./chunk-TYAF55F7.js";
247
247
  import {
248
248
  require_src
249
249
  } from "./chunk-TUDYL3X4.js";
@@ -77176,7 +77176,7 @@ var authCommand = {
77176
77176
  import process29 from "node:process";
77177
77177
 
77178
77178
  // packages/cli/src/generated/git-commit.ts
77179
- var GIT_COMMIT_INFO = "a74b483d1";
77179
+ var GIT_COMMIT_INFO = "983bbb89d";
77180
77180
 
77181
77181
  // packages/cli/src/ui/utils/historyExportUtils.ts
77182
77182
  import * as fsPromises from "node:fs/promises";
@@ -82957,7 +82957,7 @@ Use /mcp auth <server-name> to authenticate.`
82957
82957
  type: "info",
82958
82958
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
82959
82959
  });
82960
- const { MCPOAuthProvider } = await import("./dist-DB6LWOKZ.js");
82960
+ const { MCPOAuthProvider } = await import("./dist-OMDZCEPS.js");
82961
82961
  let oauthConfig = server.oauth;
82962
82962
  if (!oauthConfig) {
82963
82963
  oauthConfig = { enabled: false };