@google/gemini-cli-a2a-server 0.27.0-preview.5 → 0.27.0-preview.7

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.
@@ -65338,7 +65338,7 @@ var require_gaxios2 = __commonJS({
65338
65338
  var retry_js_1 = require_retry4();
65339
65339
  var stream_1 = __require("stream");
65340
65340
  var interceptor_js_1 = require_interceptor2();
65341
- var randomUUID11 = async () => globalThis.crypto?.randomUUID() || (await import("crypto")).randomUUID();
65341
+ var randomUUID10 = async () => globalThis.crypto?.randomUUID() || (await import("crypto")).randomUUID();
65342
65342
  var HTTP_STATUS_NO_CONTENT = 204;
65343
65343
  var Gaxios = class {
65344
65344
  agentCache = /* @__PURE__ */ new Map();
@@ -65611,7 +65611,7 @@ var require_gaxios2 = __commonJS({
65611
65611
  */
65612
65612
  ["Blob", "File", "FormData"].includes(opts.data?.constructor?.name || "");
65613
65613
  if (opts.multipart?.length) {
65614
- const boundary = await randomUUID11();
65614
+ const boundary = await randomUUID10();
65615
65615
  preparedHeaders.set("content-type", `multipart/related; boundary=${boundary}`);
65616
65616
  opts.body = stream_1.Readable.from(this.getMultipartRequest(opts.multipart, boundary));
65617
65617
  } else if (shouldDirectlyPassData) {
@@ -92076,7 +92076,7 @@ function isValidToolName(name4, options = {}) {
92076
92076
  }
92077
92077
  return false;
92078
92078
  }
92079
- var GLOB_TOOL_NAME, WRITE_TODOS_TOOL_NAME, WRITE_FILE_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WEB_FETCH_TOOL_NAME, EDIT_TOOL_NAME, SHELL_TOOL_NAME, GREP_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, READ_FILE_TOOL_NAME, LS_TOOL_NAME, MEMORY_TOOL_NAME, GET_INTERNAL_DOCS_TOOL_NAME, ACTIVATE_SKILL_TOOL_NAME, EDIT_TOOL_NAMES, ASK_USER_TOOL_NAME, ASK_USER_DISPLAY_NAME, DISCOVERED_TOOL_PREFIX, ALL_BUILTIN_TOOL_NAMES, PLAN_MODE_TOOLS;
92079
+ var GLOB_TOOL_NAME, WRITE_TODOS_TOOL_NAME, WRITE_FILE_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WEB_FETCH_TOOL_NAME, EDIT_TOOL_NAME, SHELL_TOOL_NAME, GREP_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, READ_FILE_TOOL_NAME, LS_TOOL_NAME, MEMORY_TOOL_NAME, GET_INTERNAL_DOCS_TOOL_NAME, ACTIVATE_SKILL_TOOL_NAME, EDIT_TOOL_NAMES, DISCOVERED_TOOL_PREFIX, ALL_BUILTIN_TOOL_NAMES, PLAN_MODE_TOOLS;
92080
92080
  var init_tool_names = __esm({
92081
92081
  "packages/core/dist/src/tools/tool-names.js"() {
92082
92082
  "use strict";
@@ -92095,8 +92095,6 @@ var init_tool_names = __esm({
92095
92095
  GET_INTERNAL_DOCS_TOOL_NAME = "get_internal_docs";
92096
92096
  ACTIVATE_SKILL_TOOL_NAME = "activate_skill";
92097
92097
  EDIT_TOOL_NAMES = /* @__PURE__ */ new Set([EDIT_TOOL_NAME, WRITE_FILE_TOOL_NAME]);
92098
- ASK_USER_TOOL_NAME = "ask_user";
92099
- ASK_USER_DISPLAY_NAME = "Ask User";
92100
92098
  DISCOVERED_TOOL_PREFIX = "discovered_tool_";
92101
92099
  ALL_BUILTIN_TOOL_NAMES = [
92102
92100
  GLOB_TOOL_NAME,
@@ -92111,16 +92109,14 @@ var init_tool_names = __esm({
92111
92109
  READ_FILE_TOOL_NAME,
92112
92110
  LS_TOOL_NAME,
92113
92111
  MEMORY_TOOL_NAME,
92114
- ACTIVATE_SKILL_TOOL_NAME,
92115
- ASK_USER_TOOL_NAME
92112
+ ACTIVATE_SKILL_TOOL_NAME
92116
92113
  ];
92117
92114
  PLAN_MODE_TOOLS = [
92118
92115
  GLOB_TOOL_NAME,
92119
92116
  GREP_TOOL_NAME,
92120
92117
  READ_FILE_TOOL_NAME,
92121
92118
  LS_TOOL_NAME,
92122
- WEB_SEARCH_TOOL_NAME,
92123
- ASK_USER_TOOL_NAME
92119
+ WEB_SEARCH_TOOL_NAME
92124
92120
  ];
92125
92121
  }
92126
92122
  });
@@ -326597,7 +326593,7 @@ var __filename = fileURLToPath5(import.meta.url);
326597
326593
  var __dirname3 = path20.dirname(__filename);
326598
326594
  async function getVersion() {
326599
326595
  const pkgJson = await getPackageJson(__dirname3);
326600
- return "0.27.0-preview.5";
326596
+ return "0.27.0-preview.7";
326601
326597
  }
326602
326598
 
326603
326599
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -330013,8 +330009,8 @@ var Float64Vector = import_vector.default.Float64Vector;
330013
330009
  var PointerVector = import_vector.default.PointerVector;
330014
330010
 
330015
330011
  // packages/core/dist/src/generated/git-commit.js
330016
- var GIT_COMMIT_INFO = "f55b52ab5";
330017
- var CLI_VERSION = "0.27.0-preview.5";
330012
+ var GIT_COMMIT_INFO = "7fe17b5da";
330013
+ var CLI_VERSION = "0.27.0-preview.7";
330018
330014
 
330019
330015
  // packages/core/dist/src/ide/detect-ide.js
330020
330016
  var IDE_DEFINITIONS = {
@@ -371965,8 +371961,9 @@ function delay2(ms, signal) {
371965
371961
 
371966
371962
  // packages/core/dist/src/utils/retry.js
371967
371963
  init_debugLogger();
371964
+ var DEFAULT_MAX_ATTEMPTS = 3;
371968
371965
  var DEFAULT_RETRY_OPTIONS = {
371969
- maxAttempts: 3,
371966
+ maxAttempts: DEFAULT_MAX_ATTEMPTS,
371970
371967
  initialDelayMs: 5e3,
371971
371968
  maxDelayMs: 3e4,
371972
371969
  // 30 seconds
@@ -372173,7 +372170,7 @@ function logRetryAttempt(attempt, error2, errorStatus) {
372173
372170
  }
372174
372171
 
372175
372172
  // packages/core/dist/src/core/baseLlmClient.js
372176
- var DEFAULT_MAX_ATTEMPTS = 5;
372173
+ var DEFAULT_MAX_ATTEMPTS2 = 5;
372177
372174
  var BaseLlmClient = class {
372178
372175
  contentGenerator;
372179
372176
  config;
@@ -372291,7 +372288,7 @@ var BaseLlmClient = class {
372291
372288
  };
372292
372289
  return await retryWithBackoff(apiCall, {
372293
372290
  shouldRetryOnContent,
372294
- maxAttempts: availabilityMaxAttempts ?? maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
372291
+ maxAttempts: availabilityMaxAttempts ?? maxAttempts ?? DEFAULT_MAX_ATTEMPTS2,
372295
372292
  getAvailabilityContext,
372296
372293
  onPersistent429: this.config.isInteractive() ? (authType, error2) => handleFallback(this.config, currentModel, authType, error2) : void 0,
372297
372294
  authType: this.authType ?? this.config.getContentGeneratorConfig()?.authType
@@ -380968,177 +380965,6 @@ var WebSearchTool = class _WebSearchTool extends BaseDeclarativeTool {
380968
380965
  }
380969
380966
  };
380970
380967
 
380971
- // packages/core/dist/src/tools/ask-user.js
380972
- init_tools();
380973
- init_types();
380974
- init_tool_names();
380975
- import { randomUUID as randomUUID5 } from "node:crypto";
380976
- var AskUserTool = class extends BaseDeclarativeTool {
380977
- constructor(messageBus) {
380978
- super(ASK_USER_TOOL_NAME, ASK_USER_DISPLAY_NAME, "Ask the user one or more questions to gather preferences, clarify requirements, or make decisions.", Kind.Communicate, {
380979
- type: "object",
380980
- required: ["questions"],
380981
- properties: {
380982
- questions: {
380983
- type: "array",
380984
- minItems: 1,
380985
- maxItems: 4,
380986
- items: {
380987
- type: "object",
380988
- required: ["question", "header"],
380989
- properties: {
380990
- question: {
380991
- type: "string",
380992
- description: "The complete question to ask the user. Should be clear, specific, and end with a question mark."
380993
- },
380994
- header: {
380995
- type: "string",
380996
- maxLength: 12,
380997
- description: 'Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".'
380998
- },
380999
- type: {
381000
- type: "string",
381001
- enum: ["choice", "text", "yesno"],
381002
- default: "choice",
381003
- description: "Question type: 'choice' (default) for multiple-choice with options, 'text' for free-form input, 'yesno' for Yes/No confirmation."
381004
- },
381005
- options: {
381006
- type: "array",
381007
- description: "The selectable choices for 'choice' type questions. Provide 2-4 options. An 'Other' option is automatically added. Not needed for 'text' or 'yesno' types.",
381008
- items: {
381009
- type: "object",
381010
- required: ["label", "description"],
381011
- properties: {
381012
- label: {
381013
- type: "string",
381014
- description: 'The display text for this option (1-5 words). Example: "OAuth 2.0"'
381015
- },
381016
- description: {
381017
- type: "string",
381018
- description: 'Brief explanation of this option. Example: "Industry standard, supports SSO"'
381019
- }
381020
- }
381021
- }
381022
- },
381023
- multiSelect: {
381024
- type: "boolean",
381025
- description: "Only applies when type='choice'. Set to true to allow selecting multiple options."
381026
- },
381027
- placeholder: {
381028
- type: "string",
381029
- description: "Only applies when type='text'. Hint text shown in the input field."
381030
- }
381031
- }
381032
- }
381033
- }
381034
- }
381035
- }, messageBus);
381036
- }
381037
- validateToolParamValues(params) {
381038
- if (!params.questions || params.questions.length === 0) {
381039
- return "At least one question is required.";
381040
- }
381041
- for (let i4 = 0; i4 < params.questions.length; i4++) {
381042
- const q = params.questions[i4];
381043
- const questionType = q.type ?? QuestionType.CHOICE;
381044
- if (questionType === QuestionType.CHOICE) {
381045
- if (!q.options || q.options.length < 2) {
381046
- return `Question ${i4 + 1}: type='choice' requires 'options' array with 2-4 items.`;
381047
- }
381048
- if (q.options.length > 4) {
381049
- return `Question ${i4 + 1}: 'options' array must have at most 4 items.`;
381050
- }
381051
- }
381052
- if (q.options) {
381053
- for (let j = 0; j < q.options.length; j++) {
381054
- const opt = q.options[j];
381055
- if (!opt.label || typeof opt.label !== "string" || !opt.label.trim()) {
381056
- return `Question ${i4 + 1}, option ${j + 1}: 'label' is required and must be a non-empty string.`;
381057
- }
381058
- if (opt.description === void 0 || typeof opt.description !== "string") {
381059
- return `Question ${i4 + 1}, option ${j + 1}: 'description' is required and must be a string.`;
381060
- }
381061
- }
381062
- }
381063
- }
381064
- return null;
381065
- }
381066
- createInvocation(params, messageBus, toolName, toolDisplayName) {
381067
- return new AskUserInvocation(params, messageBus, toolName, toolDisplayName);
381068
- }
381069
- };
381070
- var AskUserInvocation = class extends BaseToolInvocation {
381071
- async shouldConfirmExecute(_abortSignal) {
381072
- return false;
381073
- }
381074
- getDescription() {
381075
- return `Asking user: ${this.params.questions.map((q) => q.question).join(", ")}`;
381076
- }
381077
- async execute(signal) {
381078
- const correlationId = randomUUID5();
381079
- const request3 = {
381080
- type: MessageBusType.ASK_USER_REQUEST,
381081
- questions: this.params.questions.map((q) => ({
381082
- ...q,
381083
- type: q.type ?? QuestionType.CHOICE
381084
- })),
381085
- correlationId
381086
- };
381087
- return new Promise((resolve15, reject) => {
381088
- const responseHandler = (response) => {
381089
- if (response.correlationId === correlationId) {
381090
- cleanup();
381091
- if (response.cancelled) {
381092
- resolve15({
381093
- llmContent: "User dismissed ask user dialog without answering.",
381094
- returnDisplay: "User dismissed dialog"
381095
- });
381096
- return;
381097
- }
381098
- const answerEntries = Object.entries(response.answers);
381099
- const hasAnswers = answerEntries.length > 0;
381100
- const returnDisplay = hasAnswers ? `**User answered:**
381101
- ${answerEntries.map(([index, answer]) => {
381102
- const question = this.params.questions[parseInt(index, 10)];
381103
- const category = question?.header ?? `Q${index}`;
381104
- return ` ${category} \u2192 ${answer}`;
381105
- }).join("\n")}` : "User submitted without answering questions.";
381106
- resolve15({
381107
- llmContent: JSON.stringify({ answers: response.answers }),
381108
- returnDisplay
381109
- });
381110
- }
381111
- };
381112
- const cleanup = () => {
381113
- if (responseHandler) {
381114
- this.messageBus.unsubscribe(MessageBusType.ASK_USER_RESPONSE, responseHandler);
381115
- }
381116
- signal.removeEventListener("abort", abortHandler);
381117
- };
381118
- const abortHandler = () => {
381119
- cleanup();
381120
- resolve15({
381121
- llmContent: "Tool execution cancelled by user.",
381122
- returnDisplay: "Cancelled",
381123
- error: {
381124
- message: "Cancelled"
381125
- }
381126
- });
381127
- };
381128
- if (signal.aborted) {
381129
- abortHandler();
381130
- return;
381131
- }
381132
- signal.addEventListener("abort", abortHandler);
381133
- this.messageBus.subscribe(MessageBusType.ASK_USER_RESPONSE, responseHandler);
381134
- this.messageBus.publish(request3).catch((err2) => {
381135
- cleanup();
381136
- reject(err2);
381137
- });
381138
- });
381139
- }
381140
- };
381141
-
381142
380968
  // packages/core/dist/src/core/client.js
381143
380969
  init_node();
381144
380970
 
@@ -382589,7 +382415,7 @@ init_paths();
382589
382415
  init_debugLogger();
382590
382416
  import path56 from "node:path";
382591
382417
  import fs49 from "node:fs";
382592
- import { randomUUID as randomUUID6 } from "node:crypto";
382418
+ import { randomUUID as randomUUID5 } from "node:crypto";
382593
382419
  var SESSION_FILE_PREFIX = "session-";
382594
382420
  var ENOSPC_WARNING_MESSAGE = "Chat recording disabled: No space left on device. The conversation will continue but will not be saved to disk. Free up disk space and restart to enable recording.";
382595
382421
  var ChatRecordingService = class {
@@ -382649,7 +382475,7 @@ var ChatRecordingService = class {
382649
382475
  }
382650
382476
  newMessage(type2, content) {
382651
382477
  return {
382652
- id: randomUUID6(),
382478
+ id: randomUUID5(),
382653
382479
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
382654
382480
  type: type2,
382655
382481
  content
@@ -383327,7 +383153,7 @@ var GeminiChat = class {
383327
383153
  onRetry: (attempt, error2, delayMs) => {
383328
383154
  coreEvents.emitRetryAttempt({
383329
383155
  attempt,
383330
- maxAttempts: availabilityMaxAttempts ?? 10,
383156
+ maxAttempts: availabilityMaxAttempts ?? DEFAULT_MAX_ATTEMPTS,
383331
383157
  delayMs,
383332
383158
  error: error2 instanceof Error ? error2.message : String(error2),
383333
383159
  model: lastModelToUse
@@ -383988,8 +383814,6 @@ ${options.planModeToolsList}
383988
383814
 
383989
383815
  ### Phase 1: Requirements Understanding
383990
383816
  - Analyze the user's request to identify core requirements and constraints
383991
- - If critical information is missing or ambiguous, ask clarifying questions using the \`${ASK_USER_TOOL_NAME}\` tool
383992
- - When using \`${ASK_USER_TOOL_NAME}\`, prefer providing multiple-choice options for the user to select from when possible
383993
383817
  - Do NOT explore the project or create a plan yet
383994
383818
 
383995
383819
  ### Phase 2: Project Exploration
@@ -391878,7 +391702,7 @@ var WorkspaceContext = class {
391878
391702
  init_storage();
391879
391703
 
391880
391704
  // packages/core/dist/src/confirmation-bus/message-bus.js
391881
- import { randomUUID as randomUUID7 } from "node:crypto";
391705
+ import { randomUUID as randomUUID6 } from "node:crypto";
391882
391706
  import { EventEmitter as EventEmitter10 } from "node:events";
391883
391707
  init_types();
391884
391708
  init_debugLogger();
@@ -391957,7 +391781,7 @@ var MessageBus = class extends EventEmitter10 {
391957
391781
  * The correlation ID is generated internally and added to the request
391958
391782
  */
391959
391783
  async request(request3, responseType, timeoutMs = 6e4) {
391960
- const correlationId = randomUUID7();
391784
+ const correlationId = randomUUID6();
391961
391785
  return new Promise((resolve15, reject) => {
391962
391786
  const timeoutId = setTimeout(() => {
391963
391787
  cleanup();
@@ -397920,8 +397744,8 @@ function rng6() {
397920
397744
  }
397921
397745
 
397922
397746
  // packages/core/node_modules/uuid/dist-node/native.js
397923
- import { randomUUID as randomUUID8 } from "node:crypto";
397924
- var native_default4 = { randomUUID: randomUUID8 };
397747
+ import { randomUUID as randomUUID7 } from "node:crypto";
397748
+ var native_default4 = { randomUUID: randomUUID7 };
397925
397749
 
397926
397750
  // packages/core/node_modules/uuid/dist-node/v4.js
397927
397751
  function _v42(options, buf, offset) {
@@ -399025,7 +398849,7 @@ init_types();
399025
398849
  init_tools();
399026
398850
  init_debugLogger();
399027
398851
  import { on as on6 } from "node:events";
399028
- import { randomUUID as randomUUID9 } from "node:crypto";
398852
+ import { randomUUID as randomUUID8 } from "node:crypto";
399029
398853
  async function awaitConfirmation(messageBus, correlationId, signal) {
399030
398854
  if (signal.aborted) {
399031
398855
  throw new Error("Operation cancelled");
@@ -399068,7 +398892,7 @@ async function resolveConfirmation(toolCall, signal, deps) {
399068
398892
  break;
399069
398893
  }
399070
398894
  await notifyHooks(deps, details);
399071
- const correlationId = randomUUID9();
398895
+ const correlationId = randomUUID8();
399072
398896
  const serializableDetails = details;
399073
398897
  lastDetails = serializableDetails;
399074
398898
  const ideConfirmation = "ideConfirmation" in details ? details.ideConfirmation : void 0;
@@ -405121,7 +404945,6 @@ var Config = class {
405121
404945
  registerCoreTool(ShellTool, this);
405122
404946
  registerCoreTool(MemoryTool);
405123
404947
  registerCoreTool(WebSearchTool, this);
405124
- registerCoreTool(AskUserTool);
405125
404948
  if (this.getUseWriteTodos()) {
405126
404949
  registerCoreTool(WriteTodosTool);
405127
404950
  }
@@ -405696,8 +405519,8 @@ var DEFAULT_OUTPUT_TERMINATOR = `
405696
405519
  ${REFERENCE_CONTENT_END}`;
405697
405520
 
405698
405521
  // packages/core/dist/src/utils/session.js
405699
- import { randomUUID as randomUUID10 } from "node:crypto";
405700
- var sessionId = randomUUID10();
405522
+ import { randomUUID as randomUUID9 } from "node:crypto";
405523
+ var sessionId = randomUUID9();
405701
405524
 
405702
405525
  // packages/core/dist/src/index.js
405703
405526
  init_storage();