@google/gemini-cli 0.53.0-preview.0 → 0.54.0-nightly.20260726.g3818efbbf

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-5RDOS7UZ.js → chunk-2VCRWD5A.js} +105 -69
  2. package/bundle/{chunk-PVCJCQWY.js → chunk-4DF43WY7.js} +1 -1
  3. package/bundle/{chunk-7VUO7T2C.js → chunk-5IDNNCKI.js} +3 -3
  4. package/bundle/{chunk-SLQKIE73.js → chunk-6EXP7MNC.js} +1 -1
  5. package/bundle/{chunk-QSTUV3QH.js → chunk-6FGJ26XP.js} +7 -7
  6. package/bundle/{chunk-XH7QC2TB.js → chunk-6FQUF3NB.js} +2 -2
  7. package/bundle/{chunk-UEI42N7R.js → chunk-C52C3QZP.js} +3 -3
  8. package/bundle/{chunk-HF533LET.js → chunk-CP4PCA5K.js} +7699 -14271
  9. package/bundle/{chunk-HVYOZEAP.js → chunk-DJN5ASV2.js} +3 -3
  10. package/bundle/{chunk-BX6DTJOD.js → chunk-DLH2UGEO.js} +1 -1
  11. package/bundle/{chunk-LUM47MYE.js → chunk-DZDRGXE7.js} +1 -1
  12. package/bundle/chunk-F6U6G4L3.js +118 -0
  13. package/bundle/{chunk-6AD4A2WF.js → chunk-GKMUOHQH.js} +8 -5
  14. package/bundle/{chunk-PLMRBJEA.js → chunk-HG5ARHEH.js} +2 -2
  15. package/bundle/{chunk-27C6XFMY.js → chunk-ISVXSEBZ.js} +105 -69
  16. package/bundle/{chunk-PKFZO3SN.js → chunk-JFK64ABJ.js} +1 -1
  17. package/bundle/{chunk-BRZT2CQU.js → chunk-MHTDGIIL.js} +1 -1
  18. package/bundle/{chunk-CTNBR234.js → chunk-NNV4Z6XR.js} +2 -2
  19. package/bundle/{chunk-IODN6H35.js → chunk-NPRNIWWX.js} +1 -1
  20. package/bundle/{chunk-GHVD6PXK.js → chunk-OC4O5R3B.js} +9 -8
  21. package/bundle/chunk-OEJGR4OM.js +396934 -0
  22. package/bundle/{chunk-4OVORMGE.js → chunk-PHD2HIVW.js} +1 -1
  23. package/bundle/{chunk-BDSSP5BZ.js → chunk-QG7OFP4D.js} +1 -1
  24. package/bundle/{chunk-UJVAPQ7V.js → chunk-QGDYKVWX.js} +1 -1
  25. package/bundle/chunk-RVYNXMAI.js +154 -0
  26. package/bundle/chunk-SUGVZSZP.js +512 -0
  27. package/bundle/{chunk-SXKIOLLX.js → chunk-TIAQUEGU.js} +7 -7
  28. package/bundle/chunk-TUTBB2EI.js +17332 -0
  29. package/bundle/{chunk-WVDR5L2V.js → chunk-UFVHQWHK.js} +67 -54
  30. package/bundle/chunk-XUMLHXHF.js +102505 -0
  31. package/bundle/chunk-Y76OKNPF.js +1571 -0
  32. package/bundle/chunk-YONEX6IX.js +398 -0
  33. package/bundle/{cleanup-4FVUYQ7H.js → cleanup-CJUVYQV5.js} +2 -2
  34. package/bundle/{cleanup-XETKRH7X.js → cleanup-IA6XG6SC.js} +2 -2
  35. package/bundle/{cleanup-ZR34H2GU.js → cleanup-QIBIT7JQ.js} +2 -2
  36. package/bundle/cleanup-QUPE4ZH5.js +32 -0
  37. package/bundle/{core-PVG4D2MR.js → core-UHW46BQ2.js} +3 -1
  38. package/bundle/{devtoolsService-OUX7PWP3.js → devtoolsService-465M2LE6.js} +2 -2
  39. package/bundle/{devtoolsService-IVPTF5ZJ.js → devtoolsService-7KPRZCZM.js} +2 -2
  40. package/bundle/{devtoolsService-QYDPHHFN.js → devtoolsService-F7ASQSK7.js} +4 -3
  41. package/bundle/devtoolsService-ZJWYFVKM.js +4359 -0
  42. package/bundle/{dist-PRJQFPSQ.js → dist-A3MEBURU.js} +3 -1
  43. package/bundle/{core-I73XKBPY.js → dist-QVREEUKF.js} +3 -1
  44. package/bundle/dist-Y4VJWSZD.js +2156 -0
  45. package/bundle/docs/changelogs/index.md +20 -0
  46. package/bundle/docs/changelogs/latest.md +53 -18
  47. package/bundle/docs/changelogs/preview.md +35 -46
  48. package/bundle/{gemini-LA6TNI44.js → gemini-7SBFMAVQ.js} +14 -14
  49. package/bundle/{gemini-QKB55UV6.js → gemini-HIS5LQZQ.js} +212 -196
  50. package/bundle/{gemini-E2E3U6PR.js → gemini-VBI43GZ4.js} +14 -14
  51. package/bundle/gemini-VNJSIRD3.js +16427 -0
  52. package/bundle/gemini.js +7 -7
  53. package/bundle/{interactiveCli-FS3OVPXQ.js → interactiveCli-7CJ3QII7.js} +8 -8
  54. package/bundle/{interactiveCli-OD2LO24X.js → interactiveCli-HO3K7ZQC.js} +8 -8
  55. package/bundle/{interactiveCli-ADLAWPXN.js → interactiveCli-J27JH7NJ.js} +315 -296
  56. package/bundle/interactiveCli-QQIQEHF4.js +34816 -0
  57. package/bundle/{liteRtServerManager-O7PFOUFD.js → liteRtServerManager-ADM43JXF.js} +4 -4
  58. package/bundle/{liteRtServerManager-T2Z3RLS3.js → liteRtServerManager-FGXFYVBT.js} +4 -4
  59. package/bundle/{liteRtServerManager-3SKK7MNE.js → liteRtServerManager-IZIEAP3T.js} +4 -4
  60. package/bundle/liteRtServerManager-NRGCTYJQ.js +65 -0
  61. package/bundle/{oauth2-provider-Q433RA6I.js → oauth2-provider-3THMIWTP.js} +1 -1
  62. package/bundle/{oauth2-provider-E3S5DGLL.js → oauth2-provider-ASKQ7P2C.js} +1 -1
  63. package/bundle/{oauth2-provider-DFVE3NYF.js → oauth2-provider-NVAVQTFM.js} +38 -72
  64. package/bundle/oauth2-provider-TZOUW4Q5.js +235 -0
  65. package/bundle/{start-5G2UDZZ6.js → start-72YJPZDV.js} +6 -6
  66. package/bundle/{start-XMJ23QZN.js → start-A4ZY5O7I.js} +6 -6
  67. package/bundle/{start-3FPYJBRX.js → start-GCMULBVZ.js} +6 -6
  68. package/bundle/start-HAMF674K.js +18 -0
  69. package/package.json +1 -1
