@google/gemini-cli-a2a-server 0.56.0-nightly.20260810.gcf22ac7e8 → 0.56.0-preview.1
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 +14 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -220988,8 +220988,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
220988
220988
|
var init_git_commit = __esm({
|
|
220989
220989
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
220990
220990
|
"use strict";
|
|
220991
|
-
GIT_COMMIT_INFO = "
|
|
220992
|
-
CLI_VERSION = "0.56.0-
|
|
220991
|
+
GIT_COMMIT_INFO = "659c7aacd";
|
|
220992
|
+
CLI_VERSION = "0.56.0-preview.1";
|
|
220993
220993
|
}
|
|
220994
220994
|
});
|
|
220995
220995
|
|
|
@@ -336689,7 +336689,7 @@ function getVersion() {
|
|
|
336689
336689
|
}
|
|
336690
336690
|
versionPromise = (async () => {
|
|
336691
336691
|
const pkgJson = await getPackageJson(__dirname4);
|
|
336692
|
-
return "0.56.0-
|
|
336692
|
+
return "0.56.0-preview.1";
|
|
336693
336693
|
})();
|
|
336694
336694
|
return versionPromise;
|
|
336695
336695
|
}
|
|
@@ -406980,10 +406980,11 @@ ${authUrl}
|
|
|
406980
406980
|
debugLogger.debug(`Returning valid token for server: ${serverName}`);
|
|
406981
406981
|
return token2.accessToken;
|
|
406982
406982
|
}
|
|
406983
|
-
|
|
406983
|
+
const clientId = config2.clientId ?? credentials3.clientId;
|
|
406984
|
+
if (token2.refreshToken && clientId && credentials3.tokenUrl) {
|
|
406984
406985
|
try {
|
|
406985
406986
|
debugLogger.log(`Refreshing expired token for MCP server: ${serverName}`);
|
|
406986
|
-
const newTokenResponse = await this.refreshAccessToken(config2, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
406987
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
406987
406988
|
const newToken = {
|
|
406988
406989
|
accessToken: newTokenResponse.access_token,
|
|
406989
406990
|
tokenType: newTokenResponse.token_type,
|
|
@@ -406993,7 +406994,7 @@ ${authUrl}
|
|
|
406993
406994
|
if (newTokenResponse.expires_in) {
|
|
406994
406995
|
newToken.expiresAt = Date.now() + newTokenResponse.expires_in * 1e3;
|
|
406995
406996
|
}
|
|
406996
|
-
await this.tokenStorage.saveToken(serverName, newToken,
|
|
406997
|
+
await this.tokenStorage.saveToken(serverName, newToken, clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
406997
406998
|
return newToken.accessToken;
|
|
406998
406999
|
} catch (error2) {
|
|
406999
407000
|
coreEvents.emitFeedback("error", "Failed to refresh auth token.", error2);
|
|
@@ -407011,7 +407012,7 @@ ${authUrl}
|
|
|
407011
407012
|
const clientId = config2.clientId ?? credentials3.clientId;
|
|
407012
407013
|
if (current.refreshToken && clientId && credentials3.tokenUrl) {
|
|
407013
407014
|
try {
|
|
407014
|
-
const newTokenResponse = await this.refreshAccessToken(config2, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
407015
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
407015
407016
|
const refreshed = {
|
|
407016
407017
|
accessToken: newTokenResponse.access_token,
|
|
407017
407018
|
tokenType: newTokenResponse.token_type,
|
|
@@ -414824,17 +414825,21 @@ var init_config4 = __esm({
|
|
|
414824
414825
|
if (!bucket.modelId || bucket.remainingFraction == null) {
|
|
414825
414826
|
continue;
|
|
414826
414827
|
}
|
|
414828
|
+
let modelId = bucket.modelId;
|
|
414829
|
+
if (modelId === SECONDARY_GEMINI_3_5_FLASH_MODEL) {
|
|
414830
|
+
modelId = DEFAULT_GEMINI_3_5_FLASH_MODEL;
|
|
414831
|
+
}
|
|
414827
414832
|
let remaining;
|
|
414828
414833
|
let limit;
|
|
414829
414834
|
if (bucket.remainingAmount) {
|
|
414830
414835
|
remaining = parseInt(bucket.remainingAmount, 10);
|
|
414831
|
-
limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(
|
|
414836
|
+
limit = bucket.remainingFraction > 0 ? Math.round(remaining / bucket.remainingFraction) : this.modelQuotas.get(modelId)?.limit ?? 0;
|
|
414832
414837
|
} else {
|
|
414833
414838
|
limit = 100;
|
|
414834
414839
|
remaining = Math.round(bucket.remainingFraction * limit);
|
|
414835
414840
|
}
|
|
414836
414841
|
if (!isNaN(remaining) && Number.isFinite(limit) && limit > 0) {
|
|
414837
|
-
this.modelQuotas.set(
|
|
414842
|
+
this.modelQuotas.set(modelId, {
|
|
414838
414843
|
remaining,
|
|
414839
414844
|
limit,
|
|
414840
414845
|
resetTime: bucket.resetTime
|