@google/gemini-cli-a2a-server 0.33.0-preview.0 → 0.34.0-nightly.20260304.28af4e127

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.
@@ -60623,10 +60623,10 @@ var require_universalify2 = __commonJS({
60623
60623
  // node_modules/jsonfile/utils.js
60624
60624
  var require_utils6 = __commonJS({
60625
60625
  "node_modules/jsonfile/utils.js"(exports2, module2) {
60626
- function stringify5(obj, { EOL: EOL3 = "\n", finalEOL = true, replacer = null, spaces } = {}) {
60627
- const EOF3 = finalEOL ? EOL3 : "";
60626
+ function stringify5(obj, { EOL: EOL2 = "\n", finalEOL = true, replacer = null, spaces } = {}) {
60627
+ const EOF3 = finalEOL ? EOL2 : "";
60628
60628
  const str2 = JSON.stringify(obj, replacer, spaces);
60629
- return str2.replace(/\n/g, EOL3) + EOF3;
60629
+ return str2.replace(/\n/g, EOL2) + EOF3;
60630
60630
  }
60631
60631
  function stripBom(content) {
60632
60632
  if (Buffer.isBuffer(content)) content = content.toString("utf8");
@@ -214180,8 +214180,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
214180
214180
  var init_git_commit = __esm({
214181
214181
  "packages/core/dist/src/generated/git-commit.js"() {
214182
214182
  "use strict";
214183
- GIT_COMMIT_INFO = "34f0c1538";
214184
- CLI_VERSION = "0.33.0-preview.0";
214183
+ GIT_COMMIT_INFO = "28af4e127";
214184
+ CLI_VERSION = "0.34.0-nightly.20260304.28af4e127";
214185
214185
  }
214186
214186
  });
214187
214187
 
@@ -291439,7 +291439,7 @@ function getVersion() {
291439
291439
  }
291440
291440
  versionPromise = (async () => {
291441
291441
  const pkgJson = await getPackageJson(__dirname3);
291442
- return "0.33.0-preview.0";
291442
+ return "0.34.0-nightly.20260304.28af4e127";
291443
291443
  })();
291444
291444
  return versionPromise;
291445
291445
  }
@@ -379570,7 +379570,7 @@ var init_shellExecutionService = __esm({
379570
379570
  // packages/core/dist/src/tools/shell.js
379571
379571
  import fsPromises9 from "node:fs/promises";
379572
379572
  import path57 from "node:path";
379573
- import os21, { EOL as EOL2 } from "node:os";
379573
+ import os21 from "node:os";
379574
379574
  import crypto20 from "node:crypto";
379575
379575
  var OUTPUT_UPDATE_INTERVAL_MS, BACKGROUND_DELAY_MS, ShellToolInvocation, ShellTool;
379576
379576
  var init_shell2 = __esm({
@@ -379761,7 +379761,7 @@ var init_shell2 = __esm({
379761
379761
  }
379762
379762
  if (tempFileExists) {
379763
379763
  const pgrepContent = await fsPromises9.readFile(tempFilePath, "utf8");
379764
- const pgrepLines = pgrepContent.split(EOL2).filter(Boolean);
379764
+ const pgrepLines = pgrepContent.split(os21.EOL).filter(Boolean);
379765
379765
  for (const line of pgrepLines) {
379766
379766
  if (!/^\d+$/.test(line)) {
379767
379767
  debugLogger.error(`pgrep: ${line}`);
@@ -387813,7 +387813,6 @@ var init_coreToolScheduler = __esm({
387813
387813
  init_tool_utils();
387814
387814
  init_types4();
387815
387815
  init_types3();
387816
- init_types3();
387817
387816
  init_tool_executor();
387818
387817
  init_mcp_tool();
387819
387818
  init_policy();
@@ -388977,8 +388976,8 @@ var StreamEventType, INVALID_CONTENT_RETRY_OPTIONS, SYNTHETIC_THOUGHT_SIGNATURE,
388977
388976
  var init_geminiChat = __esm({
388978
388977
  "packages/core/dist/src/core/geminiChat.js"() {
388979
388978
  "use strict";
388980
- init_converter();
388981
388979
  init_node();
388980
+ init_converter();
388982
388981
  init_retry();
388983
388982
  init_models();
388984
388983
  init_tools();
@@ -389561,12 +389560,12 @@ var GeminiEventType, CompressionStatus, Turn;
389561
389560
  var init_turn = __esm({
389562
389561
  "packages/core/dist/src/core/turn.js"() {
389563
389562
  "use strict";
389563
+ init_node();
389564
389564
  init_partUtils();
389565
389565
  init_errorReporting();
389566
389566
  init_errors();
389567
389567
  init_geminiChat();
389568
389568
  init_thoughtUtils();
389569
- init_node();
389570
389569
  init_generateContentResponseUtilities();
389571
389570
  init_types6();
389572
389571
  init_types3();
@@ -402372,6 +402371,57 @@ var init_hooks = __esm({
402372
402371
  }
402373
402372
  });
402374
402373
 
402374
+ // packages/core/dist/src/code_assist/experiments/experiments.js
402375
+ import * as fs59 from "node:fs";
402376
+ async function getExperiments(server) {
402377
+ if (experimentsPromise) {
402378
+ return experimentsPromise;
402379
+ }
402380
+ experimentsPromise = (async () => {
402381
+ if (process.env["GEMINI_EXP"]) {
402382
+ try {
402383
+ const expPath = process.env["GEMINI_EXP"];
402384
+ debugLogger.debug("Reading experiments from", expPath);
402385
+ const content = await fs59.promises.readFile(expPath, "utf8");
402386
+ const response2 = JSON.parse(content);
402387
+ if (response2.flags && !Array.isArray(response2.flags) || response2.experimentIds && !Array.isArray(response2.experimentIds)) {
402388
+ throw new Error("Invalid format for experiments file: `flags` and `experimentIds` must be arrays if present.");
402389
+ }
402390
+ return parseExperiments(response2);
402391
+ } catch (e3) {
402392
+ debugLogger.debug("Failed to read experiments from GEMINI_EXP", e3);
402393
+ }
402394
+ }
402395
+ if (!server) {
402396
+ return { flags: {}, experimentIds: [] };
402397
+ }
402398
+ const metadata2 = await getClientMetadata();
402399
+ const response = await server.listExperiments(metadata2);
402400
+ return parseExperiments(response);
402401
+ })();
402402
+ return experimentsPromise;
402403
+ }
402404
+ function parseExperiments(response) {
402405
+ const flags2 = {};
402406
+ for (const flag of response.flags ?? []) {
402407
+ if (flag.flagId) {
402408
+ flags2[flag.flagId] = flag;
402409
+ }
402410
+ }
402411
+ return {
402412
+ flags: flags2,
402413
+ experimentIds: response.experimentIds ?? []
402414
+ };
402415
+ }
402416
+ var experimentsPromise;
402417
+ var init_experiments = __esm({
402418
+ "packages/core/dist/src/code_assist/experiments/experiments.js"() {
402419
+ "use strict";
402420
+ init_client_metadata();
402421
+ init_debugLogger();
402422
+ }
402423
+ });
402424
+
402375
402425
  // node_modules/js-yaml/dist/js-yaml.mjs
402376
402426
  function isNothing(subject) {
402377
402427
  return typeof subject === "undefined" || subject === null;
@@ -404985,7 +405035,7 @@ var init_types18 = __esm({
404985
405035
  });
404986
405036
 
404987
405037
  // packages/core/dist/src/skills/skillLoader.js
404988
- import * as fs59 from "node:fs/promises";
405038
+ import * as fs60 from "node:fs/promises";
404989
405039
  import * as path70 from "node:path";
404990
405040
  function parseFrontmatter(content) {
404991
405041
  try {
@@ -405037,7 +405087,7 @@ async function loadSkillsFromDir(dir) {
405037
405087
  const discoveredSkills = [];
405038
405088
  try {
405039
405089
  const absoluteSearchPath = path70.resolve(dir);
405040
- const stats = await fs59.stat(absoluteSearchPath).catch(() => null);
405090
+ const stats = await fs60.stat(absoluteSearchPath).catch(() => null);
405041
405091
  if (!stats || !stats.isDirectory()) {
405042
405092
  return [];
405043
405093
  }
@@ -405055,7 +405105,7 @@ async function loadSkillsFromDir(dir) {
405055
405105
  }
405056
405106
  }
405057
405107
  if (discoveredSkills.length === 0) {
405058
- const files = await fs59.readdir(absoluteSearchPath);
405108
+ const files = await fs60.readdir(absoluteSearchPath);
405059
405109
  if (files.length > 0) {
405060
405110
  debugLogger.debug(`Failed to load skills from ${absoluteSearchPath}. The directory is not empty but no valid skills were discovered. Please ensure SKILL.md files are present in subdirectories and have valid frontmatter.`);
405061
405111
  }
@@ -405067,7 +405117,7 @@ async function loadSkillsFromDir(dir) {
405067
405117
  }
405068
405118
  async function loadSkillFromFile(filePath) {
405069
405119
  try {
405070
- const content = await fs59.readFile(filePath, "utf-8");
405120
+ const content = await fs60.readFile(filePath, "utf-8");
405071
405121
  const match2 = content.match(FRONTMATTER_REGEX);
405072
405122
  if (!match2) {
405073
405123
  return null;
@@ -405101,7 +405151,7 @@ var init_skillLoader = __esm({
405101
405151
  });
405102
405152
 
405103
405153
  // packages/core/dist/src/agents/agentLoader.js
405104
- import * as fs60 from "node:fs/promises";
405154
+ import * as fs61 from "node:fs/promises";
405105
405155
  import * as path71 from "node:path";
405106
405156
  import * as crypto21 from "node:crypto";
405107
405157
  function formatZodError(error2, context2) {
@@ -405124,7 +405174,7 @@ async function parseAgentMarkdown(filePath, content) {
405124
405174
  fileContent = content;
405125
405175
  } else {
405126
405176
  try {
405127
- fileContent = await fs60.readFile(filePath, "utf-8");
405177
+ fileContent = await fs61.readFile(filePath, "utf-8");
405128
405178
  } catch (error2) {
405129
405179
  throw new AgentLoadError(filePath, `Could not read file: ${getErrorMessage(error2)}`);
405130
405180
  }
@@ -405296,7 +405346,7 @@ async function loadAgentsFromDirectory(dir) {
405296
405346
  };
405297
405347
  let dirEntries;
405298
405348
  try {
405299
- dirEntries = await fs60.readdir(dir, { withFileTypes: true });
405349
+ dirEntries = await fs61.readdir(dir, { withFileTypes: true });
405300
405350
  } catch (error2) {
405301
405351
  if (error2.code === "ENOENT") {
405302
405352
  return result2;
@@ -405312,7 +405362,7 @@ async function loadAgentsFromDirectory(dir) {
405312
405362
  for (const entry of files) {
405313
405363
  const filePath = path71.join(dir, entry.name);
405314
405364
  try {
405315
- const content = await fs60.readFile(filePath, "utf-8");
405365
+ const content = await fs61.readFile(filePath, "utf-8");
405316
405366
  const hash = crypto21.createHash("sha256").update(content).digest("hex");
405317
405367
  const agentDefs = await parseAgentMarkdown(filePath, content);
405318
405368
  for (const def of agentDefs) {
@@ -405434,7 +405484,7 @@ var init_agentLoader = __esm({
405434
405484
  });
405435
405485
 
405436
405486
  // packages/core/dist/src/tools/get-internal-docs.js
405437
- import fs61 from "node:fs/promises";
405487
+ import fs62 from "node:fs/promises";
405438
405488
  import path72 from "node:path";
405439
405489
  import { fileURLToPath as fileURLToPath13 } from "node:url";
405440
405490
  async function getDocsRoot() {
@@ -405442,10 +405492,10 @@ async function getDocsRoot() {
405442
405492
  let searchDir = path72.dirname(currentFile);
405443
405493
  const isDocsDir = async (dir) => {
405444
405494
  try {
405445
- const stats = await fs61.stat(dir);
405495
+ const stats = await fs62.stat(dir);
405446
405496
  if (stats.isDirectory()) {
405447
405497
  const marker = path72.join(dir, "sidebar.json");
405448
- await fs61.access(marker);
405498
+ await fs62.access(marker);
405449
405499
  return true;
405450
405500
  }
405451
405501
  } catch {
@@ -405507,7 +405557,7 @@ ${fileList}`;
405507
405557
  if (!resolvedPath.startsWith(docsRoot)) {
405508
405558
  throw new Error("Access denied: Requested path is outside the documentation directory.");
405509
405559
  }
405510
- const content = await fs61.readFile(resolvedPath, "utf8");
405560
+ const content = await fs62.readFile(resolvedPath, "utf8");
405511
405561
  return {
405512
405562
  llmContent: content,
405513
405563
  returnDisplay: `Successfully read documentation: ${this.params.path}`
@@ -406921,13 +406971,23 @@ var init_dist_node = __esm({
406921
406971
  });
406922
406972
 
406923
406973
  // packages/core/dist/src/agents/a2a-client-manager.js
406924
- var A2AClientManager;
406974
+ var import_undici3, A2A_TIMEOUT, a2aDispatcher, a2aFetch, A2AClientManager;
406925
406975
  var init_a2a_client_manager = __esm({
406926
406976
  "packages/core/dist/src/agents/a2a-client-manager.js"() {
406927
406977
  "use strict";
406928
406978
  init_client4();
406929
406979
  init_dist_node();
406980
+ import_undici3 = __toESM(require_undici(), 1);
406930
406981
  init_debugLogger();
406982
+ A2A_TIMEOUT = 18e5;
406983
+ a2aDispatcher = new import_undici3.Agent({
406984
+ headersTimeout: A2A_TIMEOUT,
406985
+ bodyTimeout: A2A_TIMEOUT
406986
+ });
406987
+ a2aFetch = (input, init3) => (
406988
+ // @ts-expect-error The `dispatcher` property is a Node.js extension to fetch not present in standard types.
406989
+ fetch(input, { ...init3, dispatcher: a2aDispatcher })
406990
+ );
406931
406991
  A2AClientManager = class _A2AClientManager {
406932
406992
  static instance;
406933
406993
  // Each agent should manage their own context/taskIds/card/etc
@@ -406962,9 +407022,9 @@ var init_a2a_client_manager = __esm({
406962
407022
  if (this.clients.has(name4) && this.agentCards.has(name4)) {
406963
407023
  throw new Error(`Agent with name '${name4}' is already loaded.`);
406964
407024
  }
406965
- let fetchImpl = fetch;
407025
+ let fetchImpl = a2aFetch;
406966
407026
  if (authHandler) {
406967
- fetchImpl = createAuthenticatingFetchWithRetry(fetch, authHandler);
407027
+ fetchImpl = createAuthenticatingFetchWithRetry(a2aFetch, authHandler);
406968
407028
  }
406969
407029
  const resolver = new DefaultAgentCardResolver({ fetchImpl });
406970
407030
  const options = ClientFactoryOptions.createFrom(ClientFactoryOptions.default, {
@@ -407831,7 +407891,7 @@ ${skillsList}`);
407831
407891
  });
407832
407892
 
407833
407893
  // packages/core/dist/src/agents/acknowledgedAgents.js
407834
- import * as fs62 from "node:fs/promises";
407894
+ import * as fs63 from "node:fs/promises";
407835
407895
  import * as path73 from "node:path";
407836
407896
  var AcknowledgedAgentsService;
407837
407897
  var init_acknowledgedAgents = __esm({
@@ -407848,7 +407908,7 @@ var init_acknowledgedAgents = __esm({
407848
407908
  return;
407849
407909
  const filePath = Storage2.getAcknowledgedAgentsPath();
407850
407910
  try {
407851
- const content = await fs62.readFile(filePath, "utf-8");
407911
+ const content = await fs63.readFile(filePath, "utf-8");
407852
407912
  this.acknowledgedAgents = JSON.parse(content);
407853
407913
  } catch (error2) {
407854
407914
  if (!isNodeError(error2) || error2.code !== "ENOENT") {
@@ -407862,8 +407922,8 @@ var init_acknowledgedAgents = __esm({
407862
407922
  const filePath = Storage2.getAcknowledgedAgentsPath();
407863
407923
  try {
407864
407924
  const dir = path73.dirname(filePath);
407865
- await fs62.mkdir(dir, { recursive: true });
407866
- await fs62.writeFile(filePath, JSON.stringify(this.acknowledgedAgents, null, 2), "utf-8");
407925
+ await fs63.mkdir(dir, { recursive: true });
407926
+ await fs63.writeFile(filePath, JSON.stringify(this.acknowledgedAgents, null, 2), "utf-8");
407867
407927
  } catch (error2) {
407868
407928
  debugLogger.error("Failed to save acknowledged agents:", getErrorMessage(error2));
407869
407929
  }
@@ -411502,57 +411562,6 @@ ${query}`
411502
411562
  }
411503
411563
  });
411504
411564
 
411505
- // packages/core/dist/src/code_assist/experiments/experiments.js
411506
- import * as fs63 from "node:fs";
411507
- async function getExperiments(server) {
411508
- if (experimentsPromise) {
411509
- return experimentsPromise;
411510
- }
411511
- experimentsPromise = (async () => {
411512
- if (process.env["GEMINI_EXP"]) {
411513
- try {
411514
- const expPath = process.env["GEMINI_EXP"];
411515
- debugLogger.debug("Reading experiments from", expPath);
411516
- const content = await fs63.promises.readFile(expPath, "utf8");
411517
- const response2 = JSON.parse(content);
411518
- if (response2.flags && !Array.isArray(response2.flags) || response2.experimentIds && !Array.isArray(response2.experimentIds)) {
411519
- throw new Error("Invalid format for experiments file: `flags` and `experimentIds` must be arrays if present.");
411520
- }
411521
- return parseExperiments(response2);
411522
- } catch (e3) {
411523
- debugLogger.debug("Failed to read experiments from GEMINI_EXP", e3);
411524
- }
411525
- }
411526
- if (!server) {
411527
- return { flags: {}, experimentIds: [] };
411528
- }
411529
- const metadata2 = await getClientMetadata();
411530
- const response = await server.listExperiments(metadata2);
411531
- return parseExperiments(response);
411532
- })();
411533
- return experimentsPromise;
411534
- }
411535
- function parseExperiments(response) {
411536
- const flags2 = {};
411537
- for (const flag of response.flags ?? []) {
411538
- if (flag.flagId) {
411539
- flags2[flag.flagId] = flag;
411540
- }
411541
- }
411542
- return {
411543
- flags: flags2,
411544
- experimentIds: response.experimentIds ?? []
411545
- };
411546
- }
411547
- var experimentsPromise;
411548
- var init_experiments = __esm({
411549
- "packages/core/dist/src/code_assist/experiments/experiments.js"() {
411550
- "use strict";
411551
- init_client_metadata();
411552
- init_debugLogger();
411553
- }
411554
- });
411555
-
411556
411565
  // packages/core/dist/src/code_assist/experiments/flagNames.js
411557
411566
  var ExperimentFlags;
411558
411567
  var init_flagNames = __esm({
@@ -418897,11 +418906,11 @@ var init_config4 = __esm({
418897
418906
  init_types2();
418898
418907
  init_hooks();
418899
418908
  init_codeAssist();
418909
+ init_experiments();
418900
418910
  init_registry();
418901
418911
  init_acknowledgedAgents();
418902
418912
  init_fetch();
418903
418913
  init_subagent_tool();
418904
- init_experiments();
418905
418914
  init_flagNames();
418906
418915
  init_debugLogger();
418907
418916
  init_skillManager();