@google/gemini-cli-a2a-server 0.12.0-preview.8 → 0.12.0
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 +21 -11
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -70097,6 +70097,7 @@ var init_events = __esm({
|
|
|
70097
70097
|
(function(CoreEvent2) {
|
|
70098
70098
|
CoreEvent2["UserFeedback"] = "user-feedback";
|
|
70099
70099
|
CoreEvent2["FallbackModeChanged"] = "fallback-mode-changed";
|
|
70100
|
+
CoreEvent2["ModelChanged"] = "model-changed";
|
|
70100
70101
|
})(CoreEvent || (CoreEvent = {}));
|
|
70101
70102
|
CoreEventEmitter = class _CoreEventEmitter extends EventEmitter4 {
|
|
70102
70103
|
_feedbackBacklog = [];
|
|
@@ -70127,6 +70128,13 @@ var init_events = __esm({
|
|
|
70127
70128
|
const payload = { isInFallbackMode };
|
|
70128
70129
|
this.emit(CoreEvent.FallbackModeChanged, payload);
|
|
70129
70130
|
}
|
|
70131
|
+
/**
|
|
70132
|
+
* Notifies subscribers that the model has changed.
|
|
70133
|
+
*/
|
|
70134
|
+
emitModelChanged(model) {
|
|
70135
|
+
const payload = { model };
|
|
70136
|
+
this.emit(CoreEvent.ModelChanged, payload);
|
|
70137
|
+
}
|
|
70130
70138
|
/**
|
|
70131
70139
|
* Flushes buffered messages. Call this immediately after primary UI listener
|
|
70132
70140
|
* subscribes.
|
|
@@ -288986,8 +288994,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
288986
288994
|
var PointerVector = import_vector.default.PointerVector;
|
|
288987
288995
|
|
|
288988
288996
|
// packages/core/dist/src/generated/git-commit.js
|
|
288989
|
-
var GIT_COMMIT_INFO = "
|
|
288990
|
-
var CLI_VERSION = "0.12.0
|
|
288997
|
+
var GIT_COMMIT_INFO = "9e7c80f2";
|
|
288998
|
+
var CLI_VERSION = "0.12.0";
|
|
288991
288999
|
|
|
288992
289000
|
// packages/core/dist/src/ide/detect-ide.js
|
|
288993
289001
|
var IDE_DEFINITIONS = {
|
|
@@ -291715,7 +291723,7 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
|
|
|
291715
291723
|
if (gcConfig.fakeResponses) {
|
|
291716
291724
|
return FakeContentGenerator.fromFile(gcConfig.fakeResponses);
|
|
291717
291725
|
}
|
|
291718
|
-
const version3 = "0.12.0
|
|
291726
|
+
const version3 = "0.12.0";
|
|
291719
291727
|
const userAgent = `GeminiCLI/${version3} (${process.platform}; ${process.arch})`;
|
|
291720
291728
|
const baseHeaders = {
|
|
291721
291729
|
"User-Agent": userAgent
|
|
@@ -323254,7 +323262,7 @@ var DEFAULT_GEMINI_FLASH_MODEL = "gemini-2.5-flash";
|
|
|
323254
323262
|
var DEFAULT_GEMINI_FLASH_LITE_MODEL = "gemini-2.5-flash-lite";
|
|
323255
323263
|
var DEFAULT_GEMINI_MODEL_AUTO = "auto";
|
|
323256
323264
|
var DEFAULT_GEMINI_EMBEDDING_MODEL = "gemini-embedding-001";
|
|
323257
|
-
var DEFAULT_THINKING_MODE =
|
|
323265
|
+
var DEFAULT_THINKING_MODE = 8192;
|
|
323258
323266
|
function getEffectiveModel(isInFallbackMode, requestedModel) {
|
|
323259
323267
|
if (!isInFallbackMode) {
|
|
323260
323268
|
return requestedModel;
|
|
@@ -325538,8 +325546,7 @@ function classifyGoogleError(error) {
|
|
|
325538
325546
|
for (const violation of quotaFailure.violations) {
|
|
325539
325547
|
const quotaId = violation.quotaId ?? "";
|
|
325540
325548
|
if (quotaId.includes("PerDay") || quotaId.includes("Daily")) {
|
|
325541
|
-
return new TerminalQuotaError(
|
|
325542
|
-
Expected quota reset within 24h.`, googleApiError);
|
|
325549
|
+
return new TerminalQuotaError(`You have exhausted your daily quota on this model.`, googleApiError);
|
|
325543
325550
|
}
|
|
325544
325551
|
}
|
|
325545
325552
|
}
|
|
@@ -325568,8 +325575,7 @@ Expected quota reset within 24h.`, googleApiError);
|
|
|
325568
325575
|
}
|
|
325569
325576
|
const quotaLimit = errorInfo.metadata?.["quota_limit"] ?? "";
|
|
325570
325577
|
if (quotaLimit.includes("PerDay") || quotaLimit.includes("Daily")) {
|
|
325571
|
-
return new TerminalQuotaError(
|
|
325572
|
-
Expected quota reset within 24h.`, googleApiError);
|
|
325578
|
+
return new TerminalQuotaError(`You have exhausted your daily quota on this model.`, googleApiError);
|
|
325573
325579
|
}
|
|
325574
325580
|
}
|
|
325575
325581
|
if (retryInfo?.retryDelay) {
|
|
@@ -346528,6 +346534,9 @@ var GitService = class {
|
|
|
346528
346534
|
}
|
|
346529
346535
|
};
|
|
346530
346536
|
|
|
346537
|
+
// packages/core/dist/src/config/config.js
|
|
346538
|
+
init_events();
|
|
346539
|
+
|
|
346531
346540
|
// packages/core/dist/src/utils/browser.js
|
|
346532
346541
|
function shouldAttemptBrowserLaunch() {
|
|
346533
346542
|
const browserBlocklist = ["www-browser"];
|
|
@@ -349714,8 +349723,6 @@ var Config = class {
|
|
|
349714
349723
|
if (this.model === DEFAULT_GEMINI_MODEL_AUTO) {
|
|
349715
349724
|
this.model = DEFAULT_GEMINI_MODEL;
|
|
349716
349725
|
}
|
|
349717
|
-
} else if (this.useModelRouter && this.model === DEFAULT_GEMINI_MODEL) {
|
|
349718
|
-
this.model = DEFAULT_GEMINI_MODEL_AUTO;
|
|
349719
349726
|
}
|
|
349720
349727
|
if (this.contentGeneratorConfig?.authType === AuthType2.USE_GEMINI && authMethod === AuthType2.LOGIN_WITH_GOOGLE) {
|
|
349721
349728
|
this.geminiClient.stripThoughtsFromHistory();
|
|
@@ -349758,7 +349765,10 @@ var Config = class {
|
|
|
349758
349765
|
if (newModel.includes("pro") && this.isInFallbackMode()) {
|
|
349759
349766
|
return;
|
|
349760
349767
|
}
|
|
349761
|
-
this.model
|
|
349768
|
+
if (this.model !== newModel) {
|
|
349769
|
+
this.model = newModel;
|
|
349770
|
+
coreEvents.emitModelChanged(newModel);
|
|
349771
|
+
}
|
|
349762
349772
|
}
|
|
349763
349773
|
isInFallbackMode() {
|
|
349764
349774
|
return this.inFallbackMode;
|