@google/gemini-cli-a2a-server 0.33.0-preview.2 → 0.33.0-preview.4
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 +23 -14
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -129762,7 +129762,7 @@ async function initOauthClient(authType, config3) {
|
|
|
129762
129762
|
}
|
|
129763
129763
|
await triggerPostAuthCallbacks(client.credentials);
|
|
129764
129764
|
} else {
|
|
129765
|
-
if (!config3.
|
|
129765
|
+
if (!config3.getAcpMode()) {
|
|
129766
129766
|
const userConsent = await getConsentForOauth("");
|
|
129767
129767
|
if (!userConsent) {
|
|
129768
129768
|
throw new FatalCancellationError("Authentication cancelled by user.");
|
|
@@ -214180,8 +214180,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
214180
214180
|
var init_git_commit = __esm({
|
|
214181
214181
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
214182
214182
|
"use strict";
|
|
214183
|
-
GIT_COMMIT_INFO = "
|
|
214184
|
-
CLI_VERSION = "0.33.0-preview.
|
|
214183
|
+
GIT_COMMIT_INFO = "7e6e40c81";
|
|
214184
|
+
CLI_VERSION = "0.33.0-preview.4";
|
|
214185
214185
|
}
|
|
214186
214186
|
});
|
|
214187
214187
|
|
|
@@ -291439,7 +291439,7 @@ function getVersion() {
|
|
|
291439
291439
|
}
|
|
291440
291440
|
versionPromise = (async () => {
|
|
291441
291441
|
const pkgJson = await getPackageJson(__dirname3);
|
|
291442
|
-
return "0.33.0-preview.
|
|
291442
|
+
return "0.33.0-preview.4";
|
|
291443
291443
|
})();
|
|
291444
291444
|
return versionPromise;
|
|
291445
291445
|
}
|
|
@@ -292834,14 +292834,16 @@ var init_recordingContentGenerator = __esm({
|
|
|
292834
292834
|
});
|
|
292835
292835
|
|
|
292836
292836
|
// packages/core/dist/src/core/contentGenerator.js
|
|
292837
|
-
async function createContentGeneratorConfig(config3, authType, apiKey) {
|
|
292837
|
+
async function createContentGeneratorConfig(config3, authType, apiKey, baseUrl, customHeaders) {
|
|
292838
292838
|
const geminiApiKey = apiKey || process.env["GEMINI_API_KEY"] || await loadApiKey() || void 0;
|
|
292839
292839
|
const googleApiKey = process.env["GOOGLE_API_KEY"] || void 0;
|
|
292840
292840
|
const googleCloudProject = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
|
|
292841
292841
|
const googleCloudLocation = process.env["GOOGLE_CLOUD_LOCATION"] || void 0;
|
|
292842
292842
|
const contentGeneratorConfig = {
|
|
292843
292843
|
authType,
|
|
292844
|
-
proxy: config3?.getProxy()
|
|
292844
|
+
proxy: config3?.getProxy(),
|
|
292845
|
+
baseUrl,
|
|
292846
|
+
customHeaders
|
|
292845
292847
|
};
|
|
292846
292848
|
if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.COMPUTE_ADC) {
|
|
292847
292849
|
return contentGeneratorConfig;
|
|
@@ -292882,8 +292884,11 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
|
|
|
292882
292884
|
const httpOptions = { headers: baseHeaders };
|
|
292883
292885
|
return new LoggingContentGenerator(await createCodeAssistContentGenerator(httpOptions, config3.authType, gcConfig, sessionId2), gcConfig);
|
|
292884
292886
|
}
|
|
292885
|
-
if (config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI) {
|
|
292887
|
+
if (config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI || config3.authType === AuthType2.GATEWAY) {
|
|
292886
292888
|
let headers = { ...baseHeaders };
|
|
292889
|
+
if (config3.customHeaders) {
|
|
292890
|
+
headers = { ...headers, ...config3.customHeaders };
|
|
292891
|
+
}
|
|
292887
292892
|
if (gcConfig?.getUsageStatisticsEnabled()) {
|
|
292888
292893
|
const installationManager2 = new InstallationManager();
|
|
292889
292894
|
const installationId = installationManager2.getInstallationId();
|
|
@@ -292893,6 +292898,9 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
|
|
|
292893
292898
|
};
|
|
292894
292899
|
}
|
|
292895
292900
|
const httpOptions = { headers };
|
|
292901
|
+
if (config3.baseUrl) {
|
|
292902
|
+
httpOptions.baseUrl = config3.baseUrl;
|
|
292903
|
+
}
|
|
292896
292904
|
const googleGenAI = new GoogleGenAI({
|
|
292897
292905
|
apiKey: config3.apiKey === "" ? void 0 : config3.apiKey,
|
|
292898
292906
|
vertexai: config3.vertexai,
|
|
@@ -292927,6 +292935,7 @@ var init_contentGenerator = __esm({
|
|
|
292927
292935
|
AuthType3["USE_VERTEX_AI"] = "vertex-ai";
|
|
292928
292936
|
AuthType3["LEGACY_CLOUD_SHELL"] = "cloud-shell";
|
|
292929
292937
|
AuthType3["COMPUTE_ADC"] = "compute-default-credentials";
|
|
292938
|
+
AuthType3["GATEWAY"] = "gateway";
|
|
292930
292939
|
})(AuthType2 || (AuthType2 = {}));
|
|
292931
292940
|
}
|
|
292932
292941
|
});
|
|
@@ -419017,7 +419026,7 @@ var init_config4 = __esm({
|
|
|
419017
419026
|
}
|
|
419018
419027
|
}
|
|
419019
419028
|
summarizeToolOutput;
|
|
419020
|
-
|
|
419029
|
+
acpMode = false;
|
|
419021
419030
|
loadMemoryFromIncludeDirectories = false;
|
|
419022
419031
|
includeDirectoryTree = true;
|
|
419023
419032
|
importFormat;
|
|
@@ -419171,7 +419180,7 @@ var init_config4 = __esm({
|
|
|
419171
419180
|
protectLatestTurn: params.toolOutputMasking?.protectLatestTurn ?? DEFAULT_PROTECT_LATEST_TURN
|
|
419172
419181
|
};
|
|
419173
419182
|
this.maxSessionTurns = params.maxSessionTurns ?? -1;
|
|
419174
|
-
this.
|
|
419183
|
+
this.acpMode = params.acpMode ?? false;
|
|
419175
419184
|
this.listSessions = params.listSessions ?? false;
|
|
419176
419185
|
this.deleteSession = params.deleteSession;
|
|
419177
419186
|
this.listExtensions = params.listExtensions ?? false;
|
|
@@ -419349,7 +419358,7 @@ var init_config4 = __esm({
|
|
|
419349
419358
|
}
|
|
419350
419359
|
}
|
|
419351
419360
|
});
|
|
419352
|
-
if (!this.interactive || this.
|
|
419361
|
+
if (!this.interactive || this.acpMode) {
|
|
419353
419362
|
await this.mcpInitializationPromise;
|
|
419354
419363
|
}
|
|
419355
419364
|
if (this.skillsSupport) {
|
|
@@ -419377,7 +419386,7 @@ var init_config4 = __esm({
|
|
|
419377
419386
|
getContentGenerator() {
|
|
419378
419387
|
return this.contentGenerator;
|
|
419379
419388
|
}
|
|
419380
|
-
async refreshAuth(authMethod, apiKey) {
|
|
419389
|
+
async refreshAuth(authMethod, apiKey, baseUrl, customHeaders) {
|
|
419381
419390
|
this.modelAvailabilityService.reset();
|
|
419382
419391
|
if (this.contentGeneratorConfig?.authType === AuthType2.USE_GEMINI && authMethod !== AuthType2.USE_GEMINI) {
|
|
419383
419392
|
this.geminiClient.stripThoughtsFromHistory();
|
|
@@ -419386,7 +419395,7 @@ var init_config4 = __esm({
|
|
|
419386
419395
|
if (this.contentGeneratorConfig) {
|
|
419387
419396
|
this.contentGeneratorConfig.authType = void 0;
|
|
419388
419397
|
}
|
|
419389
|
-
const newContentGeneratorConfig = await createContentGeneratorConfig(this, authMethod, apiKey);
|
|
419398
|
+
const newContentGeneratorConfig = await createContentGeneratorConfig(this, authMethod, apiKey, baseUrl, customHeaders);
|
|
419390
419399
|
this.contentGenerator = await createContentGenerator(newContentGeneratorConfig, this, this.getSessionId());
|
|
419391
419400
|
this.contentGeneratorConfig = newContentGeneratorConfig;
|
|
419392
419401
|
this.baseLlmClient = new BaseLlmClient(this.contentGenerator, this);
|
|
@@ -420067,8 +420076,8 @@ var init_config4 = __esm({
|
|
|
420067
420076
|
getUsageStatisticsEnabled() {
|
|
420068
420077
|
return this.usageStatisticsEnabled;
|
|
420069
420078
|
}
|
|
420070
|
-
|
|
420071
|
-
return this.
|
|
420079
|
+
getAcpMode() {
|
|
420080
|
+
return this.acpMode;
|
|
420072
420081
|
}
|
|
420073
420082
|
async waitForMcpInit() {
|
|
420074
420083
|
if (this.mcpInitializationPromise) {
|