@@ -282493,8 +282493,8 @@ function isValidToolName(name3, options = {}) {
282493
282493
  }
282494
282494
 
282495
282495
  // packages/core/dist/src/generated/git-commit.js
282496
- var GIT_COMMIT_INFO = "9681621c6";
282497
- var CLI_VERSION = "0.53.0-preview.0";
282496
+ var GIT_COMMIT_INFO = "3818efbbf";
282497
+ var CLI_VERSION = "0.54.0-nightly.20260722.gf743ab579";
282498
282498
 
282499
282499
  // packages/core/dist/src/ide/detect-ide.js
282500
282500
  var IDE_DEFINITIONS = {
@@ -305675,7 +305675,7 @@ function getVersion() {
305675
305675
  }
305676
305676
  versionPromise = (async () => {
305677
305677
  const pkgJson = await getPackageJson(__dirname4);
305678
- return "0.53.0-preview.0";
305678
+ return "0.54.0-nightly.20260726.g3818efbbf";
305679
305679
  })();
305680
305680
  return versionPromise;
305681
305681
  }
@@ -306116,6 +306116,12 @@ ${errorMessage}`, true);
306116
306116
  // packages/core/dist/src/utils/llm-edit-fixer.js
306117
306117
  import { createHash as createHash5 } from "node:crypto";
306118
306118
 
306119
+ // packages/core/dist/src/utils/session.js
306120
+ import { randomUUID as randomUUID5 } from "node:crypto";
306121
+ function createSessionId() {
306122
+ return randomUUID5();
306123
+ }
306124
+
306119
306125
  // packages/core/dist/src/utils/secure-browser-launcher.js
306120
306126
  import { execFile as execFile6 } from "node:child_process";
306121
306127
  import { promisify as promisify7 } from "node:util";
@@ -306834,6 +306840,7 @@ async function handleUpgrade() {
306834
306840
  async function processIntent(config2, intent, fallbackModel, failedModel) {
306835
306841
  switch (intent) {
306836
306842
  case "retry_always":
306843
+ config2.rotateSessionId(createSessionId());
306837
306844
  config2.activateFallbackMode(fallbackModel, failedModel);
306838
306845
  return true;
306839
306846
  case "retry_once":
@@ -309330,6 +309337,9 @@ var CodeAssistServer = class {
309330
309337
  this.paidTier = paidTier;
309331
309338
  this.config = config2;
309332
309339
  }
309340
+ getEffectiveSessionId() {
309341
+ return this.config?.getSessionId() ?? this.sessionId;
309342
+ }
309333
309343
  async generateContentStream(req, userPromptId, role) {
309334
309344
  const autoUse = this.config ? shouldAutoUseCredits(this.config.getBillingSettings().overageStrategy, getG1CreditBalance(this.paidTier)) : false;
309335
309345
  const modelIsEligible = isOverageEligibleModel(req.model);
@@ -309339,7 +309349,7 @@ var CodeAssistServer = class {
309339
309349
  coreEvents.emitFeedback("info", "Using AI Credits for this request.");
309340
309350
  }
309341
309351
  const enabledCreditTypes = shouldEnableCredits ? [G1_CREDIT_TYPE] : void 0;
309342
- const responses = await this.requestStreamingPost("streamGenerateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.sessionId, enabledCreditTypes), req.config?.abortSignal);
309352
+ const responses = await this.requestStreamingPost("streamGenerateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.getEffectiveSessionId(), enabledCreditTypes), req.config?.abortSignal);
309343
309353
  const streamingLatency = {};
309344
309354
  const start2 = Date.now();
309345
309355
  let isFirst = true;
@@ -309353,7 +309363,7 @@ var CodeAssistServer = class {
309353
309363
  }
309354
309364
  streamingLatency.totalLatency = formatProtoJsonDuration(Date.now() - start2);
309355
309365
  const translatedResponse = fromGenerateContentResponse(response);
309356
- await recordConversationOffered(server, response.traceId, translatedResponse, streamingLatency, req.config?.abortSignal, server.sessionId);
309366
+ await recordConversationOffered(server, response.traceId, translatedResponse, streamingLatency, req.config?.abortSignal, server.getEffectiveSessionId());
309357
309367
  if (response.consumedCredits) {
309358
309368
  for (const credit of response.consumedCredits) {
309359
309369
  if (credit.creditType === G1_CREDIT_TYPE && credit.creditAmount) {
@@ -309379,14 +309389,14 @@ var CodeAssistServer = class {
309379
309389
  }
309380
309390
  async generateContent(req, userPromptId, role) {
309381
309391
  const start2 = Date.now();
309382
- const response = await this.requestPost("generateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.sessionId, void 0), req.config?.abortSignal, GENERATE_CONTENT_RETRY_DELAY_IN_MILLISECONDS);
309392
+ const response = await this.requestPost("generateContent", toGenerateContentRequest(req, userPromptId, this.projectId, this.getEffectiveSessionId(), void 0), req.config?.abortSignal, GENERATE_CONTENT_RETRY_DELAY_IN_MILLISECONDS);
309383
309393
  const duration3 = formatProtoJsonDuration(Date.now() - start2);
309384
309394
  const streamingLatency = {
309385
309395
  totalLatency: duration3,
309386
309396
  firstMessageLatency: duration3
309387
309397
  };
309388
309398
  const translatedResponse = fromGenerateContentResponse(response);
309389
- await recordConversationOffered(this, response.traceId, translatedResponse, streamingLatency, req.config?.abortSignal, this.sessionId);
309399
+ await recordConversationOffered(this, response.traceId, translatedResponse, streamingLatency, req.config?.abortSignal, this.getEffectiveSessionId());
309390
309400
  if (response.remainingCredits) {
309391
309401
  this.updateCredits(response.remainingCredits);
309392
309402
  }
@@ -329857,10 +329867,10 @@ var TopicState = class {
329857
329867
  };
329858
329868
 
329859
329869
  // packages/core/dist/src/agents/local-executor.js
329860
- import { randomUUID as randomUUID12 } from "node:crypto";
329870
+ import { randomUUID as randomUUID13 } from "node:crypto";
329861
329871
 
329862
329872
  // packages/core/dist/src/core/geminiChat.js
329863
- import { randomUUID as randomUUID5 } from "node:crypto";
329873
+ import { randomUUID as randomUUID6 } from "node:crypto";
329864
329874
 
329865
329875
  // packages/core/dist/src/utils/messageInspectors.js
329866
329876
  function isFunctionResponse(content) {
@@ -330326,7 +330336,7 @@ var GeminiChat = class {
330326
330336
  validateHistory2(history);
330327
330337
  let initialHistory;
330328
330338
  if (history.length > 0) {
330329
- initialHistory = history.map((item) => "id" in item && "content" in item ? item : { id: randomUUID5(), content: item });
330339
+ initialHistory = history.map((item) => "id" in item && "content" in item ? item : { id: randomUUID6(), content: item });
330330
330340
  } else if (resumedSessionData) {
330331
330341
  initialHistory = resumedSessionData.conversation.messages.filter((m) => m.type === "user" || m.type === "gemini").map((m) => ({
330332
330342
  id: m.id,
@@ -330601,7 +330611,7 @@ var GeminiChat = class {
330601
330611
  tools: this.tools,
330602
330612
  abortSignal
330603
330613
  };
330604
- let contentsToUse = supportsModernFeatures(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
330614
+ let contentsToUse = supportsModernFeatures(modelToUse) || isGemini2Model(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
330605
330615
  const hookSystem = this.context.config.getHookSystem();
330606
330616
  if (hookSystem) {
330607
330617
  const beforeModelResult = await hookSystem.fireBeforeModelEvent({
@@ -330624,7 +330634,7 @@ var GeminiChat = class {
330624
330634
  if (beforeModelResult.modifiedModel) {
330625
330635
  modelToUse = resolveModel(beforeModelResult.modifiedModel, useGemini3_1, false, hasAccessToPreview, this.context.config, this.context.config.hasGemini35FlashGAAccess?.() ?? false);
330626
330636
  lastModelToUse = modelToUse;
330627
- contentsToUse = supportsModernFeatures(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
330637
+ contentsToUse = supportsModernFeatures(modelToUse) || isGemini2Model(modelToUse) ? [...contentsForPreviewModel] : [...requestContents];
330628
330638
  }
330629
330639
  if (beforeModelResult.modifiedConfig) {
330630
330640
  Object.assign(config2, beforeModelResult.modifiedConfig);
@@ -330721,7 +330731,14 @@ var GeminiChat = class {
330721
330731
  */
330722
330732
  getHistoryTurns(curated = false) {
330723
330733
  const history = curated ? extractCuratedHistory2(this.agentHistory.get()) : [...this.agentHistory.get()];
330724
- return this.context.config.isContextManagementEnabled() ? scrubHistory(history) : history;
330734
+ if (this.context.config.isContextManagementEnabled()) {
330735
+ return scrubHistory(history);
330736
+ }
330737
+ const model = this.context.config.getModel();
330738
+ if (isGemini2Model(model) || supportsModernFeatures(model)) {
330739
+ return coalesceConsecutiveRoles(stripThoughts2(history));
330740
+ }
330741
+ return history;
330725
330742
  }
330726
330743
  /**
330727
330744
  * Clears the chat history.
@@ -331110,6 +331127,23 @@ function coalesceConsecutiveRoles(history) {
331110
331127
  }
331111
331128
  return result2;
331112
331129
  }
331130
+ function stripThoughts2(history) {
331131
+ return history.map((turn) => {
331132
+ if (!turn.content.parts)
331133
+ return turn;
331134
+ const hasThought = turn.content.parts.some((p) => p && p.thought);
331135
+ if (!hasThought)
331136
+ return turn;
331137
+ const nonThoughtParts = turn.content.parts.filter((p) => p && !p.thought);
331138
+ return {
331139
+ ...turn,
331140
+ content: {
331141
+ ...turn.content,
331142
+ parts: nonThoughtParts
331143
+ }
331144
+ };
331145
+ }).filter((turn) => !turn.content.parts || turn.content.parts.length > 0);
331146
+ }
331113
331147
 
331114
331148
  // packages/core/dist/src/utils/ragLogger.js
331115
331149
  import * as fs50 from "node:fs";
@@ -338138,7 +338172,11 @@ var GoogleCredentialsAuthProvider = class extends BaseA2AAuthProvider {
338138
338172
  if (!targetUrl) {
338139
338173
  throw new Error("targetUrl must be provided to GoogleCredentialsAuthProvider to determine token audience.");
338140
338174
  }
338141
- const hostname3 = new URL(targetUrl).hostname;
338175
+ const urlObj = new URL(targetUrl);
338176
+ if (urlObj.protocol !== "https:") {
338177
+ throw new Error(`Protocol "${urlObj.protocol}" is not secure. Google Credential provider requires HTTPS.`);
338178
+ }
338179
+ const hostname3 = urlObj.hostname;
338142
338180
  const isRunAppHost = CLOUD_RUN_HOST_REGEX.test(hostname3);
338143
338181
  if (isRunAppHost) {
338144
338182
  this.useIdToken = true;
@@ -338237,7 +338275,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
338237
338275
  return provider;
338238
338276
  }
338239
338277
  case "oauth2": {
338240
- const { OAuth2AuthProvider } = await import("./oauth2-provider-E3S5DGLL.js");
338278
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-NVAVQTFM.js");
338241
338279
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
338242
338280
  await provider.initialize();
338243
338281
  return provider;
@@ -339796,7 +339834,7 @@ var SchedulerStateManager = class {
339796
339834
 
339797
339835
  // packages/core/dist/src/scheduler/confirmation.js
339798
339836
  import { on } from "node:events";
339799
- import { randomUUID as randomUUID6 } from "node:crypto";
339837
+ import { randomUUID as randomUUID7 } from "node:crypto";
339800
339838
  async function awaitConfirmation(messageBus, correlationId, signal) {
339801
339839
  if (signal.aborted) {
339802
339840
  throw new Error("Operation cancelled");
@@ -339842,7 +339880,7 @@ async function resolveConfirmation(toolCall, signal, deps) {
339842
339880
  details.systemMessage = deps.systemMessage;
339843
339881
  }
339844
339882
  await notifyHooks(deps, details);
339845
- const correlationId = randomUUID6();
339883
+ const correlationId = randomUUID7();
339846
339884
  const serializableDetails = details;
339847
339885
  lastDetails = serializableDetails;
339848
339886
  const ideConfirmation = "ideConfirmation" in details ? details.ideConfirmation : void 0;
@@ -341345,7 +341383,7 @@ Output too large. Full output available at: ${filePath}
341345
341383
  };
341346
341384
 
341347
341385
  // packages/core/dist/src/core/client.js
341348
- import { randomUUID as randomUUID10 } from "node:crypto";
341386
+ import { randomUUID as randomUUID11 } from "node:crypto";
341349
341387
 
341350
341388
  // packages/core/dist/src/context/config/registry.js
341351
341389
  var ContextProcessorRegistry = class {
@@ -341904,7 +341942,7 @@ function formatNodesForLlm(nodes, options = {}) {
341904
341942
  }
341905
341943
 
341906
341944
  // packages/core/dist/src/context/utils/snapshotGenerator.js
341907
- import { randomUUID as randomUUID7 } from "node:crypto";
341945
+ import { randomUUID as randomUUID8 } from "node:crypto";
341908
341946
  function isStringArray(value) {
341909
341947
  return Array.isArray(value) && value.every((item) => typeof item === "string");
341910
341948
  }
@@ -342108,7 +342146,7 @@ ${formatNodesForLlm(nodes)}`;
342108
342146
  const desc = t2["description"];
