@google/gemini-cli-a2a-server 0.65.0-nightly.20261013.g51617c1bc → 0.65.0-preview.0

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.
@@ -68341,9 +68341,10 @@ function detectBOM(buf) {
68341
68341
  return null;
68342
68342
  }
68343
68343
  function decodeUTF16BE(buf) {
68344
- if (buf.length === 0)
68344
+ const usable = buf.length - buf.length % 2;
68345
+ if (usable === 0)
68345
68346
  return "";
68346
- const swapped = Buffer.from(buf);
68347
+ const swapped = Buffer.from(buf.subarray(0, usable));
68347
68348
  swapped.swap16();
68348
68349
  return swapped.toString("utf16le");
68349
68350
  }
@@ -68362,6 +68363,23 @@ function decodeUTF32(buf, littleEndian) {
68362
68363
  }
68363
68364
  return out2;
68364
68365
  }
68366
+ function decodeBOMContent(buffer, bom) {
68367
+ const content = buffer.subarray(bom.bomLength);
68368
+ switch (bom.encoding) {
68369
+ case "utf8":
68370
+ return content.toString("utf8");
68371
+ case "utf16le":
68372
+ return content.toString("utf16le");
68373
+ case "utf16be":
68374
+ return decodeUTF16BE(content);
68375
+ case "utf32le":
68376
+ return decodeUTF32(content, true);
68377
+ case "utf32be":
68378
+ return decodeUTF32(content, false);
68379
+ default:
68380
+ return content.toString("utf8");
68381
+ }
68382
+ }
68365
68383
  async function readSecureFileBuffer(filePath, expectedStats) {
68366
68384
  const initialStats = expectedStats ?? await fs10.promises.stat(filePath);
68367
68385
  let fileHandle;
@@ -68403,21 +68421,7 @@ async function readFileWithEncoding(filePath, expectedStats) {
68403
68421
  if (!bom) {
68404
68422
  return full.toString("utf8");
68405
68423
  }
68406
- const content = full.subarray(bom.bomLength);
68407
- switch (bom.encoding) {
68408
- case "utf8":
68409
- return content.toString("utf8");
68410
- case "utf16le":
68411
- return content.toString("utf16le");
68412
- case "utf16be":
68413
- return decodeUTF16BE(content);
68414
- case "utf32le":
68415
- return decodeUTF32(content, true);
68416
- case "utf32be":
68417
- return decodeUTF32(content, false);
68418
- default:
68419
- return content.toString("utf8");
68420
- }
68424
+ return decodeBOMContent(full, bom);
68421
68425
  }
68422
68426
  function getSpecificMimeType(filePath) {
68423
68427
  const lookedUpMime = index_lite_default.getType(filePath);
@@ -68492,7 +68496,7 @@ async function isEmpty(filePath) {
68492
68496
  position: 0
68493
68497
  });
68494
68498
  const bom = detectBOM(buffer);
68495
- const content = bom ? buffer.subarray(bom.bomLength).toString("utf8") : buffer.toString("utf8");
68499
+ const content = bom ? decodeBOMContent(buffer, bom) : buffer.toString("utf8");
68496
68500
  return content.trim().length === 0;
68497
68501
  } finally {
68498
68502
  await fd.close();
@@ -221364,8 +221368,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
221364
221368
  var init_git_commit = __esm({
221365
221369
  "packages/core/dist/src/generated/git-commit.js"() {
221366
221370
  "use strict";
221367
- GIT_COMMIT_INFO = "51617c1bc";
221368
- CLI_VERSION = "0.65.0-nightly.20261013.g51617c1bc";
221371
+ GIT_COMMIT_INFO = "204db94ae";
221372
+ CLI_VERSION = "0.65.0-preview.0";
221369
221373
  }
221370
221374
  });
221371
221375
 
@@ -337669,7 +337673,7 @@ function getVersion() {
337669
337673
  }
337670
337674
  versionPromise = (async () => {
337671
337675
  const pkgJson = await getPackageJson(__dirname4);
337672
- return "0.65.0-nightly.20261013.g51617c1bc";
337676
+ return "0.65.0-preview.0";
337673
337677
  })();
337674
337678
  return versionPromise;
337675
337679
  }