@google/gemini-cli-a2a-server 0.27.0-preview.4 → 0.27.0-preview.6

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.4";
326596
+ return "0.27.0-preview.6";
326601
326597
  }
326602
326598
 
326603
326599
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -327198,6 +327194,14 @@ var ValidationCancelledError = class extends Error {
327198
327194
  super("User cancelled account validation");
327199
327195
  }
327200
327196
  };
327197
+ var IneligibleTierError = class extends Error {
327198
+ ineligibleTiers;
327199
+ constructor(ineligibleTiers) {
327200
+ const reasons = ineligibleTiers.map((t3) => t3.reasonMessage).join(", ");
327201
+ super(reasons);
327202
+ this.ineligibleTiers = ineligibleTiers;
327203
+ }
327204
+ };
327201
327205
  async function setupUser(client, validationHandler) {
327202
327206
  const projectId = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
327203
327207
  const caServer = new CodeAssistServer(client, projectId, {}, "", void 0, void 0);
@@ -327241,11 +327245,7 @@ async function setupUser(client, validationHandler) {
327241
327245
  userTierName: loadRes.currentTier.name
327242
327246
  };
327243
327247
  }
327244
- if (loadRes.ineligibleTiers && loadRes.ineligibleTiers.length > 0) {
327245
- const reasons = loadRes.ineligibleTiers.map((t3) => t3.reasonMessage).join(", ");
327246
- throw new Error(reasons);
327247
- }
327248
- throw new ProjectIdRequiredError();
327248
+ throwIneligibleOrProjectIdError(loadRes);
327249
327249
  }
327250
327250
  return {
327251
327251
  projectId: loadRes.cloudaicompanionProject,
@@ -327287,7 +327287,7 @@ async function setupUser(client, validationHandler) {
327287
327287
  userTierName: tier.name
327288
327288
  };
327289
327289
  }
327290
- throw new ProjectIdRequiredError();
327290
+ throwIneligibleOrProjectIdError(loadRes);
327291
327291
  }
327292
327292
  return {
327293
327293
  projectId: lroRes.response.cloudaicompanionProject.id,
@@ -327295,6 +327295,12 @@ async function setupUser(client, validationHandler) {
327295
327295
  userTierName: tier.name
327296
327296
  };
327297
327297
  }
