@google/gemini-cli 0.64.0-preview.0 → 0.65.0-nightly.20261007.gef59c532f

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 (70) hide show
  1. package/bundle/{chunk-EDVFNWRG.js → chunk-2QX7AFU2.js} +1 -1
  2. package/bundle/{chunk-EDYPRCAA.js → chunk-354KMHUX.js} +2 -2
  3. package/bundle/{chunk-UFQDAROY.js → chunk-3F7OA7UU.js} +1 -1
  4. package/bundle/{chunk-HN74ORTP.js → chunk-46A63GIT.js} +27 -4
  5. package/bundle/{chunk-ZQW7OGUO.js → chunk-6FH32SR7.js} +184 -45
  6. package/bundle/{chunk-SDWOC67Z.js → chunk-7NUXN3UV.js} +1 -1
  7. package/bundle/{chunk-Y2HXXBXI.js → chunk-ASQYH7O3.js} +1 -1
  8. package/bundle/{chunk-EBP6K2WG.js → chunk-BT4BJCGX.js} +32 -16
  9. package/bundle/{chunk-UBGF6JU5.js → chunk-CIKQQ32X.js} +1 -1
  10. package/bundle/chunk-DIMRHS5O.js +154 -0
  11. package/bundle/{chunk-NX7TO2DU.js → chunk-EIHDEZQ3.js} +1 -1
  12. package/bundle/{chunk-QUCRASYB.js → chunk-FE5UXCSL.js} +1 -1
  13. package/bundle/{chunk-EFX5XL6M.js → chunk-FTB4FVEK.js} +2 -2
  14. package/bundle/{chunk-A4TO2DY2.js → chunk-HYF74TEA.js} +8018 -14883
  15. package/bundle/{chunk-6OFXOGEG.js → chunk-JYWQ73Z5.js} +193 -47
  16. package/bundle/{chunk-HSZIYPL6.js → chunk-KHG7NKQK.js} +3 -3
  17. package/bundle/chunk-KTOZF7BG.js +401335 -0
  18. package/bundle/{chunk-2NQXIWQK.js → chunk-KV6RPWUP.js} +27 -4
  19. package/bundle/{chunk-KCCVXZ52.js → chunk-LNFN3PQL.js} +32 -16
  20. package/bundle/{chunk-MLSLNORV.js → chunk-LS355CSQ.js} +3 -3
  21. package/bundle/{chunk-2VN53SWW.js → chunk-NDVLWD4V.js} +9 -8
  22. package/bundle/{chunk-ZOHM7BPT.js → chunk-NUWDVBI7.js} +1 -1
  23. package/bundle/{chunk-VJYKQD5D.js → chunk-PYD373NJ.js} +3 -3
  24. package/bundle/{chunk-VBVCLWLA.js → chunk-QTGBWTWR.js} +2 -2
  25. package/bundle/chunk-U6ZQ2RUE.js +1571 -0
  26. package/bundle/chunk-UV4NDIKL.js +118 -0
  27. package/bundle/{chunk-U76XPSKR.js → chunk-VAONEIPY.js} +96 -67
  28. package/bundle/chunk-WGJZZTZY.js +425 -0
  29. package/bundle/{chunk-ZPLFLZQA.js → chunk-WXXOP3OP.js} +33 -8
  30. package/bundle/chunk-XOG2HJ3Y.js +17530 -0
  31. package/bundle/chunk-YSKY65XX.js +512 -0
  32. package/bundle/chunk-ZTPICUAP.js +103137 -0
  33. package/bundle/{cleanup-GGCB2LVD.js → cleanup-3V27AYOD.js} +2 -2
  34. package/bundle/{cleanup-JRDG3OTL.js → cleanup-4G3NPQT4.js} +2 -2
  35. package/bundle/{cleanup-SSW6IXTR.js → cleanup-5XQCOW5U.js} +2 -2
  36. package/bundle/cleanup-BBUUFPW4.js +32 -0
  37. package/bundle/{core-IUIZE6JW.js → core-AAGHH24E.js} +1 -1
  38. package/bundle/{devtoolsService-XZCKFZP5.js → devtoolsService-EVGTOLCK.js} +2 -2
  39. package/bundle/{devtoolsService-3SADPKKB.js → devtoolsService-J7VIMPHG.js} +2 -2
  40. package/bundle/{devtoolsService-MF6JKRUV.js → devtoolsService-PZBHHYCE.js} +4 -3
  41. package/bundle/devtoolsService-Z4ND55GM.js +4359 -0
  42. package/bundle/{dist-7L3BRW6V.js → dist-6PBUOORE.js} +1 -1
  43. package/bundle/{core-6HRWFQZW.js → dist-Q7B3BSZW.js} +1 -1
  44. package/bundle/dist-Z23CJKTC.js +2252 -0
  45. package/bundle/docs/changelogs/index.md +14 -0
  46. package/bundle/docs/changelogs/latest.md +55 -34
  47. package/bundle/docs/changelogs/preview.md +59 -54
  48. package/bundle/docs/tools/mcp-server.md +41 -12
  49. package/bundle/{gemini-JPMMQ3KA.js → gemini-2ZS4H5D5.js} +41 -21
  50. package/bundle/{gemini-QOQNG5VY.js → gemini-NHT6XRJ6.js} +241 -205
  51. package/bundle/gemini-ORQLMSXW.js +17954 -0
  52. package/bundle/{gemini-ZMMDUAQJ.js → gemini-YDK3BHCP.js} +41 -21
  53. package/bundle/gemini.js +7 -7
  54. package/bundle/{interactiveCli-R3P4A3FC.js → interactiveCli-22MUJI66.js} +23 -14
  55. package/bundle/{interactiveCli-UDWGRVJL.js → interactiveCli-2JNS4RJW.js} +23 -14
  56. package/bundle/{interactiveCli-3I4TG5SK.js → interactiveCli-EHUGFQPB.js} +327 -299
  57. package/bundle/interactiveCli-YANG53MI.js +34988 -0
  58. package/bundle/{liteRtServerManager-OVPUSK2T.js → liteRtServerManager-PGT3WQWS.js} +4 -4
  59. package/bundle/{liteRtServerManager-RAV63AGE.js → liteRtServerManager-TW45VSAX.js} +4 -4
  60. package/bundle/{liteRtServerManager-4MWCEVVM.js → liteRtServerManager-VCTOOEN4.js} +4 -4
  61. package/bundle/liteRtServerManager-Y2QFKZ5W.js +65 -0
  62. package/bundle/{oauth2-provider-XFP63FGJ.js → oauth2-provider-4AK74O2H.js} +1 -1
  63. package/bundle/{oauth2-provider-FVTRRJZR.js → oauth2-provider-IUYZ2A7H.js} +1 -1
  64. package/bundle/{oauth2-provider-EWOA64PR.js → oauth2-provider-JCJGEWMM.js} +38 -72
  65. package/bundle/oauth2-provider-QTTPZS6I.js +235 -0
  66. package/bundle/{start-DJAIXPPY.js → start-4O4IKUM4.js} +6 -6
  67. package/bundle/{start-VQQ2Q5KT.js → start-74BH6SEW.js} +6 -6
  68. package/bundle/{start-5O7TBK5L.js → start-EDAVUSEX.js} +6 -6
  69. package/bundle/start-Q6WRPG2O.js +18 -0
  70. package/package.json +1 -1
