@google/gemini-cli-a2a-server 0.23.0-preview.4 → 0.23.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.
- package/dist/a2a-server.mjs +60 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -310224,7 +310224,7 @@ var __filename = fileURLToPath4(import.meta.url);
|
|
|
310224
310224
|
var __dirname3 = path20.dirname(__filename);
|
|
310225
310225
|
async function getVersion() {
|
|
310226
310226
|
const pkgJson = await getPackageJson(__dirname3);
|
|
310227
|
-
return "0.23.0-preview.
|
|
310227
|
+
return "0.23.0-preview.6";
|
|
310228
310228
|
}
|
|
310229
310229
|
|
|
310230
310230
|
// packages/core/dist/src/code_assist/experiments/client_metadata.js
|
|
@@ -312186,6 +312186,28 @@ var ApiResponseEvent = class {
|
|
|
312186
312186
|
return logRecord;
|
|
312187
312187
|
}
|
|
312188
312188
|
};
|
|
312189
|
+
var EVENT_FLASH_FALLBACK = "gemini_cli.flash_fallback";
|
|
312190
|
+
var FlashFallbackEvent = class {
|
|
312191
|
+
"event.name";
|
|
312192
|
+
"event.timestamp";
|
|
312193
|
+
auth_type;
|
|
312194
|
+
constructor(auth_type) {
|
|
312195
|
+
this["event.name"] = "flash_fallback";
|
|
312196
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
312197
|
+
this.auth_type = auth_type;
|
|
312198
|
+
}
|
|
312199
|
+
toOpenTelemetryAttributes(config3) {
|
|
312200
|
+
return {
|
|
312201
|
+
...getCommonAttributes(config3),
|
|
312202
|
+
"event.name": EVENT_FLASH_FALLBACK,
|
|
312203
|
+
"event.timestamp": this["event.timestamp"],
|
|
312204
|
+
auth_type: this.auth_type
|
|
312205
|
+
};
|
|
312206
|
+
}
|
|
312207
|
+
toLogBody() {
|
|
312208
|
+
return `Switching to flash as Fallback.`;
|
|
312209
|
+
}
|
|
312210
|
+
};
|
|
312189
312211
|
var EVENT_RIPGREP_FALLBACK = "gemini_cli.ripgrep_fallback";
|
|
312190
312212
|
var RipgrepFallbackEvent = class {
|
|
312191
312213
|
error;
|
|
@@ -312995,8 +313017,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
312995
313017
|
var PointerVector = import_vector.default.PointerVector;
|
|
312996
313018
|
|
|
312997
313019
|
// packages/core/dist/src/generated/git-commit.js
|
|
312998
|
-
var GIT_COMMIT_INFO = "
|
|
312999
|
-
var CLI_VERSION = "0.23.0-preview.
|
|
313020
|
+
var GIT_COMMIT_INFO = "42a36294a";
|
|
313021
|
+
var CLI_VERSION = "0.23.0-preview.6";
|
|
313000
313022
|
|
|
313001
313023
|
// packages/core/dist/src/ide/detect-ide.js
|
|
313002
313024
|
var IDE_DEFINITIONS = {
|
|
@@ -315559,6 +315581,17 @@ function logApiRequest(config3, event) {
|
|
|
315559
315581
|
logger6.emit(event.toSemanticLogRecord(config3));
|
|
315560
315582
|
});
|
|
315561
315583
|
}
|
|
315584
|
+
function logFlashFallback(config3, event) {
|
|
315585
|
+
ClearcutLogger.getInstance(config3)?.logFlashFallbackEvent();
|
|
315586
|
+
bufferTelemetryEvent(() => {
|
|
315587
|
+
const logger6 = import_api_logs.logs.getLogger(SERVICE_NAME);
|
|
315588
|
+
const logRecord = {
|
|
315589
|
+
body: event.toLogBody(),
|
|
315590
|
+
attributes: event.toOpenTelemetryAttributes(config3)
|
|
315591
|
+
};
|
|
315592
|
+
logger6.emit(logRecord);
|
|
315593
|
+
});
|
|
315594
|
+
}
|
|
315562
315595
|
function logRipgrepFallback(config3, event) {
|
|
315563
315596
|
ClearcutLogger.getInstance(config3)?.logRipgrepFallbackEvent();
|
|
315564
315597
|
bufferTelemetryEvent(() => {
|
|
@@ -369384,6 +369417,7 @@ function partListUnionToString(value) {
|
|
|
369384
369417
|
// packages/core/dist/src/utils/tokenCalculation.js
|
|
369385
369418
|
var ASCII_TOKENS_PER_CHAR = 0.25;
|
|
369386
369419
|
var NON_ASCII_TOKENS_PER_CHAR = 1.3;
|
|
369420
|
+
var IMAGE_TOKEN_ESTIMATE = 3e3;
|
|
369387
369421
|
function estimateTokenCountSync(parts2) {
|
|
369388
369422
|
let totalTokens = 0;
|
|
369389
369423
|
for (const part of parts2) {
|
|
@@ -369396,7 +369430,14 @@ function estimateTokenCountSync(parts2) {
|
|
|
369396
369430
|
}
|
|
369397
369431
|
}
|
|
369398
369432
|
} else {
|
|
369399
|
-
|
|
369433
|
+
const inlineData = "inlineData" in part ? part.inlineData : void 0;
|
|
369434
|
+
const fileData = "fileData" in part ? part.fileData : void 0;
|
|
369435
|
+
const mimeType = inlineData?.mimeType || fileData?.mimeType;
|
|
369436
|
+
if (mimeType?.startsWith("image/")) {
|
|
369437
|
+
totalTokens += IMAGE_TOKEN_ESTIMATE;
|
|
369438
|
+
} else {
|
|
369439
|
+
totalTokens += JSON.stringify(part).length / 4;
|
|
369440
|
+
}
|
|
369400
369441
|
}
|
|
369401
369442
|
}
|
|
369402
369443
|
return Math.floor(totalTokens);
|
|
@@ -369414,7 +369455,8 @@ async function calculateRequestTokenCount(request3, contentGenerator, model) {
|
|
|
369414
369455
|
contents: [{ role: "user", parts: parts2 }]
|
|
369415
369456
|
});
|
|
369416
369457
|
return response.totalTokens ?? 0;
|
|
369417
|
-
} catch {
|
|
369458
|
+
} catch (error2) {
|
|
369459
|
+
debugLogger.debug("countTokens API failed:", error2);
|
|
369418
369460
|
return estimateTokenCountSync(parts2);
|
|
369419
369461
|
}
|
|
369420
369462
|
}
|
|
@@ -371733,7 +371775,7 @@ var GeminiClient = class {
|
|
|
371733
371775
|
if (this.currentSequenceModel) {
|
|
371734
371776
|
return this.currentSequenceModel;
|
|
371735
371777
|
}
|
|
371736
|
-
return this.config.getActiveModel();
|
|
371778
|
+
return resolveModel(this.config.getActiveModel());
|
|
371737
371779
|
}
|
|
371738
371780
|
async *sendMessageStream(request3, signal, prompt_id, turns = MAX_TURNS, isInvalidStreamRetry = false) {
|
|
371739
371781
|
if (!isInvalidStreamRetry) {
|
|
@@ -387006,6 +387048,13 @@ var Config = class {
|
|
|
387006
387048
|
}
|
|
387007
387049
|
this.modelAvailabilityService.reset();
|
|
387008
387050
|
}
|
|
387051
|
+
activateFallbackMode(model) {
|
|
387052
|
+
this.setModel(model);
|
|
387053
|
+
const authType = this.getContentGeneratorConfig()?.authType;
|
|
387054
|
+
if (authType) {
|
|
387055
|
+
logFlashFallback(this, new FlashFallbackEvent(authType));
|
|
387056
|
+
}
|
|
387057
|
+
}
|
|
387009
387058
|
getActiveModel() {
|
|
387010
387059
|
return this._activeModel ?? this.model;
|
|
387011
387060
|
}
|
|
@@ -390429,6 +390478,11 @@ if (import.meta.url.startsWith("file:") && isMainModule && process.env["NODE_ENV
|
|
|
390429
390478
|
* Copyright 2025 Google LLC
|
|
390430
390479
|
* SPDX-License-Identifier: Apache-2.0
|
|
390431
390480
|
*/
|
|
390481
|
+
/**
|
|
390482
|
+
* @license
|
|
390483
|
+
* Copyright 2026 Google LLC
|
|
390484
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
390485
|
+
*/
|
|
390432
390486
|
/*! Bundled license information:
|
|
390433
390487
|
|
|
390434
390488
|
safe-buffer/index.js:
|