@google/gemini-cli-a2a-server 0.20.0-nightly.20251127.5bed97064 → 0.20.0-nightly.20251201.f98e84f03

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.
@@ -304821,6 +304821,9 @@ var CodeAssistServer = class {
304821
304821
  };
304822
304822
  return await this.requestPost("listExperiments", req);
304823
304823
  }
304824
+ async retrieveUserQuota(req) {
304825
+ return await this.requestPost("retrieveUserQuota", req);
304826
+ }
304824
304827
  async requestPost(method, req, signal) {
304825
304828
  const res = await this.client.request({
304826
304829
  url: this.getMethodUrl(method),
@@ -306805,27 +306808,50 @@ var ApiRequestEvent = class {
306805
306808
  "event.name";
306806
306809
  "event.timestamp";
306807
306810
  model;
306808
- prompt_id;
306811
+ prompt;
306809
306812
  request_text;
306810
- constructor(model, prompt_id, request_text) {
306813
+ constructor(model, prompt_details, request_text) {
306811
306814
  this["event.name"] = "api_request";
306812
306815
  this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
306813
306816
  this.model = model;
306814
- this.prompt_id = prompt_id;
306817
+ this.prompt = prompt_details;
306815
306818
  this.request_text = request_text;
306816
306819
  }
306817
- toOpenTelemetryAttributes(config3) {
306818
- return {
306820
+ toLogRecord(config3) {
306821
+ const attributes = {
306819
306822
  ...getCommonAttributes(config3),
306820
306823
  "event.name": EVENT_API_REQUEST,
306821
306824
  "event.timestamp": this["event.timestamp"],
306822
306825
  model: this.model,
306823
- prompt_id: this.prompt_id,
306826
+ prompt_id: this.prompt.prompt_id,
306824
306827
  request_text: this.request_text
306825
306828
  };
306829
+ return { body: `API request to ${this.model}.`, attributes };
306826
306830
  }
306827
- toLogBody() {
306828
- return `API request to ${this.model}.`;
306831
+ toSemanticLogRecord(config3) {
306832
+ const { "gen_ai.response.model": _, ...requestConventionAttributes } = getConventionAttributes({
306833
+ model: this.model,
306834
+ auth_type: config3.getContentGeneratorConfig()?.authType
306835
+ });
306836
+ const attributes = {
306837
+ ...getCommonAttributes(config3),
306838
+ "event.name": EVENT_GEN_AI_OPERATION_DETAILS,
306839
+ "event.timestamp": this["event.timestamp"],
306840
+ ...toGenerateContentConfigAttributes(this.prompt.generate_content_config),
306841
+ ...requestConventionAttributes
306842
+ };
306843
+ if (this.prompt.server) {
306844
+ attributes["server.address"] = this.prompt.server.address;
306845
+ attributes["server.port"] = this.prompt.server.port;
306846
+ }
306847
+ if (config3.getTelemetryLogPromptsEnabled() && this.prompt.contents) {
306848
+ attributes["gen_ai.input.messages"] = JSON.stringify(toInputMessages(this.prompt.contents));
306849
+ }
306850
+ const logRecord = {
306851
+ body: `GenAI operation request details from ${this.model}.`,
306852
+ attributes
306853
+ };
306854
+ return logRecord;
306829
306855
  }
306830
306856
  };
306831
306857
  var EVENT_API_ERROR = "gemini_cli.api_error";
@@ -306930,6 +306956,7 @@ var ApiResponseEvent = class {
306930
306956
  prompt;
306931
306957
  response;
306932
306958
  usage;
306959
+ finish_reasons;
306933
306960
  constructor(model, duration_ms, prompt_details, response_details, auth_type, usage_data, response_text) {
306934
306961
  this["event.name"] = "api_response";
306935
306962
  this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
@@ -306948,6 +306975,7 @@ var ApiResponseEvent = class {
306948
306975
  tool_token_count: usage_data?.toolUsePromptTokenCount ?? 0,
306949
306976
  total_token_count: usage_data?.totalTokenCount ?? 0
306950
306977
  };
306978
+ this.finish_reasons = toFinishReasons(this.response.candidates);
306951
306979
  }
306952
306980
  toLogRecord(config3) {
306953
306981
  const attributes = {
@@ -306964,7 +306992,8 @@ var ApiResponseEvent = class {
306964
306992
  total_token_count: this.usage.total_token_count,
306965
306993
  prompt_id: this.prompt.prompt_id,
306966
306994
  auth_type: this.auth_type,
306967
- status_code: this.status_code
306995
+ status_code: this.status_code,
306996
+ finish_reasons: this.finish_reasons
306968
306997
  };
306969
306998
  if (this.response_text) {
306970
306999
  attributes["response_text"] = this.response_text;
@@ -306986,7 +307015,7 @@ var ApiResponseEvent = class {
306986
307015
  "event.name": EVENT_GEN_AI_OPERATION_DETAILS,
306987
307016
  "event.timestamp": this["event.timestamp"],
306988
307017
  "gen_ai.response.id": this.response.response_id,
306989
- "gen_ai.response.finish_reasons": toFinishReasons(this.response.candidates),
307018
+ "gen_ai.response.finish_reasons": this.finish_reasons,
306990
307019
  "gen_ai.output.messages": JSON.stringify(toOutputMessages(this.response.candidates)),
306991
307020
  ...toGenerateContentConfigAttributes(this.prompt.generate_content_config),
306992
307021
  ...getConventionAttributes(this)
@@ -307803,8 +307832,8 @@ var Float64Vector = import_vector.default.Float64Vector;
307803
307832
  var PointerVector = import_vector.default.PointerVector;
307804
307833
 
307805
307834
  // packages/core/dist/src/generated/git-commit.js
307806
- var GIT_COMMIT_INFO = "5bed97064";
307807
- var CLI_VERSION = "0.20.0-nightly.20251127.5bed97064";
307835
+ var GIT_COMMIT_INFO = "f98e84f03";
307836
+ var CLI_VERSION = "0.20.0-nightly.20251201.f98e84f03";
307808
307837
 
307809
307838
  // packages/core/dist/src/ide/detect-ide.js
307810
307839
  var IDE_DEFINITIONS = {
@@ -310091,11 +310120,8 @@ function logApiRequest(config3, event) {
310091
310120
  if (!isTelemetrySdkInitialized())
310092
310121
  return;
310093
310122
  const logger6 = import_api_logs.logs.getLogger(SERVICE_NAME);
310094
- const logRecord = {
310095
- body: event.toLogBody(),
310096
- attributes: event.toOpenTelemetryAttributes(config3)
310097
- };
310098
- logger6.emit(logRecord);
310123
+ logger6.emit(event.toLogRecord(config3));
310124
+ logger6.emit(event.toSemanticLogRecord(config3));
310099
310125
  }
310100
310126
  function logFlashFallback(config3, event) {
310101
310127
  ClearcutLogger.getInstance(config3)?.logFlashFallbackEvent();
@@ -310383,9 +310409,14 @@ var LoggingContentGenerator = class {
310383
310409
  getWrapped() {
310384
310410
  return this.wrapped;
310385
310411
  }
310386
- logApiRequest(contents, model, promptId) {
310412
+ logApiRequest(contents, model, promptId, generationConfig, serverDetails) {
310387
310413
  const requestText = JSON.stringify(contents);
310388
- logApiRequest(this.config, new ApiRequestEvent(model, promptId, requestText));
310414
+ logApiRequest(this.config, new ApiRequestEvent(model, {
310415
+ prompt_id: promptId,
310416
+ contents,
310417
+ generate_content_config: generationConfig,
310418
+ server: serverDetails
310419
+ }, requestText));
310389
310420
  }
310390
310421
  _getEndpointUrl(req, method) {
310391
310422
  if (this.wrapped instanceof CodeAssistServer) {
@@ -310432,8 +310463,8 @@ var LoggingContentGenerator = class {
310432
310463
  spanMetadata.input = { request: req, userPromptId, model: req.model };
310433
310464
  const startTime = Date.now();
310434
310465
  const contents = toContents(req.contents);
310435
- this.logApiRequest(toContents(req.contents), req.model, userPromptId);
310436
310466
  const serverDetails = this._getEndpointUrl(req, "generateContent");
310467
+ this.logApiRequest(contents, req.model, userPromptId, req.config, serverDetails);
310437
310468
  try {
310438
310469
  const response = await this.wrapped.generateContent(req, userPromptId);
310439
310470
  spanMetadata.output = {
@@ -310457,8 +310488,8 @@ var LoggingContentGenerator = class {
310457
310488
  }, async ({ metadata: spanMetadata, endSpan }) => {
310458
310489
  spanMetadata.input = { request: req, userPromptId, model: req.model };
310459
310490
  const startTime = Date.now();
310460
- this.logApiRequest(toContents(req.contents), req.model, userPromptId);
310461
310491
  const serverDetails = this._getEndpointUrl(req, "generateContentStream");
310492
+ this.logApiRequest(toContents(req.contents), req.model, userPromptId, req.config, serverDetails);
310462
310493
  let stream3;
310463
310494
  try {
310464
310495
  stream3 = await this.wrapped.generateContentStream(req, userPromptId);
@@ -310731,7 +310762,7 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
310731
310762
  if (gcConfig.fakeResponses) {
310732
310763
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
310733
310764
  }
310734
- const version4 = "0.20.0-nightly.20251127.5bed97064";
310765
+ const version4 = "0.20.0-nightly.20251201.f98e84f03";
310735
310766
  const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
310736
310767
  const userAgent = `GeminiCLI/${version4} (${process.platform}; ${process.arch})`;
310737
310768
  const customHeadersMap = parseCustomHeaders(customHeadersEnv);
@@ -354764,7 +354795,8 @@ var ShellExecutionService = class {
354764
354795
  ...process.env,
354765
354796
  GEMINI_CLI: "1",
354766
354797
  TERM: "xterm-256color",
354767
- PAGER: "cat"
354798
+ PAGER: "cat",
354799
+ GIT_PAGER: "cat"
354768
354800
  }
354769
354801
  });
354770
354802
  const result = new Promise((resolve14) => {
@@ -354932,7 +354964,8 @@ var ShellExecutionService = class {
354932
354964
  ...process.env,
354933
354965
  GEMINI_CLI: "1",
354934
354966
  TERM: "xterm-256color",
354935
- PAGER: shellExecutionConfig.pager ?? "cat"
354967
+ PAGER: shellExecutionConfig.pager ?? "cat",
354968
+ GIT_PAGER: shellExecutionConfig.pager ?? "cat"
354936
354969
  },
354937
354970
  handleFlowControl: true
354938
354971
  });
@@ -355365,7 +355398,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
355365
355398
  updateOutput(cumulativeOutput);
355366
355399
  lastUpdateTime = Date.now();
355367
355400
  }
355368
- }, combinedController.signal, this.config.getEnableInteractiveShell(), shellExecutionConfig ?? {});
355401
+ }, combinedController.signal, this.config.getEnableInteractiveShell(), { ...shellExecutionConfig, pager: "cat" });
355369
355402
  if (pid && setPidCallback) {
355370
355403
  setPidCallback(pid);
355371
355404
  }
@@ -374535,7 +374568,7 @@ async function getClientMetadata() {
374535
374568
  clientMetadataPromise = (async () => ({
374536
374569
  ideName: "IDE_UNSPECIFIED",
374537
374570
  pluginType: "GEMINI",
374538
- ideVersion: "0.20.0-nightly.20251127.5bed97064",
374571
+ ideVersion: "0.20.0-nightly.20251201.f98e84f03",
374539
374572
  platform: getPlatform(),
374540
374573
  updateChannel: await getReleaseChannel(__dirname5)
374541
374574
  }))();