327298
+ function throwIneligibleOrProjectIdError(res) {
327299
+ if (res.ineligibleTiers && res.ineligibleTiers.length > 0) {
327300
+ throw new IneligibleTierError(res.ineligibleTiers);
327301
+ }
327302
+ throw new ProjectIdRequiredError();
327303
+ }
327298
327304
  function getOnboardTier(res) {
327299
327305
  for (const tier of res.allowedTiers || []) {
327300
327306
  if (tier.isDefault) {
@@ -330003,8 +330009,8 @@ var Float64Vector = import_vector.default.Float64Vector;
330003
330009
  var PointerVector = import_vector.default.PointerVector;
330004
330010
 
330005
330011
  // packages/core/dist/src/generated/git-commit.js
330006
- var GIT_COMMIT_INFO = "7ce9aa518";
330007
- var CLI_VERSION = "0.27.0-preview.4";
330012
+ var GIT_COMMIT_INFO = "88b0b0fe8";
330013
+ var CLI_VERSION = "0.27.0-preview.6";
330008
330014
 
330009
330015
  // packages/core/dist/src/ide/detect-ide.js
330010
330016
  var IDE_DEFINITIONS = {
@@ -380958,177 +380964,6 @@ var WebSearchTool = class _WebSearchTool extends BaseDeclarativeTool {
380958
380964
  }
380959
380965
  };
380960
380966
 
380961
- // packages/core/dist/src/tools/ask-user.js
380962
- init_tools();
380963
- init_types();
380964
- init_tool_names();
380965
- import { randomUUID as randomUUID5 } from "node:crypto";
380966
- var AskUserTool = class extends BaseDeclarativeTool {
380967
- constructor(messageBus) {
380968
- 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, {
380969
- type: "object",
380970
- required: ["questions"],
380971
- properties: {
380972
- questions: {
380973
- type: "array",
380974
- minItems: 1,
380975
- maxItems: 4,
380976
- items: {
380977
- type: "object",
380978
- required: ["question", "header"],
380979
- properties: {
380980
- question: {
380981
- type: "string",
380982
- description: "The complete question to ask the user. Should be clear, specific, and end with a question mark."
380983
- },
380984
- header: {
380985
- type: "string",
380986
- maxLength: 12,
380987
- description: 'Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".'
380988
- },
380989
- type: {
380990
- type: "string",
380991
- enum: ["choice", "text", "yesno"],
380992
- default: "choice",
380993
- description: "Question type: 'choice' (default) for multiple-choice with options, 'text' for free-form input, 'yesno' for Yes/No confirmation."
380994
- },
380995
- options: {
380996
- type: "array",
380997
- 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.",
380998
- items: {
380999
- type: "object",
381000
- required: ["label", "description"],
381001
- properties: {
381002
- label: {
381003
- type: "string",
381004
- description: 'The display text for this option (1-5 words). Example: "OAuth 2.0"'
381005
- },
381006
- description: {
381007
- type: "string",
381008
- description: 'Brief explanation of this option. Example: "Industry standard, supports SSO"'
381009
- }
381010
- }
381011
- }
381012
- },
381013
- multiSelect: {
381014
- type: "boolean",
381015
- description: "Only applies when type='choice'. Set to true to allow selecting multiple options."
381016
- },
381017
- placeholder: {
381018
- type: "string",
381019
- description: "Only applies when type='text'. Hint text shown in the input field."
381020
- }
381021
- }
381022
- }
381023
- }
381024
- }
381025
- }, messageBus);
381026
- }
381027
- validateToolParamValues(params) {
381028
- if (!params.questions || params.questions.length === 0) {
381029
- return "At least one question is required.";
381030
- }
381031
- for (let i4 = 0; i4 < params.questions.length; i4++) {
381032
- const q = params.questions[i4];
381033
- const questionType = q.type ?? QuestionType.CHOICE;
381034
- if (questionType === QuestionType.CHOICE) {
381035
- if (!q.options || q.options.length < 2) {
381036
- return `Question ${i4 + 1}: type='choice' requires 'options' array with 2-4 items.`;
381037
- }
381038
- if (q.options.length > 4) {
381039
- return `Question ${i4 + 1}: 'options' array must have at most 4 items.`;
381040
- }
381041
- }
381042
- if (q.options) {
381043
- for (let j = 0; j < q.options.length; j++) {
381044
- const opt = q.options[j];
381045
- if (!opt.label || typeof opt.label !== "string" || !opt.label.trim()) {
381046
- return `Question ${i4 + 1}, option ${j + 1}: 'label' is required and must be a non-empty string.`;
381047
- }
381048
- if (opt.description === void 0 || typeof opt.description !== "string") {
381049
- return `Question ${i4 + 1}, option ${j + 1}: 'description' is required and must be a string.`;
381050
- }
381051
- }
381052
- }
381053
- }
381054
- return null;
381055
- }
381056
- createInvocation(params, messageBus, toolName, toolDisplayName) {
381057
- return new AskUserInvocation(params, messageBus, toolName, toolDisplayName);
381058
- }
381059
- };
381060
- var AskUserInvocation = class extends BaseToolInvocation {
381061
- async shouldConfirmExecute(_abortSignal) {
381062
- return false;
381063
- }
381064
- getDescription() {
381065
- return `Asking user: ${this.params.questions.map((q) => q.question).join(", ")}`;
381066
- }
381067
- async execute(signal) {
381068
- const correlationId = randomUUID5();
381069
- const request3 = {
381070
- type: MessageBusType.ASK_USER_REQUEST,
381071
- questions: this.params.questions.map((q) => ({
381072
- ...q,
381073
- type: q.type ?? QuestionType.CHOICE
381074
- })),
381075
- correlationId
381076
- };
381077
- return new Promise((resolve15, reject) => {
381078
- const responseHandler = (response) => {
381079
- if (response.correlationId === correlationId) {
381080
- cleanup();
381081
- if (response.cancelled) {
381082
- resolve15({
381083
- llmContent: "User dismissed ask user dialog without answering.",
381084
- returnDisplay: "User dismissed dialog"
381085
- });
381086
- return;
381087
- }
381088
- const answerEntries = Object.entries(response.answers);
381089
- const hasAnswers = answerEntries.length > 0;
381090
- const returnDisplay = hasAnswers ? `**User answered:**
381091
- ${answerEntries.map(([index, answer]) => {
381092
- const question = this.params.questions[parseInt(index, 10)];
381093
- const category = question?.header ?? `Q${index}`;
381094
- return ` ${category} \u2192 ${answer}`;
381095
- }).join("\n")}` : "User submitted without answering questions.";
381096
- resolve15({
381097
- llmContent: JSON.stringify({ answers: response.answers }),
381098
- returnDisplay
381099
- });
381100
- }
381101
- };
381102
- const cleanup = () => {
381103
- if (responseHandler) {
381104
- this.messageBus.unsubscribe(MessageBusType.ASK_USER_RESPONSE, responseHandler);
381105
- }
381106
- signal.removeEventListener("abort", abortHandler);
381107
- };
381108
- const abortHandler = () => {
381109
- cleanup();
381110
- resolve15({
381111
- llmContent: "Tool execution cancelled by user.",
381112
- returnDisplay: "Cancelled",
381113
- error: {
381114
- message: "Cancelled"
381115
- }
381116
- });
381117
- };
381118
- if (signal.aborted) {
381119
- abortHandler();
381120
- return;
381121
- }
381122
- signal.addEventListener("abort", abortHandler);
381123
- this.messageBus.subscribe(MessageBusType.ASK_USER_RESPONSE, responseHandler);
381124
- this.messageBus.publish(request3).catch((err2) => {
381125
- cleanup();
381126
- reject(err2);
381127
- });
381128
- });
381129
- }
381130
- };
381131
-
381132
380967
  // packages/core/dist/src/core/client.js
381133
380968
  init_node();
381134
380969
 
@@ -382579,7 +382414,7 @@ init_paths();
382579
382414
  init_debugLogger();
382580
382415
  import path56 from "node:path";
382581
382416
  import fs49 from "node:fs";
382582
- import { randomUUID as randomUUID6 } from "node:crypto";
382417
+ import { randomUUID as randomUUID5 } from "node:crypto";
382583
382418
  var SESSION_FILE_PREFIX = "session-";
382584
382419
  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.";
382585
382420
  var ChatRecordingService = class {
@@ -382639,7 +382474,7 @@ var ChatRecordingService = class {
382639
382474
  }
382640
382475
  newMessage(type2, content) {
382641
382476
  return {
382642
- id: randomUUID6(),
382477
+ id: randomUUID5(),
382643
382478
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
382644
382479
  type: type2,
382645
382480
  content
@@ -383978,8 +383813,6 @@ ${options.planModeToolsList}
383978
383813
 
383979
383814
  ### Phase 1: Requirements Understanding
383980
383815
  - Analyze the user's request to identify core requirements and constraints
383981
- - If critical information is missing or ambiguous, ask clarifying questions using the \`${ASK_USER_TOOL_NAME}\` tool
383982
- - When using \`${ASK_USER_TOOL_NAME}\`, prefer providing multiple-choice options for the user to select from when possible
383983
383816
  - Do NOT explore the project or create a plan yet
383984
383817
 
383985
383818
  ### Phase 2: Project Exploration
@@ -391868,7 +391701,7 @@ var WorkspaceContext = class {
391868
391701
  init_storage();
391869
391702
 
391870
391703
  // packages/core/dist/src/confirmation-bus/message-bus.js
391871
- import { randomUUID as randomUUID7 } from "node:crypto";
391704
+ import { randomUUID as randomUUID6 } from "node:crypto";
391872
391705
  import { EventEmitter as EventEmitter10 } from "node:events";
391873
391706
  init_types();
391874
391707
  init_debugLogger();
@@ -391947,7 +391780,7 @@ var MessageBus = class extends EventEmitter10 {
391947
391780
  * The correlation ID is generated internally and added to the request
391948
391781
  */
391949
391782
  async request(request3, responseType, timeoutMs = 6e4) {
391950
- const correlationId = randomUUID7();
391783
+ const correlationId = randomUUID6();
391951
391784
  return new Promise((resolve15, reject) => {
391952
391785
  const timeoutId = setTimeout(() => {
391953
391786
  cleanup();
@@ -397910,8 +397743,8 @@ function rng6() {
397910
397743
  }
397911
397744
 
397912
397745
  // packages/core/node_modules/uuid/dist-node/native.js
397913
- import { randomUUID as randomUUID8 } from "node:crypto";
397914
- var native_default4 = { randomUUID: randomUUID8 };
397746
+ import { randomUUID as randomUUID7 } from "node:crypto";
397747
+ var native_default4 = { randomUUID: randomUUID7 };
397915
397748
 
397916
397749
  // packages/core/node_modules/uuid/dist-node/v4.js
397917
397750
  function _v42(options, buf, offset) {
@@ -399015,7 +398848,7 @@ init_types();
399015
398848
  init_tools();
399016
398849
  init_debugLogger();
399017
398850
  import { on as on6 } from "node:events";
399018
- import { randomUUID as randomUUID9 } from "node:crypto";
398851
+ import { randomUUID as randomUUID8 } from "node:crypto";
399019
398852
  async function awaitConfirmation(messageBus, correlationId, signal) {
399020
398853
  if (signal.aborted) {
399021
398854
  throw new Error("Operation cancelled");
@@ -399058,7 +398891,7 @@ async function resolveConfirmation(toolCall, signal, deps) {
399058
398891
  break;
399059
398892
  }
399060
398893
  await notifyHooks(deps, details);
399061
- const correlationId = randomUUID9();
398894
+ const correlationId = randomUUID8();
399062
398895
  const serializableDetails = details;
399063
398896
  lastDetails = serializableDetails;
399064
398897
  const ideConfirmation = "ideConfirmation" in details ? details.ideConfirmation : void 0;
@@ -405111,7 +404944,6 @@ var Config = class {
405111
404944
  registerCoreTool(ShellTool, this);
405112
404945
  registerCoreTool(MemoryTool);
405113
404946
  registerCoreTool(WebSearchTool, this);
405114
- registerCoreTool(AskUserTool);
405115
404947
  if (this.getUseWriteTodos()) {
405116
404948
  registerCoreTool(WriteTodosTool);
405117
404949
  }
@@ -405686,8 +405518,8 @@ var DEFAULT_OUTPUT_TERMINATOR = `
405686
405518
  ${REFERENCE_CONTENT_END}`;
405687
405519
 
405688
405520
  // packages/core/dist/src/utils/session.js
405689
- import { randomUUID as randomUUID10 } from "node:crypto";
405690
- var sessionId = randomUUID10();
405521
+ import { randomUUID as randomUUID9 } from "node:crypto";
405522
+ var sessionId = randomUUID9();
405691
405523
 
405692
405524
  // packages/core/dist/src/index.js
405693
405525
  init_storage();