342109
342147
  if (typeof desc === "string" && desc) {
342110
342148
  newState.active_tasks.push({
342111
- id: `task_${randomUUID7().slice(0, 8)}`,
342149
+ id: `task_${randomUUID8().slice(0, 8)}`,
342112
342150
  description: desc
342113
342151
  });
342114
342152
  }
@@ -342650,7 +342688,7 @@ async function loadContextManagementConfig(sidecarPath, registry2) {
342650
342688
  // packages/core/dist/src/context/tracer.js
342651
342689
  import * as fsSync3 from "node:fs";
342652
342690
  import * as path69 from "node:path";
342653
- import { randomUUID as randomUUID8 } from "node:crypto";
342691
+ import { randomUUID as randomUUID9 } from "node:crypto";
342654
342692
  var ContextTracer = class {
342655
342693
  traceDir;
342656
342694
  assetsDir;
@@ -342702,7 +342740,7 @@ var ContextTracer = class {
342702
342740
  if (!this.enabled)
342703
342741
  return "asset-recording-disabled";
342704
342742
  try {
342705
- const assetId = `${Date.now()}-${randomUUID8()}-${assetName}.json`;
342743
+ const assetId = `${Date.now()}-${randomUUID9()}-${assetName}.json`;
342706
342744
  const assetPath = path69.join(this.assetsDir, assetId);
342707
342745
  fsSync3.writeFileSync(assetPath, JSON.stringify(data, null, 2), "utf-8");
342708
342746
  this.logEvent(component, `Saved asset: ${assetName}`, { assetId });
@@ -342758,12 +342796,12 @@ var ContextEventBus = class extends EventEmitter5 {
342758
342796
  };
342759
342797
 
342760
342798
  // packages/core/dist/src/context/pipeline/inbox.js
342761
- import { randomUUID as randomUUID9 } from "node:crypto";
342799
+ import { randomUUID as randomUUID10 } from "node:crypto";
342762
342800
  var LiveInbox = class {
342763
342801
  messages = [];
342764
342802
  publish(topic, payload) {
342765
342803
  this.messages.push({
342766
- id: randomUUID9(),
342804
+ id: randomUUID10(),
342767
342805
  topic,
342768
342806
  payload,
342769
342807
  timestamp: Date.now()
@@ -344665,7 +344703,7 @@ var GeminiClient = class {
344665
344703
  if (this.contextManager) {
344666
344704
  const rawPendingRequest = createUserContent(request);
344667
344705
  const pendingRequest = {
344668
- id: randomUUID10(),
344706
+ id: randomUUID11(),
344669
344707
  content: rawPendingRequest
344670
344708
  };
344671
344709
  const { history: newHistory, apiHistory, pendingApiHistory, baseUnits } = await this.contextManager.renderHistory(pendingRequest, void 0, signal);
@@ -346523,7 +346561,7 @@ function createScopedWorkspaceContext(parentContext, additionalDirectories) {
346523
346561
  }
346524
346562
 
346525
346563
  // packages/core/dist/src/confirmation-bus/message-bus.js
346526
- import { randomUUID as randomUUID11 } from "node:crypto";
346564
+ import { randomUUID as randomUUID12 } from "node:crypto";
346527
346565
  import { EventEmitter as EventEmitter6 } from "node:events";
346528
346566
  var MessageBus = class _MessageBus extends EventEmitter6 {
346529
346567
  policyEngine;
@@ -346675,7 +346713,7 @@ var MessageBus = class _MessageBus extends EventEmitter6 {
346675
346713
  * The correlation ID is generated internally and added to the request
346676
346714
  */
346677
346715
  async request(request, responseType, timeoutMs = 6e4) {
346678
- const correlationId = randomUUID11();
346716
+ const correlationId = randomUUID12();
346679
346717
  return new Promise((resolve29, reject) => {
346680
346718
  const timeoutId = setTimeout(() => {
346681
346719
  cleanup();
@@ -346924,7 +346962,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
346924
346962
  this.compressionService = new ChatCompressionService();
346925
346963
  this.parentCallId = parentCallId;
346926
346964
  this.cache = new import_lru_cache.default(10);
346927
- this.agentId = randomUUID12();
346965
+ this.agentId = randomUUID13();
346928
346966
  }
346929
346967
  /**
346930
346968
  * Executes a single turn of the agent's logic, from calling the model
@@ -347304,7 +347342,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
347304
347342
  } else if (info2.compressionStatus === CompressionStatus.COMPRESSED) {
347305
347343
  if (newHistory) {
347306
347344
  const turns = newHistory.map((c4) => ({
347307
- id: randomUUID12(),
347345
+ id: randomUUID13(),
347308
347346
  content: c4
347309
347347
  }));
347310
347348
  chat.setHistory(turns);
@@ -347313,7 +347351,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
347313
347351
  } else if (info2.compressionStatus === CompressionStatus.CONTENT_TRUNCATED) {
347314
347352
  if (newHistory) {
347315
347353
  const turns = newHistory.map((c4) => ({
347316
- id: randomUUID12(),
347354
+ id: randomUUID13(),
347317
347355
  content: c4
347318
347356
  }));
347319
347357
  chat.setHistory(turns);
@@ -347731,7 +347769,7 @@ Important Rules:
347731
347769
  };
347732
347770
 
347733
347771
  // packages/core/dist/src/agents/local-invocation.js
347734
- import { randomUUID as randomUUID13 } from "node:crypto";
347772
+ import { randomUUID as randomUUID14 } from "node:crypto";
347735
347773
 
347736
347774
  // packages/core/dist/src/utils/agent-sanitization-utils.js
347737
347775
  var SENSITIVE_KEY_PATTERNS = [
@@ -347891,7 +347929,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
347891
347929
  lastItem.content = sanitizeThoughtContent(text);
347892
347930
  } else {
347893
347931
  recentActivity.push({
347894
- id: randomUUID13(),
347932
+ id: randomUUID14(),
347895
347933
  type: "thought",
347896
347934
  content: sanitizeThoughtContent(text),
347897
347935
  status: SubagentState.RUNNING
@@ -347909,7 +347947,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
347909
347947
  const displayName = activity.data["displayName"] ? sanitizeErrorMessage(String(activity.data["displayName"])) : void 0;
347910
347948
  const description = activity.data["description"] ? sanitizeErrorMessage(String(activity.data["description"])) : void 0;
347911
347949
  const args2 = JSON.stringify(sanitizeToolArgs(activity.data["args"]));
347912
- const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID13();
347950
+ const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID14();
347913
347951
  recentActivity.push({
347914
347952
  id: callId,
347915
347953
  type: "tool_call",
@@ -347960,7 +347998,7 @@ var LocalSubagentInvocation = class extends BaseToolInvocation {
347960
347998
  }
347961
347999
  }
347962
348000
  recentActivity.push({
347963
- id: randomUUID13(),
348001
+ id: randomUUID14(),
347964
348002
  type: "thought",
347965
348003
  content: isCancellation || isRejection ? sanitizedError : `Error: ${sanitizedError}`,
347966
348004
  status: isCancellation || isRejection ? SubagentState.CANCELLED : SubagentState.ERROR
@@ -348031,7 +348069,7 @@ ${output.result}`;
348031
348069
  const lastActivity = recentActivity[recentActivity.length - 1];
348032
348070
  if (!lastActivity || lastActivity.status !== SubagentState.ERROR) {
348033
348071
  recentActivity.push({
348034
- id: randomUUID13(),
348072
+ id: randomUUID14(),
348035
348073
  type: "thought",
348036
348074
  content: `Error: ${errorMessage}`,
348037
348075
  status: SubagentState.ERROR
@@ -348467,7 +348505,7 @@ ${errorMessage}` : errorMessage;
348467
348505
  };
348468
348506
 
348469
348507
  // packages/core/dist/src/agents/local-session-invocation.js
348470
- import { randomUUID as randomUUID15 } from "node:crypto";
348508
+ import { randomUUID as randomUUID16 } from "node:crypto";
348471
348509
 
348472
348510
  // packages/core/dist/src/utils/checks.js
348473
348511
  function assumeExhaustive(_value) {
@@ -348478,7 +348516,7 @@ function checkExhaustive(value, msg = `unexpected value ${value}!`) {
348478
348516
  }
348479
348517
 
348480
348518
  // packages/core/dist/src/agents/local-subagent-protocol.js
348481
- import { randomUUID as randomUUID14 } from "node:crypto";
348519
+ import { randomUUID as randomUUID15 } from "node:crypto";
348482
348520
 
348483
348521
  // packages/core/dist/src/agent/agent-session.js
348484
348522
  var AgentSession = class {
@@ -348663,7 +348701,7 @@ var LocalSubagentProtocol = class {
348663
348701
  _rawActivityCallback;
348664
348702
  _events = [];
348665
348703
  _subscribers = /* @__PURE__ */ new Set();
348666
- _streamId = randomUUID14();
348704
+ _streamId = randomUUID15();
348667
348705
  _eventCounter = 0;
348668
348706
  _agentStartEmitted = false;
348669
348707
  _agentEndEmitted = false;
@@ -348741,7 +348779,7 @@ var LocalSubagentProtocol = class {
348741
348779
  // Core: execution
348742
348780
  // ---------------------------------------------------------------------------
348743
348781
  _beginNewStream() {
348744
- this._streamId = randomUUID14();
348782
+ this._streamId = randomUUID15();
348745
348783
  this._eventCounter = 0;
348746
348784
  this._abortController = new AbortController();
348747
348785
  this._agentStartEmitted = false;
@@ -348803,7 +348841,7 @@ var LocalSubagentProtocol = class {
348803
348841
  }
348804
348842
  case "TOOL_CALL_START": {
348805
348843
  const rawCallId = activity.data["callId"];
348806
- const callId = String(rawCallId ?? randomUUID14());
348844
+ const callId = String(rawCallId ?? randomUUID15());
348807
348845
  const rawName = activity.data["name"];
348808
348846
  const name3 = String(rawName ?? "unknown");
348809
348847
  const rawArgs = activity.data["args"];
@@ -348821,7 +348859,7 @@ var LocalSubagentProtocol = class {
348821
348859
  }
348822
348860
  case "TOOL_CALL_END": {
348823
348861
  const rawId = activity.data["id"];
348824
- const requestId = String(rawId ?? randomUUID14());
348862
+ const requestId = String(rawId ?? randomUUID15());
348825
348863
  const rawName = activity.data["name"];
348826
348864
  const name3 = String(rawName ?? "unknown");
348827
348865
  const rawOutput = activity.data["output"];
@@ -349000,7 +349038,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
349000
349038
  lastItem.content = sanitizeThoughtContent(text);
349001
349039
  } else {
349002
349040
  recentActivity.push({
349003
- id: randomUUID15(),
349041
+ id: randomUUID16(),
349004
349042
  type: "thought",
349005
349043
  content: sanitizeThoughtContent(text),
349006
349044
  status: SubagentState.RUNNING
@@ -349019,7 +349057,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
349019
349057
  const displayName = activity.data["displayName"] ? sanitizeErrorMessage(String(activity.data["displayName"]).trim()) : void 0;
349020
349058
  const description = activity.data["description"] ? sanitizeErrorMessage(String(activity.data["description"])) : void 0;
349021
349059
  const args2 = JSON.stringify(sanitizeToolArgs(activity.data["args"]));
349022
- const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID15();
349060
+ const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID16();
349023
349061
  recentActivity.push({
349024
349062
  id: callId,
349025
349063
  type: "tool_call",
@@ -349071,7 +349109,7 @@ var LocalSessionInvocation = class extends BaseToolInvocation {
349071
349109
  }
349072
349110
  }
349073
349111
  recentActivity.push({
349074
- id: randomUUID15(),
349112
+ id: randomUUID16(),
349075
349113
  type: "thought",
349076
349114
  content: isCancellation || isRejection ? sanitizedError : `Error: ${sanitizedError}`,
349077
349115
  status: isCancellation || isRejection ? SubagentState.CANCELLED : SubagentState.ERROR
@@ -349169,7 +349207,7 @@ ${output.result}`;
349169
349207
  const lastActivity = recentActivity[recentActivity.length - 1];
349170
349208
  if (!lastActivity || lastActivity.status !== SubagentState.ERROR) {
349171
349209
  recentActivity.push({
349172
- id: randomUUID15(),
349210
+ id: randomUUID16(),
349173
349211
  type: "thought",
349174
349212
  content: `Error: ${errorMessage}`,
349175
349213
  status: SubagentState.ERROR
@@ -349203,7 +349241,7 @@ ${output.result}`;
349203
349241
  };
349204
349242
 
349205
349243
  // packages/core/dist/src/agents/remote-subagent-protocol.js
349206
- import { randomUUID as randomUUID16 } from "node:crypto";
349244
+ import { randomUUID as randomUUID17 } from "node:crypto";
349207
349245
  function isAbortLikeError2(err2) {
349208
349246
  return err2 instanceof Error && err2.name === "AbortError";
349209
349247
  }
@@ -349212,7 +349250,7 @@ var RemoteSubagentProtocol = class {
349212
349250
  context;
349213
349251
  _events = [];
349214
349252
  _subscribers = /* @__PURE__ */ new Set();
349215
- _streamId = randomUUID16();
349253
+ _streamId = randomUUID17();
349216
349254
  _eventCounter = 0;
349217
349255
  _agentStartEmitted = false;
349218
349256
  _agentEndEmitted = false;
@@ -349292,7 +349330,7 @@ var RemoteSubagentProtocol = class {
349292
349330
  // Core: A2A streaming
349293
349331
  // ---------------------------------------------------------------------------
349294
349332
  _beginNewStream() {
349295
- this._streamId = randomUUID16();
349333
+ this._streamId = randomUUID17();
349296
349334
  this._eventCounter = 0;
349297
349335
  this._abortController = new AbortController();
349298
349336
  this._agentStartEmitted = false;
@@ -349667,7 +349705,7 @@ ${errorMessage}` : errorMessage;
349667
349705
  };
349668
349706
 
349669
349707
  // packages/core/dist/src/agents/browser/browserAgentInvocation.js
349670
- import { randomUUID as randomUUID17 } from "node:crypto";
349708
+ import { randomUUID as randomUUID18 } from "node:crypto";
349671
349709
 
349672
349710
  // packages/core/dist/src/utils/browserConsent.js
349673
349711
  import * as fs59 from "node:fs/promises";
@@ -351152,7 +351190,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
351152
351190
  const printOutput = updateOutput ? (msg) => {
351153
351191
  const sanitizedMsg = sanitizeThoughtContent(msg);
351154
351192
  recentActivity.push({
351155
- id: randomUUID17(),
351193
+ id: randomUUID18(),
351156
351194
  type: "thought",
351157
351195
  content: sanitizedMsg,
351158
351196
  status: SubagentState.COMPLETED
@@ -351184,7 +351222,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
351184
351222
  lastItem.content = sanitizeThoughtContent(text);
351185
351223
  } else {
351186
351224
  recentActivity.push({
351187
- id: randomUUID17(),
351225
+ id: randomUUID18(),
351188
351226
  type: "thought",
351189
351227
  content: sanitizeThoughtContent(text),
351190
351228
  status: SubagentState.RUNNING
@@ -351198,7 +351236,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
351198
351236
  const displayName = activity.data["displayName"] ? sanitizeErrorMessage(String(activity.data["displayName"])) : void 0;
351199
351237
  const description = activity.data["description"] ? sanitizeErrorMessage(String(activity.data["description"])) : void 0;
351200
351238
  const args2 = JSON.stringify(sanitizeToolArgs(activity.data["args"]));
351201
- const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID17();
351239
+ const callId = activity.data["callId"] ? String(activity.data["callId"]) : randomUUID18();
351202
351240
  recentActivity.push({
351203
351241
  id: callId,
351204
351242
  type: "tool_call",
@@ -351247,7 +351285,7 @@ var BrowserAgentInvocation = class extends BaseToolInvocation {
351247
351285
  }
351248
351286
  const sanitizedError = sanitizeErrorMessage(error40);
351249
351287
  recentActivity.push({
351250
- id: randomUUID17(),
351288
+ id: randomUUID18(),
351251
351289
  type: "thought",
351252
351290
  content: isCancellation ? sanitizedError : `Error: ${sanitizedError}`,
351253
351291
  status: newStatus
@@ -365371,7 +365409,7 @@ var McpComplianceTransport = class extends EventEmitter8 {
365371
365409
  // packages/core/dist/src/tools/mcp-client.js
365372
365410
  import { basename as basename7 } from "node:path";
365373
365411
  import { pathToFileURL } from "node:url";
365374
- import { randomUUID as randomUUID18 } from "node:crypto";
365412
+ import { randomUUID as randomUUID19 } from "node:crypto";
365375
365413
 
365376
365414
  // packages/core/dist/src/mcp/oauth-token-storage.js
365377
365415
  import { promises as fs75 } from "node:fs";
@@ -366991,7 +367029,7 @@ var McpCallableTool2 = class {
366991
367029
  throw new Error("McpCallableTool only supports single function call");
366992
367030
  }
366993
367031
  const call = functionCalls[0];
366994
- const progressToken = randomUUID18();
367032
+ const progressToken = randomUUID19();
366995
367033
  const context2 = getToolCallContext();
366996
367034
  if (context2 && this.progressReporter) {
366997
367035
  this.progressReporter.registerProgressToken(progressToken, context2.callId);
@@ -375492,8 +375530,8 @@ function rng3() {
375492
375530
  }
375493
375531
 
375494
375532
  // packages/core/node_modules/uuid/dist-node/native.js
375495
- import { randomUUID as randomUUID19 } from "node:crypto";
375496
- var native_default2 = { randomUUID: randomUUID19 };
375533
+ import { randomUUID as randomUUID20 } from "node:crypto";
375534
+ var native_default2 = { randomUUID: randomUUID20 };
375497
375535
 
375498
375536
  // packages/core/node_modules/uuid/dist-node/v4.js
375499
375537
  function _v4(options, buf, offset) {
@@ -376583,6 +376621,9 @@ var Config = class {
376583
376621
  this.refreshSessionScopedPlansDirectory(previousPlansDir);
376584
376622
  }
376585
376623
  }
376624
+ rotateSessionId(sessionId) {
376625
+ this._sessionId = sessionId;
376626
+ }
376586
376627
  resetNewSessionState(sessionId) {
376587
376628
  this.setSessionId(sessionId);
376588
376629
  }
@@ -378828,7 +378869,7 @@ Write the complete content to the \`GEMINI.md\` file. The output must be well-fo
378828
378869
  }
378829
378870
 
378830
378871
  // packages/core/dist/src/commands/memory.js
378831
- import { randomUUID as randomUUID21 } from "node:crypto";
378872
+ import { randomUUID as randomUUID22 } from "node:crypto";
378832
378873
  import { constants as fsConstants3 } from "node:fs";
378833
378874
  import * as fs81 from "node:fs/promises";
378834
378875
  import * as path93 from "node:path";
@@ -379247,7 +379288,7 @@ async function resolveTargetWithinAllowedRoots(targetPath, allowedRoots) {
379247
379288
  import * as fs80 from "node:fs/promises";
379248
379289
  import * as path92 from "node:path";
379249
379290
  import { constants as fsConstants2 } from "node:fs";
379250
- import { randomUUID as randomUUID20 } from "node:crypto";
379291
+ import { randomUUID as randomUUID21 } from "node:crypto";
379251
379292
 
379252
379293
  // packages/core/dist/src/agents/skill-extraction-agent.js
379253
379294
  var SkillExtractionSchema = external_exports.object({
@@ -380235,7 +380276,7 @@ function buildAgentLoopContext(config2) {
380235
380276
  const autoApproveBus = new MessageBus(autoApprovePolicy);
380236
380277
  return {
380237
380278
  config: config2,
380238
- promptId: `skill-extraction-${randomUUID20().slice(0, 8)}`,
380279
+ promptId: `skill-extraction-${randomUUID21().slice(0, 8)}`,
380239
380280
  toolRegistry: config2.getToolRegistry(),
380240
380281
  promptRegistry: new PromptRegistry(),
380241
380282
  resourceRegistry: new ResourceRegistry(),
@@ -381266,7 +381307,7 @@ async function restoreCommittedInboxPatchTarget(stagedTarget) {
381266
381307
  return;
381267
381308
  }
381268
381309
  const restoreDir = await findNearestExistingDirectory(path93.dirname(stagedTarget.targetPath));
381269
- const restorePath = path93.join(restoreDir, `.${path93.basename(stagedTarget.targetPath)}.${randomUUID21()}.rollback`);
381310
+ const restorePath = path93.join(restoreDir, `.${path93.basename(stagedTarget.targetPath)}.${randomUUID22()}.rollback`);
381270
381311
  await writeExclusiveFile(restorePath, stagedTarget.original, stagedTarget.mode);
381271
381312
  await fs81.rename(restorePath, stagedTarget.targetPath);
381272
381313
  }
@@ -381280,7 +381321,7 @@ async function stageInboxPatchTargets(targets) {
381280
381321
  mode = (await fs81.stat(target.targetPath)).mode;
381281
381322
  }
381282
381323
  const tempDir = await findNearestExistingDirectory(path93.dirname(target.targetPath));
381283
- const tempPath = path93.join(tempDir, `.${path93.basename(target.targetPath)}.${randomUUID21()}.patch-tmp`);
381324
+ const tempPath = path93.join(tempDir, `.${path93.basename(target.targetPath)}.${randomUUID22()}.patch-tmp`);
381284
381325
  await writeExclusiveFile(tempPath, target.patched, mode);
381285
381326
  stagedTargets.push({
381286
381327
  targetPath: target.targetPath,
@@ -387250,12 +387291,6 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
387250
387291
  }
387251
387292
  };
387252
387293
 
387253
- // packages/core/dist/src/utils/session.js
387254
- import { randomUUID as randomUUID22 } from "node:crypto";
387255
- function createSessionId() {
387256
- return randomUUID22();
387257
- }
387258
-
387259
387294
  // packages/core/dist/src/utils/compatibility.js
387260
387295
  import os32 from "node:os";
387261
387296
  function isWindows10() {
@@ -395800,6 +395835,7 @@ export {
395800
395835
  resetVersionCache,
395801
395836
  IDEConnectionStatus,
395802
395837
  IdeClient,
395838
+ createSessionId,
395803
395839
  openBrowserSecurely,
395804
395840
  shouldLaunchBrowser,
395805
395841
  getErrorStatus,
@@ -395938,6 +395974,7 @@ export {
395938
395974
  isInvalidArgumentError,
395939
395975
  stripToolCallIdPrefixes,
395940
395976
  coalesceConsecutiveRoles,
395977
+ stripThoughts2 as stripThoughts,
395941
395978
  populateToolDisplay,
395942
395979
  toolResultDisplayToDisplayContent,
395943
395980
  renderDisplayDiff,
@@ -396227,7 +396264,6 @@ export {
396227
396264
  LegacyAgentProtocol,
396228
396265
  LegacyAgentSession,
396229
396266
  ReadManyFilesTool,
396230
- createSessionId,
396231
396267
  isWindows10,
396232
396268
  isJetBrainsTerminal,
396233
396269
  isTmux,
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-HF533LET.js";
8
+ } from "./chunk-2VCRWD5A.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -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-UJVAPQ7V.js";
5
+ } from "./chunk-PHD2HIVW.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-LUM47MYE.js";
17
+ } from "./chunk-DZDRGXE7.js";
18
18
  import {
19
19
  debugLogger
20
- } from "./chunk-5RDOS7UZ.js";
20
+ } from "./chunk-OEJGR4OM.js";
21
21
  import {
22
22
  __toESM
23
23
  } from "./chunk-34MYV7JD.js";
@@ -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-PVCJCQWY.js";
4
+ } from "./chunk-RVYNXMAI.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require