@google/gemini-cli-a2a-server 0.20.0-nightly.20251130.576fda18e → 0.20.0-nightly.20251201.2fe609cb6

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.
@@ -306808,27 +306808,50 @@ var ApiRequestEvent = class {
306808
306808
  "event.name";
306809
306809
  "event.timestamp";
306810
306810
  model;
306811
- prompt_id;
306811
+ prompt;
306812
306812
  request_text;
306813
- constructor(model, prompt_id, request_text) {
306813
+ constructor(model, prompt_details, request_text) {
306814
306814
  this["event.name"] = "api_request";
306815
306815
  this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
306816
306816
  this.model = model;
306817
- this.prompt_id = prompt_id;
306817
+ this.prompt = prompt_details;
306818
306818
  this.request_text = request_text;
306819
306819
  }
306820
- toOpenTelemetryAttributes(config3) {
306821
- return {
306820
+ toLogRecord(config3) {
306821
+ const attributes = {
306822
306822
  ...getCommonAttributes(config3),
306823
306823
  "event.name": EVENT_API_REQUEST,
306824
306824
  "event.timestamp": this["event.timestamp"],
306825
306825
  model: this.model,
306826
- prompt_id: this.prompt_id,
306826
+ prompt_id: this.prompt.prompt_id,
306827
306827
  request_text: this.request_text
306828
306828
  };
306829
+ return { body: `API request to ${this.model}.`, attributes };
306829
306830
  }
306830
- toLogBody() {
306831
- 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;
306832
306855
  }
306833
306856
  };
306834
306857
  var EVENT_API_ERROR = "gemini_cli.api_error";
@@ -307809,8 +307832,8 @@ var Float64Vector = import_vector.default.Float64Vector;
307809
307832
  var PointerVector = import_vector.default.PointerVector;
307810
307833
 
307811
307834
  // packages/core/dist/src/generated/git-commit.js
307812
- var GIT_COMMIT_INFO = "576fda18e";
307813
- var CLI_VERSION = "0.20.0-nightly.20251130.576fda18e";
307835
+ var GIT_COMMIT_INFO = "2fe609cb6";
307836
+ var CLI_VERSION = "0.20.0-nightly.20251201.2fe609cb6";
307814
307837
 
307815
307838
  // packages/core/dist/src/ide/detect-ide.js
307816
307839
  var IDE_DEFINITIONS = {
@@ -310097,11 +310120,8 @@ function logApiRequest(config3, event) {
310097
310120
  if (!isTelemetrySdkInitialized())
310098
310121
  return;
310099
310122
  const logger6 = import_api_logs.logs.getLogger(SERVICE_NAME);
310100
- const logRecord = {
310101
- body: event.toLogBody(),
310102
- attributes: event.toOpenTelemetryAttributes(config3)
310103
- };
310104
- logger6.emit(logRecord);
310123
+ logger6.emit(event.toLogRecord(config3));
310124
+ logger6.emit(event.toSemanticLogRecord(config3));
310105
310125
  }
310106
310126
  function logFlashFallback(config3, event) {
310107
310127
  ClearcutLogger.getInstance(config3)?.logFlashFallbackEvent();
@@ -310389,9 +310409,14 @@ var LoggingContentGenerator = class {
310389
310409
  getWrapped() {
310390
310410
  return this.wrapped;
310391
310411
  }
310392
- logApiRequest(contents, model, promptId) {
310412
+ logApiRequest(contents, model, promptId, generationConfig, serverDetails) {
310393
310413
  const requestText = JSON.stringify(contents);
310394
- 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));
310395
310420
  }
310396
310421
  _getEndpointUrl(req, method) {
310397
310422
  if (this.wrapped instanceof CodeAssistServer) {
@@ -310438,8 +310463,8 @@ var LoggingContentGenerator = class {
310438
310463
  spanMetadata.input = { request: req, userPromptId, model: req.model };
310439
310464
  const startTime = Date.now();
310440
310465
  const contents = toContents(req.contents);
310441
- this.logApiRequest(toContents(req.contents), req.model, userPromptId);
310442
310466
  const serverDetails = this._getEndpointUrl(req, "generateContent");
310467
+ this.logApiRequest(contents, req.model, userPromptId, req.config, serverDetails);
310443
310468
  try {
310444
310469
  const response = await this.wrapped.generateContent(req, userPromptId);
310445
310470
  spanMetadata.output = {
@@ -310463,8 +310488,8 @@ var LoggingContentGenerator = class {
310463
310488
  }, async ({ metadata: spanMetadata, endSpan }) => {
310464
310489
  spanMetadata.input = { request: req, userPromptId, model: req.model };
310465
310490
  const startTime = Date.now();
310466
- this.logApiRequest(toContents(req.contents), req.model, userPromptId);
310467
310491
  const serverDetails = this._getEndpointUrl(req, "generateContentStream");
310492
+ this.logApiRequest(toContents(req.contents), req.model, userPromptId, req.config, serverDetails);
310468
310493
  let stream3;
310469
310494
  try {
310470
310495
  stream3 = await this.wrapped.generateContentStream(req, userPromptId);
@@ -310737,7 +310762,7 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
310737
310762
  if (gcConfig.fakeResponses) {
310738
310763
  return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
310739
310764
  }
310740
- const version4 = "0.20.0-nightly.20251130.576fda18e";
310765
+ const version4 = "0.20.0-nightly.20251201.2fe609cb6";
310741
310766
  const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
310742
310767
  const userAgent = `GeminiCLI/${version4} (${process.platform}; ${process.arch})`;
310743
310768
  const customHeadersMap = parseCustomHeaders(customHeadersEnv);
@@ -372430,6 +372455,11 @@ var HookRunner = class {
372430
372455
  }, 5e3);
372431
372456
  }, timeout);
372432
372457
  if (child.stdin) {
372458
+ child.stdin.on("error", (err2) => {
372459
+ if (err2.code !== "EPIPE") {
372460
+ debugLogger.warn(`Hook stdin error: ${err2}`);
372461
+ }
372462
+ });
372433
372463
  child.stdin.write(JSON.stringify(input));
372434
372464
  child.stdin.end();
372435
372465
  }
@@ -374543,7 +374573,7 @@ async function getClientMetadata() {
374543
374573
  clientMetadataPromise = (async () => ({
374544
374574
  ideName: "IDE_UNSPECIFIED",
374545
374575
  pluginType: "GEMINI",
374546
- ideVersion: "0.20.0-nightly.20251130.576fda18e",
374576
+ ideVersion: "0.20.0-nightly.20251201.2fe609cb6",
374547
374577
  platform: getPlatform(),
374548
374578
  updateChannel: await getReleaseChannel(__dirname5)
374549
374579
  }))();