@@ -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-SDWOC67Z.js";
4
+ } from "./chunk-DIMRHS5O.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __require
@@ -1,13 +1,13 @@
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-SDWOC67Z.js";
4
+ } from "./chunk-7NUXN3UV.js";
5
5
  import {
6
6
  RELEASE_CHANNEL_STABILITY,
7
7
  debugLogger,
8
8
  getChannelFromVersion,
9
9
  isGitRepository
10
- } from "./chunk-6OFXOGEG.js";
10
+ } from "./chunk-JYWQ73Z5.js";
11
11
 
12
12
  // packages/cli/src/utils/installationInfo.ts
13
13
  import * as fs from "node:fs";
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-A4TO2DY2.js";
8
+ } from "./chunk-6FH32SR7.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -33,7 +33,7 @@ import {
33
33
  partListUnionToString,
34
34
  require_strip_json_comments,
35
35
  sanitizeFilenamePart
36
- } from "./chunk-ZQW7OGUO.js";
36
+ } from "./chunk-HYF74TEA.js";
37
37
  import {
38
38
  __commonJS,
39
39
  __require,
@@ -15248,7 +15248,13 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
15248
15248
  oauth: {
15249
15249
  type: "object",
15250
15250
  description: "OAuth configuration for authenticating with the server.",
15251
- additionalProperties: true
15251
+ additionalProperties: true,
15252
+ properties: {
15253
+ authorizationResponseIssParameterSupported: {
15254
+ type: "boolean",
15255
+ description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
15256
+ }
15257
+ }
15252
15258
  },
15253
15259
  authProviderType: {
15254
15260
  type: "string",
@@ -15309,7 +15315,13 @@ var SETTINGS_SCHEMA_DEFINITIONS = {
15309
15315
  oauth: {
15310
15316
  type: "object",
15311
15317
  description: "OAuth configuration for authenticating with the server.",
15312
- additionalProperties: true
15318
+ additionalProperties: true,
15319
+ properties: {
15320
+ authorizationResponseIssParameterSupported: {
15321
+ type: "boolean",
15322
+ description: 'Whether the authorization server returns the "iss" parameter in the authorization response (RFC 9207). When true, callbacks without "iss" are rejected; when false, they are accepted. A provided "iss" is always validated. Overrides the "authorization_response_iss_parameter_supported" value discovered from server metadata.'
15323
+ }
15324
+ }
15313
15325
  },
15314
15326
  authProviderType: {
15315
15327
  type: "string",
@@ -16332,6 +16344,7 @@ function mergeSettings(system, systemDefaults, user, workspace, isTrusted) {
16332
16344
  system
16333
16345
  );
16334
16346
  }
16347
+ var UNTRUSTED_WORKSPACE_SETTINGS_ERROR = "Cannot modify settings in an untrusted workspace. To enable this, verify the source of the repository and set GEMINI_CLI_TRUST_WORKSPACE=true or move your configuration to the global settings file.";
16335
16348
  var LoadedSettings = class {
16336
16349
  constructor(system, systemDefaults, user, workspace, isTrusted, errors = []) {
16337
16350
  this.system = system;
@@ -16378,7 +16391,8 @@ var LoadedSettings = class {
16378
16391
  return {
16379
16392
  ...workspace,
16380
16393
  settings: {},
16381
- originalSettings: {}
16394
+ originalSettings: {},
16395
+ readOnly: true
16382
16396
  };
16383
16397
  }
16384
16398
  computeMergedSettings(forceTrusted = false) {
@@ -16448,6 +16462,14 @@ var LoadedSettings = class {
16448
16462
  }
16449
16463
  setValue(scope, key, value) {
16450
16464
  const settingsFile = this.forScope(scope);
16465
+ if (scope === "Workspace" /* Workspace */ && !this.isPersistable(settingsFile)) {
16466
+ if (settingsFile.path === "" || settingsFile.path === this.user.path) {
16467
+ throw new Error(
16468
+ "Cannot modify workspace settings in the home directory. Please use user scope instead."
16469
+ );
16470
+ }
16471
+ throw new Error(UNTRUSTED_WORKSPACE_SETTINGS_ERROR);
16472
+ }
16451
16473
  const valueToSet = typeof value === "object" && value !== null ? structuredClone(value) : value;
16452
16474
  setNestedProperty(settingsFile.settings, key, valueToSet);
16453
16475
  if (this.isPersistable(settingsFile)) {
@@ -17461,6 +17483,7 @@ export {
17461
17483
  USER_SETTINGS_PATH,
17462
17484
  SettingScope,
17463
17485
  isLoadableSettingScope,
17486
+ UNTRUSTED_WORKSPACE_SETTINGS_ERROR,
17464
17487
  loadEnvironment,
17465
17488
  isWorktreeEnabled,
17466
17489
  loadSettings,
@@ -283529,8 +283529,8 @@ function isValidToolName(name3, options = {}) {
283529
283529
  }
283530
283530
 
283531
283531
  // packages/core/dist/src/generated/git-commit.js
283532
- var GIT_COMMIT_INFO = "fb972b2f8";
283533
- var CLI_VERSION = "0.64.0-preview.0";
283532
+ var GIT_COMMIT_INFO = "ef59c532f";
283533
+ var CLI_VERSION = "0.65.0-nightly.20261007.gef59c532f";
283534
283534
 
283535
283535
  // packages/core/dist/src/ide/detect-ide.js
283536
283536
  var IDE_DEFINITIONS = {
@@ -286098,24 +286098,52 @@ function isIgnoredUserContent(trimmedContent) {
286098
286098
  }
286099
286099
  function convertSessionToClientHistory(messages) {
286100
286100
  const clientHistory = [];
286101
- for (const msg of messages) {
286101
+ const seenFunctionResponseIds = /* @__PURE__ */ new Set();
286102
+ const pendingPartsToAppend = /* @__PURE__ */ new Map();
286103
+ for (let i3 = 0; i3 < messages.length; i3++) {
286104
+ const msg = messages[i3];
286102
286105
  if (msg.type === "info" || msg.type === "error" || msg.type === "warning") {
286103
286106
  continue;
286104
286107
  }
286105
286108
  if (msg.type === "user") {
286106
- const contentString = partListUnionToString(msg.content);
286107
- const trimmedContent = contentString.trim();
286108
- if (isIgnoredUserContent(trimmedContent)) {
286109
+ const extraParts = pendingPartsToAppend.get(msg.id) || [];
286110
+ pendingPartsToAppend.delete(msg.id);
286111
+ if (extraParts.length === 0) {
286112
+ if (!msg.content) {
286113
+ continue;
286114
+ }
286115
+ const contentString = partListUnionToString(msg.content);
286116
+ const trimmedContent = contentString.trim();
286117
+ if (isIgnoredUserContent(trimmedContent)) {
286118
+ continue;
286119
+ }
286120
+ }
286121
+ const parts2 = [
286122
+ ...msg.content ? ensurePartArray(msg.content) : [],
286123
+ ...extraParts
286124
+ ].filter((part) => {
286125
+ const respId = part?.functionResponse?.id;
286126
+ if (!respId) {
286127
+ return true;
286128
+ }
286129
+ if (seenFunctionResponseIds.has(respId)) {
286130
+ return false;
286131
+ }
286132
+ seenFunctionResponseIds.add(respId);
286133
+ return true;
286134
+ });
286135
+ if (parts2.length === 0) {
286109
286136
  continue;
286110
286137
  }
286111
286138
  clientHistory.push({
286112
286139
  id: msg.id,
286113
286140
  content: {
286114
286141
  role: "user",
286115
- parts: ensurePartArray(msg.content)
286142
+ parts: parts2
286116
286143
  }
286117
286144
  });
286118
286145
  } else if (msg.type === "gemini") {
286146
+ seenFunctionResponseIds.clear();
286119
286147
  const modelParts = [];
286120
286148
  const contentParts = msg.content ? ensurePartArray(msg.content) : [];
286121
286149
  const hasCallsInContent = contentParts.some((p) => !!p.functionCall);
@@ -286154,9 +286182,31 @@ function convertSessionToClientHistory(messages) {
286154
286182
  }
286155
286183
  });
286156
286184
  if (msg.toolCalls && msg.toolCalls.length > 0) {
286185
+ const recordedResponseIds = /* @__PURE__ */ new Set();
286186
+ let hasUntrackedFunctionResponse = false;
286187
+ let targetUserMsgId;
286188
+ for (let j = i3 + 1; j < messages.length; j++) {
286189
+ const nextMsg = messages[j];
286190
+ if (nextMsg.type === "gemini") {
286191
+ break;
286192
+ }
286193
+ if (nextMsg.type === "user" && nextMsg.content) {
286194
+ for (const part of ensurePartArray(nextMsg.content)) {
286195
+ if (part?.functionResponse) {
286196
+ targetUserMsgId ??= nextMsg.id;
286197
+ if (part.functionResponse.id) {
286198
+ recordedResponseIds.add(part.functionResponse.id);
286199
+ } else {
286200
+ hasUntrackedFunctionResponse = true;
286201
+ }
286202
+ }
286203
+ }
286204
+ }
286205
+ }
286157
286206
  const functionResponseParts = [];
286158
286207
  for (const toolCall of msg.toolCalls) {
286159
- if (toolCall.result) {
286208
+ const isAlreadyRecorded = toolCall.id ? recordedResponseIds.has(toolCall.id) : hasUntrackedFunctionResponse;
286209
+ if (toolCall.result && !isAlreadyRecorded) {
286160
286210
  let responseData;
286161
286211
  if (typeof toolCall.result === "string") {
286162
286212
  responseData = {
@@ -286178,13 +286228,34 @@ function convertSessionToClientHistory(messages) {
286178
286228
  }
286179
286229
  }
286180
286230
  if (functionResponseParts.length > 0) {
286181
- clientHistory.push({
286182
- id: `${msg.id}_response`,
286183
- content: {
286184
- role: "user",
286185
- parts: functionResponseParts
286231
+ if (targetUserMsgId) {
286232
+ const existingPending = pendingPartsToAppend.get(targetUserMsgId) || [];
286233
+ pendingPartsToAppend.set(targetUserMsgId, [
286234
+ ...existingPending,
286235
+ ...functionResponseParts
286236
+ ]);
286237
+ } else {
286238
+ const dedupedResponseParts = functionResponseParts.filter((part) => {
286239
+ const respId = part?.functionResponse?.id;
286240
+ if (!respId) {
286241
+ return true;
286242
+ }
286243
+ if (seenFunctionResponseIds.has(respId)) {
286244
+ return false;
286245
+ }
286246
+ seenFunctionResponseIds.add(respId);
286247
+ return true;
286248
+ });
286249
+ if (dedupedResponseParts.length > 0) {
286250
+ clientHistory.push({
286251
+ id: `${msg.id}_response`,
286252
+ content: {
286253
+ role: "user",
286254
+ parts: dedupedResponseParts
286255
+ }
286256
+ });
286186
286257
  }
286187
- });
286258
+ }
286188
286259
  }
286189
286260
  }
286190
286261
  }
@@ -286304,7 +286375,7 @@ function isResumableMessageRecord(message) {
286304
286375
  return false;
286305
286376
  }
286306
286377
  function hasResumableConversationContent(messages) {
286307
- return messages.some((message) => isResumableMessageRecord(message));
286378
+ return messages?.some((message) => isResumableMessageRecord(message)) ?? false;
286308
286379
  }
286309
286380
  function createJsonlRecordAccumulator(options) {
286310
286381
  let metadata2 = {};
@@ -286646,6 +286717,8 @@ var ChatRecordingService = class {
286646
286717
  queuedThoughts = [];
286647
286718
  queuedTokens = null;
286648
286719
  context;
286720
+ isResumedSession = false;
286721
+ initializationPromise = null;
286649
286722
  messageOrder = [];
286650
286723
  messageMetaMap = /* @__PURE__ */ new Map();
286651
286724
  toolCallMetaMap = /* @__PURE__ */ new Map();
@@ -286657,7 +286730,18 @@ var ChatRecordingService = class {
286657
286730
  this.sessionId = context2.promptId;
286658
286731
  this.projectHash = getProjectHash(context2.config.getProjectRoot());
286659
286732
  }
286733
+ getIsResumedSession() {
286734
+ return this.isResumedSession;
286735
+ }
286736
+ setIsResumedSession(isResumed) {
286737
+ this.isResumedSession = isResumed;
286738
+ }
286660
286739
  async initialize(resumedSessionData, kind) {
286740
+ this.isResumedSession = Boolean(resumedSessionData);
286741
+ this.initializationPromise = this.doInitialize(resumedSessionData, kind);
286742
+ return this.initializationPromise;
286743
+ }
286744
+ async doInitialize(resumedSessionData, kind) {
286661
286745
  try {
286662
286746
  this.kind = kind;
286663
286747
  if (resumedSessionData) {
@@ -286666,7 +286750,10 @@ var ChatRecordingService = class {
286666
286750
  this.kind = resumedSessionData.conversation.kind;
286667
286751
  const loadedRecord = await loadConversationRecord(this.conversationFile);
286668
286752
  if (loadedRecord) {
286669
- this.cachedConversation = loadedRecord;
286753
+ this.cachedConversation = {
286754
+ ...loadedRecord,
286755
+ messages: loadedRecord.messages ?? []
286756
+ };
286670
286757
  this.projectHash = this.cachedConversation.projectHash;
286671
286758
  if (this.conversationFile.endsWith(".json")) {
286672
286759
  this.conversationFile = this.conversationFile + "l";
@@ -286734,20 +286821,39 @@ var ChatRecordingService = class {
286734
286821
  const directories = this.kind === "subagent" ? [
286735
286822
  ...this.context.config.getWorkspaceContext()?.getDirectories() ?? []
286736
286823
  ] : void 0;
286737
- const initialMetadata = {
286738
- sessionId: this.sessionId,
286739
- projectHash: this.projectHash,
286740
- startTime: (/* @__PURE__ */ new Date()).toISOString(),
286741
- lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
286742
- kind: this.kind,
286743
- directories
286744
- };
286745
- this.appendRecord(initialMetadata);
286746
- this.cachedConversation = {
286747
- ...initialMetadata,
286748
- messages: []
286749
- };
286750
- this.rebuildIndexAndWindow([]);
286824
+ let fileAlreadyExisted = false;
286825
+ if (fs32.existsSync(this.conversationFile)) {
286826
+ fileAlreadyExisted = true;
286827
+ const loadedRecord = await loadConversationRecord(this.conversationFile);
286828
+ if (loadedRecord) {
286829
+ this.cachedConversation = {
286830
+ ...loadedRecord,
286831
+ messages: loadedRecord.messages ?? []
286832
+ };
286833
+ this.projectHash = this.cachedConversation.projectHash;
286834
+ if (loadedRecord.hasResumableContent || hasResumableConversationContent(this.cachedConversation.messages)) {
286835
+ this.isResumedSession = true;
286836
+ }
286837
+ }
286838
+ }
286839
+ if (!fileAlreadyExisted || !this.cachedConversation) {
286840
+ const initialMetadata = {
286841
+ sessionId: this.sessionId,
286842
+ projectHash: this.projectHash,
286843
+ startTime: (/* @__PURE__ */ new Date()).toISOString(),
286844
+ lastUpdated: (/* @__PURE__ */ new Date()).toISOString(),
286845
+ kind: this.kind,
286846
+ directories
286847
+ };
286848
+ this.appendRecord(initialMetadata);
286849
+ this.cachedConversation = {
286850
+ ...initialMetadata,
286851
+ messages: []
286852
+ };
286853
+ this.rebuildIndexAndWindow([]);
286854
+ } else {
286855
+ this.rebuildIndexAndWindow(this.cachedConversation.messages);
286856
+ }
286751
286857
  }
286752
286858
  this.queuedThoughts = [];
286753
286859
  this.queuedTokens = null;
@@ -286792,14 +286898,15 @@ var ChatRecordingService = class {
286792
286898
  this.hasEvictedMessages = msgs.length < this.messageOrder.length;
286793
286899
  }
286794
286900
  rebuildIndexAndWindow(messages) {
286901
+ const safeMessages = messages ?? [];
286795
286902
  this.messageOrder = [];
286796
286903
  this.messageMetaMap.clear();
286797
286904
  this.toolCallMetaMap.clear();
286798
- for (const msg of messages) {
286905
+ for (const msg of safeMessages) {
286799
286906
  this.indexMessage(msg);
286800
286907
  }
286801
286908
  if (this.cachedConversation) {
286802
- this.cachedConversation.messages = messages.length > MAX_HISTORY_MESSAGES ? messages.slice(-MAX_HISTORY_MESSAGES) : [...messages];
286909
+ this.cachedConversation.messages = safeMessages.length > MAX_HISTORY_MESSAGES ? safeMessages.slice(-MAX_HISTORY_MESSAGES) : [...safeMessages];
286803
286910
  this.hasEvictedMessages = this.cachedConversation.messages.length < this.messageOrder.length;
286804
286911
  } else {
286805
286912
  this.hasEvictedMessages = false;
@@ -287106,12 +287213,30 @@ var ChatRecordingService = class {
287106
287213
  * session with a real user prompt, model response, or tool activity.
287107
287214
  */
287108
287215
  async deleteCurrentSessionIfNotResumableAsync() {
287109
- if (!this.conversationFile || !this.cachedConversation) {
287216
+ if (this.initializationPromise) {
287217
+ try {
287218
+ await this.initializationPromise;
287219
+ } catch {
287220
+ }
287221
+ }
287222
+ if (this.isResumedSession) {
287223
+ return;
287224
+ }
287225
+ if (!this.conversationFile) {
287110
287226
  return;
287111
287227
  }
287112
- if (hasResumableConversationContent(this.cachedConversation.messages) || Array.from(this.messageMetaMap.values()).some((m) => m.isResumable)) {
287228
+ if (this.cachedConversation && hasResumableConversationContent(this.cachedConversation.messages ?? []) || Array.from(this.messageMetaMap.values()).some((m) => m.isResumable)) {
287113
287229
  return;
287114
287230
  }
287231
+ if (fs32.existsSync(this.conversationFile)) {
287232
+ try {
287233
+ const fileRecord = await loadConversationRecord(this.conversationFile);
287234
+ if (fileRecord && (fileRecord.hasResumableContent || hasResumableConversationContent(fileRecord.messages ?? []))) {
287235
+ return;
287236
+ }
287237
+ } catch {
287238
+ }
287239
+ }
287115
287240
  await this.deleteCurrentSessionAsync();
287116
287241
  }
287117
287242
  /**
@@ -307310,7 +307435,7 @@ function getVersion() {
307310
307435
  }
307311
307436
  versionPromise = (async () => {
307312
307437
  const pkgJson = await getPackageJson(__dirname4);
307313
- return "0.64.0-preview.0";
307438
+ return "0.65.0-nightly.20261007.gef59c532f";
307314
307439
  })();
307315
307440
  return versionPromise;
307316
307441
  }
@@ -341235,7 +341360,13 @@ var OAuthUtils = class {
341235
341360
  issuer: metadata2.issuer,
341236
341361
  tokenUrl: metadata2.token_endpoint,
341237
341362
  scopes: metadata2.scopes_supported || [],
341238
- registrationUrl: metadata2.registration_endpoint
341363
+ registrationUrl: metadata2.registration_endpoint,
341364
+ // RFC 9207 Section 3: the flag defaults to false when omitted. Discovered
341365
+ // configurations therefore always carry an explicit boolean, which lets
341366
+ // the callback policy distinguish them from an explicitly configured issuer.
341367
+ // Only a literal boolean `true` enables the flag, so loosely typed values
341368
+ // returned by some servers (e.g. "false" or "0") are not coerced to true.
341369
+ authorizationResponseIssParameterSupported: metadata2.authorization_response_iss_parameter_supported === true
341239
341370
  };
341240
341371
  }
341241
341372
  /**
@@ -341559,7 +341690,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
341559
341690
  return provider;
341560
341691
  }
341561
341692
  case "oauth2": {
341562
- const { OAuth2AuthProvider } = await import("./oauth2-provider-FVTRRJZR.js");
341693
+ const { OAuth2AuthProvider } = await import("./oauth2-provider-IUYZ2A7H.js");
341563
341694
  const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
341564
341695
  await provider.initialize();
341565
341696
  return provider;
@@ -369889,7 +370020,7 @@ function areIssuersEqual(issuerA, issuerB) {
369889
370020
  }
369890
370021
  return normA === normB;
369891
370022
  }
369892
- function startCallbackServer(expectedState, port, expectedIssuer) {
370023
+ function startCallbackServer(expectedState, port, expectedIssuer, requireIssInResponse) {
369893
370024
  let portResolve;
369894
370025
  let portReject;
369895
370026
  const portPromise = new Promise((resolve29, reject) => {
@@ -369943,8 +370074,9 @@ function startCallbackServer(expectedState, port, expectedIssuer) {
369943
370074
  return;
369944
370075
  }
369945
370076
  if (expectedIssuer) {
369946
- if (!iss) {
369947
- debugLogger.error('OAuth callback rejected: Missing required "iss" parameter when an expected issuer is configured. Possible IdP mix-up attack (RFC 9207).');
370077
+ const requireIss = requireIssInResponse ?? true;
370078
+ if (requireIss && !iss) {
370079
+ debugLogger.error('OAuth callback rejected: Missing required "iss" parameter for the expected authorization server (RFC 9207).');
369948
370080
  res.writeHead(400, { "Content-Type": "text/html" });
369949
370081
  res.end(`
369950
370082
  <html>
@@ -369959,7 +370091,7 @@ function startCallbackServer(expectedState, port, expectedIssuer) {
369959
370091
  reject(new Error('Missing "iss" parameter in authorization response per RFC 9207'));
369960
370092
  return;
369961
370093
  }
369962
- if (!areIssuersEqual(iss, expectedIssuer)) {
370094
+ if (iss && !areIssuersEqual(iss, expectedIssuer)) {
369963
370095
  debugLogger.error("OAuth callback rejected: Issuer mismatch between authorization response and expected authorization server. Possible IdP mix-up attack (RFC 9207).");
369964
370096
  res.writeHead(400, { "Content-Type": "text/html" });
369965
370097
  res.end(`
@@ -369975,7 +370107,9 @@ function startCallbackServer(expectedState, port, expectedIssuer) {
369975
370107
  reject(new Error("Issuer mismatch in authorization response - possible OAuth mix-up attack"));
369976
370108
  return;
369977
370109
  }
369978
- debugLogger.debug("\u2713 OAuth callback issuer validated successfully.");
370110
+ if (iss) {
370111
+ debugLogger.debug("\u2713 OAuth callback issuer validated successfully.");
370112
+ }
369979
370113
  } else if (iss) {
369980
370114
  debugLogger.debug('OAuth callback received "iss" parameter (no expected issuer was configured).');
369981
370115
  }
@@ -370379,6 +370513,7 @@ var MCPOAuthProvider = class {
370379
370513
  issuer: discoveredConfig.issuer,
370380
370514
  tokenUrl: discoveredConfig.tokenUrl,
370381
370515
  scopes: config2.scopes || discoveredConfig.scopes || [],
370516
+ authorizationResponseIssParameterSupported: config2.authorizationResponseIssParameterSupported ?? discoveredConfig.authorizationResponseIssParameterSupported,
370382
370517
  // Preserve existing client credentials
370383
370518
  clientId: config2.clientId,
370384
370519
  clientSecret: config2.clientSecret
@@ -370402,6 +370537,7 @@ var MCPOAuthProvider = class {
370402
370537
  issuer: discoveredConfig.issuer,
370403
370538
  scopes: config2.scopes || discoveredConfig.scopes || [],
370404
370539
  registrationUrl: discoveredConfig.registrationUrl,
370540
+ authorizationResponseIssParameterSupported: config2.authorizationResponseIssParameterSupported ?? discoveredConfig.authorizationResponseIssParameterSupported,
370405
370541
  // Preserve existing client credentials
370406
370542
  clientId: config2.clientId,
370407
370543
  clientSecret: config2.clientSecret
@@ -370414,7 +370550,8 @@ var MCPOAuthProvider = class {
370414
370550
  const pkceParams = generatePKCEParams();
370415
370551
  const preferredPort = getPortFromUrl(config2.redirectUri);
370416
370552
  debugLogger.debug(`Starting callback server for "${serverName}" (expected issuer: ${config2.issuer || "none"})...`);
370417
- const callbackServer = startCallbackServer(pkceParams.state, preferredPort, config2.issuer);
370553
+ const requireIssInResponse = config2.authorizationResponseIssParameterSupported ?? Boolean(config2.issuer);
370554
+ const callbackServer = startCallbackServer(pkceParams.state, preferredPort, config2.issuer, requireIssInResponse);
370418
370555
  const redirectPort = await callbackServer.port;
370419
370556
  debugLogger.debug(`Callback server listening on port ${redirectPort}`);
370420
370557
  if (!config2.clientId) {
@@ -371163,7 +371300,8 @@ async function handleAutomaticOAuth(mcpServerName, mcpServerConfig, wwwAuthentic
371163
371300
  authorizationUrl: oauthConfig.authorizationUrl,
371164
371301
  issuer: oauthConfig.issuer,
371165
371302
  tokenUrl: oauthConfig.tokenUrl,
371166
- scopes: oauthConfig.scopes || []
371303
+ scopes: oauthConfig.scopes || [],
371304
+ authorizationResponseIssParameterSupported: mcpServerConfig.oauth?.authorizationResponseIssParameterSupported ?? oauthConfig.authorizationResponseIssParameterSupported
371167
371305
  };
371168
371306
  debugLogger.log(`Starting OAuth authentication for server '${mcpServerName}'...`);
371169
371307
  const authProvider = new MCPOAuthProvider(new MCPOAuthTokenStorage());
@@ -371707,7 +371845,8 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
371707
371845
  authorizationUrl: oauthConfig.authorizationUrl,
371708
371846
  issuer: oauthConfig.issuer,
371709
371847
  tokenUrl: oauthConfig.tokenUrl,
371710
- scopes: oauthConfig.scopes || []
371848
+ scopes: oauthConfig.scopes || [],
371849
+ authorizationResponseIssParameterSupported: mcpServerConfig.oauth?.authorizationResponseIssParameterSupported ?? oauthConfig.authorizationResponseIssParameterSupported
371711
371850
  };
371712
371851
  const authServerUrl = mcpServerConfig.httpUrl || mcpServerConfig.url;
371713
371852
  debugLogger.log(`Starting OAuth authentication for server '${mcpServerName}'...`);
@@ -5,7 +5,7 @@ import {
5
5
  isTelemetrySdkInitialized,
6
6
  resetBrowserSession,
7
7
  shutdownTelemetry
8
- } from "./chunk-6OFXOGEG.js";
8
+ } from "./chunk-JYWQ73Z5.js";
9
9
 
10
10
  // packages/cli/src/utils/cleanup.ts
11
11
  import { promises as fs } from "node:fs";
@@ -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
  checkExhaustive
4
- } from "./chunk-6OFXOGEG.js";
4
+ } from "./chunk-JYWQ73Z5.js";
5
5
  import {
6
6
  __commonJS,
7
7
  __toESM
@@ -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-ZOHM7BPT.js";
5
+ } from "./chunk-NUWDVBI7.js";
6
6
  import {
7
7
  AppEvent,
8
8
  appEvents
@@ -63,15 +63,15 @@ import {
63
63
  stripUnsafeCharacters,
64
64
  toCodePoints,
65
65
  validateCustomTheme
66
- } from "./chunk-HN74ORTP.js";
66
+ } from "./chunk-XOG2HJ3Y.js";
67
67
  import {
68
68
  isDevelopment
69
- } from "./chunk-VBVCLWLA.js";
69
+ } from "./chunk-WGJZZTZY.js";
70
70
  import {
71
71
  emptyIcon,
72
72
  mapCoreStatusToDisplayStatus,
73
73
  require_react
74
- } from "./chunk-NX7TO2DU.js";
74
+ } from "./chunk-NDVLWD4V.js";
75
75
  import {
76
76
  ALL_EDITORS,
77
77
  ApprovalMode,
@@ -252,7 +252,7 @@ import {
252
252
  tokenLimit,
253
253
  uiTelemetryService,
254
254
  unescapePath
255
- } from "./chunk-ZQW7OGUO.js";
255
+ } from "./chunk-6FH32SR7.js";
256
256
  import {
257
257
  require_src
258
258
  } from "./chunk-L6PII3GR.js";
@@ -77764,7 +77764,7 @@ var authCommand = {
77764
77764
  import process29 from "node:process";
77765
77765
 
77766
77766
  // packages/cli/src/generated/git-commit.ts
77767
- var GIT_COMMIT_INFO = "fdf63956c";
77767
+ var GIT_COMMIT_INFO = "3f70412f0";
77768
77768
 
77769
77769
  // packages/cli/src/ui/utils/historyExportUtils.ts
77770
77770
  import * as fsPromises from "node:fs/promises";
@@ -80895,18 +80895,22 @@ var import_react71 = __toESM(require_react(), 1);
80895
80895
  import process33 from "node:process";
80896
80896
  var import_jsx_runtime24 = __toESM(require_jsx_runtime(), 1);
80897
80897
  var MemoryUsageDisplay = ({ color = theme.text.primary, isActive = true }) => {
80898
- const [memoryUsage, setMemoryUsage] = (0, import_react71.useState)("");
80899
- const [memoryUsageColor, setMemoryUsageColor] = (0, import_react71.useState)(color);
80898
+ const [memoryUsage, setMemoryUsage] = (0, import_react71.useState)(
80899
+ () => formatBytes(process33.memoryUsage().rss)
80900
+ );
80901
+ const [memoryUsageColor, setMemoryUsageColor] = (0, import_react71.useState)(
80902
+ () => process33.memoryUsage().rss >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color
80903
+ );
80900
80904
  (0, import_react71.useEffect)(() => {
80901
80905
  if (!isActive) {
80902
80906
  return;
80903
80907
  }
80904
80908
  const updateMemory = () => {
80905
80909
  const usage = process33.memoryUsage().rss;
80906
- setMemoryUsage(formatBytes(usage));
80907
- setMemoryUsageColor(
80908
- usage >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color
80909
- );
80910
+ const formatted = formatBytes(usage);
80911
+ const nextColor = usage >= 2 * 1024 * 1024 * 1024 ? theme.status.error : color;
80912
+ setMemoryUsage((prev) => prev === formatted ? prev : formatted);
80913
+ setMemoryUsageColor((prev) => prev === nextColor ? prev : nextColor);
80910
80914
  };
80911
80915
  const intervalId = setInterval(updateMemory, 2e3);
80912
80916
  updateMemory();
@@ -81400,7 +81404,13 @@ var Footer = () => {
81400
81404
  addCol(
81401
81405
  id,
81402
81406
  header,
81403
- () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MemoryUsageDisplay, { color: itemColor, isActive: !copyModeEnabled }),
81407
+ () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
81408
+ MemoryUsageDisplay,
81409
+ {
81410
+ color: itemColor,
81411
+ isActive: !copyModeEnabled && uiState.constrainHeight
81412
+ }
81413
+ ),
81404
81414
  10
81405
81415
  );
81406
81416
  break;
@@ -83545,7 +83555,7 @@ Use /mcp auth <server-name> to authenticate.`
83545
83555
  type: "info",
83546
83556
  text: `Starting OAuth authentication for MCP server '${serverName}'...`
83547
83557
  });
83548
- const { MCPOAuthProvider } = await import("./dist-7L3BRW6V.js");
83558
+ const { MCPOAuthProvider } = await import("./dist-Z23CJKTC.js");
83549
83559
  let oauthConfig = server.oauth;
83550
83560
  if (!oauthConfig) {
83551
83561
  oauthConfig = { enabled: false };
@@ -97502,10 +97512,16 @@ var MaxSizedBox = ({
97502
97512
  (0, import_react79.useEffect)(() => {
97503
97513
  if (totalHiddenLines > 0) {
97504
97514
  addOverflowingId?.(id);
97505
- } else {
97515
+ } else if (effectiveMaxHeight !== void 0) {
97506
97516
  removeOverflowingId?.(id);
97507
97517
  }
97508
- }, [id, totalHiddenLines, addOverflowingId, removeOverflowingId]);
97518
+ }, [
97519
+ id,
97520
+ totalHiddenLines,
97521
+ effectiveMaxHeight,
97522
+ addOverflowingId,
97523
+ removeOverflowingId
97524
+ ]);
97509
97525
  (0, import_react79.useEffect)(
97510
97526
  () => () => {
97511
97527
  removeOverflowingId?.(id);