@google/gemini-cli 0.55.0-preview.3 → 0.55.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/bundle/builtin/antigravity-support/SKILL.md +55 -18
- package/bundle/builtin/skill-creator/SKILL.md +221 -84
- package/bundle/{chunk-OKM3M2PX.js → chunk-2M2ZIALC.js} +1 -1
- package/bundle/{chunk-D7NKQXI3.js → chunk-32XQ54AJ.js} +35 -11
- package/bundle/{chunk-BXJWVB6T.js → chunk-3PF5QBBI.js} +7 -7
- package/bundle/{chunk-XLLOEYE5.js → chunk-4PTN4HDB.js} +1 -1
- package/bundle/{chunk-2K3N3YWJ.js → chunk-4VCYHMUV.js} +1 -1
- package/bundle/{chunk-IKOQM4YN.js → chunk-54ARFWUQ.js} +3 -3
- package/bundle/{chunk-GJBRSFPM.js → chunk-5LKFYSMV.js} +7 -7
- package/bundle/{chunk-2YAEBNH4.js → chunk-7PUNXJV6.js} +1 -1
- package/bundle/{chunk-4MK4F3LQ.js → chunk-AHQT54A5.js} +2 -2
- package/bundle/{chunk-ETEDB3N6.js → chunk-AICCA4O7.js} +2 -2
- package/bundle/{chunk-DW2J2NTU.js → chunk-CBP73R2W.js} +1 -1
- package/bundle/{chunk-XNQ2USVV.js → chunk-DPETPWEN.js} +1 -1
- package/bundle/{chunk-3JEIIDY3.js → chunk-F6UH32RP.js} +1 -1
- package/bundle/{chunk-V6HSKTFR.js → chunk-FFNJNOPW.js} +3 -3
- package/bundle/{chunk-QJZS4YYR.js → chunk-IHBI4YWX.js} +7 -7
- package/bundle/{chunk-YOSR3LGH.js → chunk-L72KYPGX.js} +7 -7
- package/bundle/{chunk-4PVLKN7E.js → chunk-MMGNXRKB.js} +1 -1
- package/bundle/{chunk-6VBVRJ2T.js → chunk-MVFWCC7A.js} +1 -1
- package/bundle/{chunk-5C4IPSFG.js → chunk-MXXWTJ5T.js} +1 -1
- package/bundle/{chunk-3KVUW3GS.js → chunk-ODKPTNXF.js} +1 -1
- package/bundle/{chunk-FQNLDGXL.js → chunk-PG6A7S3N.js} +1 -1
- package/bundle/{chunk-VPMDE76T.js → chunk-QCOIICKD.js} +35 -11
- package/bundle/{chunk-MOTK2J3L.js → chunk-QZIGFB5E.js} +1 -1
- package/bundle/{chunk-DIJFIQU5.js → chunk-RV6ZZ7XX.js} +1 -1
- package/bundle/{chunk-QY6VB26P.js → chunk-TBDX7VEE.js} +35 -11
- package/bundle/{chunk-7U5FKJMS.js → chunk-TGIIS5S2.js} +3 -3
- package/bundle/{chunk-CF6HJK4T.js → chunk-UE3CHSFT.js} +1 -1
- package/bundle/{chunk-NQ7ACVH7.js → chunk-UNIFGKZA.js} +2 -2
- package/bundle/{chunk-ENEDM4X3.js → chunk-WD5EVW3M.js} +1 -1
- package/bundle/{chunk-S35HA76T.js → chunk-XCA4ZL2J.js} +2 -2
- package/bundle/{chunk-EBUEQDL4.js → chunk-YBQ5R3NL.js} +3 -3
- package/bundle/{chunk-WWUS7UCO.js → chunk-ZYL2LM3Y.js} +35 -11
- package/bundle/{cleanup-6PJC7KVH.js → cleanup-B3QR2N4G.js} +2 -2
- package/bundle/{cleanup-AA32XASX.js → cleanup-H4OEYJO6.js} +2 -2
- package/bundle/{cleanup-KJNT5CKE.js → cleanup-MJ6IH5A4.js} +2 -2
- package/bundle/{cleanup-W4XFBOYU.js → cleanup-ZPX2BSHS.js} +2 -2
- package/bundle/{core-PJ4GTWLE.js → core-IV4CNC54.js} +1 -1
- package/bundle/{devtoolsService-BPCHKSK6.js → devtoolsService-53U6T2D7.js} +2 -2
- package/bundle/{devtoolsService-DDIV43LO.js → devtoolsService-HB7ZBXSQ.js} +2 -2
- package/bundle/{devtoolsService-SFT4J3TP.js → devtoolsService-OPPX3TMY.js} +2 -2
- package/bundle/{devtoolsService-X4SBEWHU.js → devtoolsService-VRMTKDJD.js} +2 -2
- package/bundle/{dist-6SIQ6JNU.js → dist-6SH22WAQ.js} +1 -1
- package/bundle/{dist-UVDHLJPD.js → dist-DZLHUESI.js} +1 -1
- package/bundle/{dist-VQ3F4FS5.js → dist-GGMH7TPR.js} +1 -1
- package/bundle/docs/behavioral-evals.md +185 -0
- package/bundle/docs/changelogs/index.md +18 -0
- package/bundle/docs/changelogs/latest.md +59 -31
- package/bundle/docs/changelogs/preview.md +45 -3
- package/bundle/docs/sidebar.json +4 -0
- package/bundle/{gemini-MSC5T5EU.js → gemini-3KUKFPRO.js} +14 -14
- package/bundle/{gemini-PA23YMHK.js → gemini-63IMHOLI.js} +14 -14
- package/bundle/{gemini-BMC63EGW.js → gemini-I57YPWDS.js} +14 -14
- package/bundle/{gemini-EYTXXZKY.js → gemini-LI2WNAGG.js} +14 -14
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-OUPTNZ47.js → interactiveCli-2Z3Q3FYM.js} +8 -8
- package/bundle/{interactiveCli-5Y6AY63C.js → interactiveCli-4CVVH6KY.js} +8 -8
- package/bundle/{interactiveCli-G6PWBLT5.js → interactiveCli-OLXPGHKG.js} +8 -8
- package/bundle/{interactiveCli-T32DVN2I.js → interactiveCli-YTTP3IVA.js} +8 -8
- package/bundle/{liteRtServerManager-3MCOW5QD.js → liteRtServerManager-3I2T6MGB.js} +4 -4
- package/bundle/{liteRtServerManager-7IWRFNTW.js → liteRtServerManager-F6V5YDCO.js} +4 -4
- package/bundle/{liteRtServerManager-IRFTOINI.js → liteRtServerManager-H6XTDF3Z.js} +4 -4
- package/bundle/{liteRtServerManager-LVW27XGD.js → liteRtServerManager-I5WRPME4.js} +4 -4
- package/bundle/{oauth2-provider-BPEC44QP.js → oauth2-provider-D5ATF6IJ.js} +1 -1
- package/bundle/{oauth2-provider-FSAA6HVA.js → oauth2-provider-EO6C45X7.js} +1 -1
- package/bundle/{oauth2-provider-IVUO6NTZ.js → oauth2-provider-QKZF52YW.js} +1 -1
- package/bundle/{oauth2-provider-PH6ZPS7W.js → oauth2-provider-RA73ERNX.js} +1 -1
- package/bundle/{start-3M54SR5N.js → start-A2X2P77M.js} +6 -6
- package/bundle/{start-EEVFRHCK.js → start-IH2TDHK5.js} +6 -6
- package/bundle/{start-FC7N6JMG.js → start-J7S6DWJY.js} +6 -6
- package/bundle/{start-N5PPVI4S.js → start-VOAVWNRZ.js} +6 -6
- package/package.json +1 -1
|
@@ -282559,8 +282559,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
282559
282559
|
}
|
|
282560
282560
|
|
|
282561
282561
|
// packages/core/dist/src/generated/git-commit.js
|
|
282562
|
-
var GIT_COMMIT_INFO = "
|
|
282563
|
-
var CLI_VERSION = "0.
|
|
282562
|
+
var GIT_COMMIT_INFO = "58ba19945";
|
|
282563
|
+
var CLI_VERSION = "0.56.0-nightly.20260806.g761f604c1";
|
|
282564
282564
|
|
|
282565
282565
|
// packages/core/dist/src/ide/detect-ide.js
|
|
282566
282566
|
var IDE_DEFINITIONS = {
|
|
@@ -305823,7 +305823,7 @@ function getVersion() {
|
|
|
305823
305823
|
}
|
|
305824
305824
|
versionPromise = (async () => {
|
|
305825
305825
|
const pkgJson = await getPackageJson(__dirname4);
|
|
305826
|
-
return "0.
|
|
305826
|
+
return "0.56.0-nightly.20260806.g761f604c1";
|
|
305827
305827
|
})();
|
|
305828
305828
|
return versionPromise;
|
|
305829
305829
|
}
|
|
@@ -338558,7 +338558,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
338558
338558
|
return provider;
|
|
338559
338559
|
}
|
|
338560
338560
|
case "oauth2": {
|
|
338561
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
338561
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-EO6C45X7.js");
|
|
338562
338562
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
338563
338563
|
await provider.initialize();
|
|
338564
338564
|
return provider;
|
|
@@ -365882,6 +365882,29 @@ import * as http2 from "node:http";
|
|
|
365882
365882
|
import * as crypto19 from "node:crypto";
|
|
365883
365883
|
import { URL as URL6 } from "node:url";
|
|
365884
365884
|
var REDIRECT_PATH = "/oauth/callback";
|
|
365885
|
+
function getRedirectUri(config2, redirectPort) {
|
|
365886
|
+
if (process.env["GOOGLE_CLOUD_WORKSTATIONS"] === "true" && process.env["WEB_HOST"]) {
|
|
365887
|
+
if (config2.redirectUri) {
|
|
365888
|
+
try {
|
|
365889
|
+
const parsed = new URL6(config2.redirectUri);
|
|
365890
|
+
if (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]") {
|
|
365891
|
+
const port = String(redirectPort);
|
|
365892
|
+
parsed.protocol = "https:";
|
|
365893
|
+
parsed.hostname = `${port}-${process.env["WEB_HOST"]}`;
|
|
365894
|
+
parsed.port = "";
|
|
365895
|
+
return parsed.toString();
|
|
365896
|
+
}
|
|
365897
|
+
} catch {
|
|
365898
|
+
}
|
|
365899
|
+
return config2.redirectUri;
|
|
365900
|
+
}
|
|
365901
|
+
return `https://${redirectPort}-${process.env["WEB_HOST"]}${REDIRECT_PATH}`;
|
|
365902
|
+
}
|
|
365903
|
+
if (config2.redirectUri) {
|
|
365904
|
+
return config2.redirectUri;
|
|
365905
|
+
}
|
|
365906
|
+
return `http://localhost:${redirectPort}${REDIRECT_PATH}`;
|
|
365907
|
+
}
|
|
365885
365908
|
var HTTP_OK = 200;
|
|
365886
365909
|
function generatePKCEParams() {
|
|
365887
365910
|
const codeVerifier = crypto19.randomBytes(64).toString("base64url");
|
|
@@ -366015,7 +366038,7 @@ function getPortFromUrl(urlString) {
|
|
|
366015
366038
|
return void 0;
|
|
366016
366039
|
}
|
|
366017
366040
|
function buildAuthorizationUrl(config2, pkceParams, redirectPort, resource) {
|
|
366018
|
-
const redirectUri = config2
|
|
366041
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366019
366042
|
const params = new URLSearchParams({
|
|
366020
366043
|
client_id: config2.clientId,
|
|
366021
366044
|
response_type: "code",
|
|
@@ -366104,7 +366127,7 @@ async function parseTokenEndpointResponse(response, operationName, defaultErrorC
|
|
|
366104
366127
|
};
|
|
366105
366128
|
}
|
|
366106
366129
|
async function exchangeCodeForToken(config2, code, codeVerifier, redirectPort, resource) {
|
|
366107
|
-
const redirectUri = config2
|
|
366130
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366108
366131
|
const params = new URLSearchParams({
|
|
366109
366132
|
grant_type: "authorization_code",
|
|
366110
366133
|
code,
|
|
@@ -366175,7 +366198,7 @@ var MCPOAuthProvider = class {
|
|
|
366175
366198
|
* @returns The registered client information
|
|
366176
366199
|
*/
|
|
366177
366200
|
async registerClient(registrationUrl, config2, redirectPort) {
|
|
366178
|
-
const redirectUri = config2
|
|
366201
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366179
366202
|
const registrationRequest = {
|
|
366180
366203
|
client_name: "Gemini CLI MCP Client",
|
|
366181
366204
|
redirect_uris: [redirectUri],
|
|
@@ -366464,10 +366487,11 @@ ${authUrl}
|
|
|
366464
366487
|
debugLogger.debug(`Returning valid token for server: ${serverName}`);
|
|
366465
366488
|
return token2.accessToken;
|
|
366466
366489
|
}
|
|
366467
|
-
|
|
366490
|
+
const clientId = config2.clientId ?? credentials3.clientId;
|
|
366491
|
+
if (token2.refreshToken && clientId && credentials3.tokenUrl) {
|
|
366468
366492
|
try {
|
|
366469
366493
|
debugLogger.log(`Refreshing expired token for MCP server: ${serverName}`);
|
|
366470
|
-
const newTokenResponse = await this.refreshAccessToken(config2, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366494
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366471
366495
|
const newToken = {
|
|
366472
366496
|
accessToken: newTokenResponse.access_token,
|
|
366473
366497
|
tokenType: newTokenResponse.token_type,
|
|
@@ -366477,7 +366501,7 @@ ${authUrl}
|
|
|
366477
366501
|
if (newTokenResponse.expires_in) {
|
|
366478
366502
|
newToken.expiresAt = Date.now() + newTokenResponse.expires_in * 1e3;
|
|
366479
366503
|
}
|
|
366480
|
-
await this.tokenStorage.saveToken(serverName, newToken,
|
|
366504
|
+
await this.tokenStorage.saveToken(serverName, newToken, clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366481
366505
|
return newToken.accessToken;
|
|
366482
366506
|
} catch (error40) {
|
|
366483
366507
|
coreEvents.emitFeedback("error", "Failed to refresh auth token.", error40);
|
|
@@ -366495,7 +366519,7 @@ ${authUrl}
|
|
|
366495
366519
|
const clientId = config2.clientId ?? credentials3.clientId;
|
|
366496
366520
|
if (current.refreshToken && clientId && credentials3.tokenUrl) {
|
|
366497
366521
|
try {
|
|
366498
|
-
const newTokenResponse = await this.refreshAccessToken(config2, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366522
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366499
366523
|
const refreshed = {
|
|
366500
366524
|
accessToken: newTokenResponse.access_token,
|
|
366501
366525
|
tokenType: newTokenResponse.token_type,
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4VCYHMUV.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4PTN4HDB.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QCOIICKD.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MXXWTJ5T.js";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MXXWTJ5T.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ZYL2LM3Y.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const require = (await import('node:module')).createRequire(import.meta.url); const __chunk_filename = (await import('node:url')).fileURLToPath(import.meta.url); const __chunk_dirname = (await import('node:path')).dirname(__chunk_filename);
|
|
2
2
|
import {
|
|
3
3
|
runExitCleanup
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PG6A7S3N.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QCOIICKD.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/src/utils/installationInfo.ts
|
|
13
13
|
import * as fs from "node:fs";
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
exitCli,
|
|
4
4
|
require_source
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7PUNXJV6.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_PORT,
|
|
8
8
|
SERVER_START_WAIT_MS,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
isServerRunning,
|
|
15
15
|
resolveGemmaConfig,
|
|
16
16
|
writeServerProcessInfo
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CBP73R2W.js";
|
|
18
18
|
import {
|
|
19
19
|
debugLogger
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TBDX7VEE.js";
|
|
21
21
|
import {
|
|
22
22
|
__toESM
|
|
23
23
|
} from "./chunk-34MYV7JD.js";
|
|
@@ -282559,8 +282559,8 @@ function isValidToolName(name3, options = {}) {
|
|
|
282559
282559
|
}
|
|
282560
282560
|
|
|
282561
282561
|
// packages/core/dist/src/generated/git-commit.js
|
|
282562
|
-
var GIT_COMMIT_INFO = "
|
|
282563
|
-
var CLI_VERSION = "0.
|
|
282562
|
+
var GIT_COMMIT_INFO = "58ba19945";
|
|
282563
|
+
var CLI_VERSION = "0.56.0-nightly.20260806.g761f604c1";
|
|
282564
282564
|
|
|
282565
282565
|
// packages/core/dist/src/ide/detect-ide.js
|
|
282566
282566
|
var IDE_DEFINITIONS = {
|
|
@@ -305823,7 +305823,7 @@ function getVersion() {
|
|
|
305823
305823
|
}
|
|
305824
305824
|
versionPromise = (async () => {
|
|
305825
305825
|
const pkgJson = await getPackageJson(__dirname4);
|
|
305826
|
-
return "0.55.
|
|
305826
|
+
return "0.55.1";
|
|
305827
305827
|
})();
|
|
305828
305828
|
return versionPromise;
|
|
305829
305829
|
}
|
|
@@ -338558,7 +338558,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
338558
338558
|
return provider;
|
|
338559
338559
|
}
|
|
338560
338560
|
case "oauth2": {
|
|
338561
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
338561
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-D5ATF6IJ.js");
|
|
338562
338562
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
338563
338563
|
await provider.initialize();
|
|
338564
338564
|
return provider;
|
|
@@ -365882,6 +365882,29 @@ import * as http2 from "node:http";
|
|
|
365882
365882
|
import * as crypto19 from "node:crypto";
|
|
365883
365883
|
import { URL as URL6 } from "node:url";
|
|
365884
365884
|
var REDIRECT_PATH = "/oauth/callback";
|
|
365885
|
+
function getRedirectUri(config2, redirectPort) {
|
|
365886
|
+
if (process.env["GOOGLE_CLOUD_WORKSTATIONS"] === "true" && process.env["WEB_HOST"]) {
|
|
365887
|
+
if (config2.redirectUri) {
|
|
365888
|
+
try {
|
|
365889
|
+
const parsed = new URL6(config2.redirectUri);
|
|
365890
|
+
if (parsed.hostname === "localhost" || parsed.hostname === "127.0.0.1" || parsed.hostname === "[::1]") {
|
|
365891
|
+
const port = String(redirectPort);
|
|
365892
|
+
parsed.protocol = "https:";
|
|
365893
|
+
parsed.hostname = `${port}-${process.env["WEB_HOST"]}`;
|
|
365894
|
+
parsed.port = "";
|
|
365895
|
+
return parsed.toString();
|
|
365896
|
+
}
|
|
365897
|
+
} catch {
|
|
365898
|
+
}
|
|
365899
|
+
return config2.redirectUri;
|
|
365900
|
+
}
|
|
365901
|
+
return `https://${redirectPort}-${process.env["WEB_HOST"]}${REDIRECT_PATH}`;
|
|
365902
|
+
}
|
|
365903
|
+
if (config2.redirectUri) {
|
|
365904
|
+
return config2.redirectUri;
|
|
365905
|
+
}
|
|
365906
|
+
return `http://localhost:${redirectPort}${REDIRECT_PATH}`;
|
|
365907
|
+
}
|
|
365885
365908
|
var HTTP_OK = 200;
|
|
365886
365909
|
function generatePKCEParams() {
|
|
365887
365910
|
const codeVerifier = crypto19.randomBytes(64).toString("base64url");
|
|
@@ -366015,7 +366038,7 @@ function getPortFromUrl(urlString) {
|
|
|
366015
366038
|
return void 0;
|
|
366016
366039
|
}
|
|
366017
366040
|
function buildAuthorizationUrl(config2, pkceParams, redirectPort, resource) {
|
|
366018
|
-
const redirectUri = config2
|
|
366041
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366019
366042
|
const params = new URLSearchParams({
|
|
366020
366043
|
client_id: config2.clientId,
|
|
366021
366044
|
response_type: "code",
|
|
@@ -366104,7 +366127,7 @@ async function parseTokenEndpointResponse(response, operationName, defaultErrorC
|
|
|
366104
366127
|
};
|
|
366105
366128
|
}
|
|
366106
366129
|
async function exchangeCodeForToken(config2, code, codeVerifier, redirectPort, resource) {
|
|
366107
|
-
const redirectUri = config2
|
|
366130
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366108
366131
|
const params = new URLSearchParams({
|
|
366109
366132
|
grant_type: "authorization_code",
|
|
366110
366133
|
code,
|
|
@@ -366175,7 +366198,7 @@ var MCPOAuthProvider = class {
|
|
|
366175
366198
|
* @returns The registered client information
|
|
366176
366199
|
*/
|
|
366177
366200
|
async registerClient(registrationUrl, config2, redirectPort) {
|
|
366178
|
-
const redirectUri = config2
|
|
366201
|
+
const redirectUri = getRedirectUri(config2, redirectPort);
|
|
366179
366202
|
const registrationRequest = {
|
|
366180
366203
|
client_name: "Gemini CLI MCP Client",
|
|
366181
366204
|
redirect_uris: [redirectUri],
|
|
@@ -366464,10 +366487,11 @@ ${authUrl}
|
|
|
366464
366487
|
debugLogger.debug(`Returning valid token for server: ${serverName}`);
|
|
366465
366488
|
return token2.accessToken;
|
|
366466
366489
|
}
|
|
366467
|
-
|
|
366490
|
+
const clientId = config2.clientId ?? credentials3.clientId;
|
|
366491
|
+
if (token2.refreshToken && clientId && credentials3.tokenUrl) {
|
|
366468
366492
|
try {
|
|
366469
366493
|
debugLogger.log(`Refreshing expired token for MCP server: ${serverName}`);
|
|
366470
|
-
const newTokenResponse = await this.refreshAccessToken(config2, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366494
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, token2.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366471
366495
|
const newToken = {
|
|
366472
366496
|
accessToken: newTokenResponse.access_token,
|
|
366473
366497
|
tokenType: newTokenResponse.token_type,
|
|
@@ -366477,7 +366501,7 @@ ${authUrl}
|
|
|
366477
366501
|
if (newTokenResponse.expires_in) {
|
|
366478
366502
|
newToken.expiresAt = Date.now() + newTokenResponse.expires_in * 1e3;
|
|
366479
366503
|
}
|
|
366480
|
-
await this.tokenStorage.saveToken(serverName, newToken,
|
|
366504
|
+
await this.tokenStorage.saveToken(serverName, newToken, clientId, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366481
366505
|
return newToken.accessToken;
|
|
366482
366506
|
} catch (error40) {
|
|
366483
366507
|
coreEvents.emitFeedback("error", "Failed to refresh auth token.", error40);
|
|
@@ -366495,7 +366519,7 @@ ${authUrl}
|
|
|
366495
366519
|
const clientId = config2.clientId ?? credentials3.clientId;
|
|
366496
366520
|
if (current.refreshToken && clientId && credentials3.tokenUrl) {
|
|
366497
366521
|
try {
|
|
366498
|
-
const newTokenResponse = await this.refreshAccessToken(config2, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366522
|
+
const newTokenResponse = await this.refreshAccessToken({ ...config2, clientId }, current.refreshToken, credentials3.tokenUrl, credentials3.mcpServerUrl);
|
|
366499
366523
|
const refreshed = {
|
|
366500
366524
|
accessToken: newTokenResponse.access_token,
|
|
366501
366525
|
tokenType: newTokenResponse.token_type,
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-MXXWTJ5T.js";
|
|
15
|
+
import "./chunk-ZYL2LM3Y.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-QZIGFB5E.js";
|
|
15
|
+
import "./chunk-TBDX7VEE.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-PG6A7S3N.js";
|
|
15
|
+
import "./chunk-QCOIICKD.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -11,8 +11,8 @@ import {
|
|
|
11
11
|
runSyncCleanup,
|
|
12
12
|
setupSignalHandlers,
|
|
13
13
|
setupTtyCheck
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-MMGNXRKB.js";
|
|
15
|
+
import "./chunk-32XQ54AJ.js";
|
|
16
16
|
import "./chunk-664ZODQF.js";
|
|
17
17
|
import "./chunk-IUUIT4SU.js";
|
|
18
18
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CoreEvent,
|
|
4
4
|
coreEvents,
|
|
5
5
|
debugLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-32XQ54AJ.js";
|
|
7
7
|
import "./chunk-664ZODQF.js";
|
|
8
8
|
import "./chunk-IUUIT4SU.js";
|
|
9
9
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4325
4325
|
return;
|
|
4326
4326
|
}
|
|
4327
4327
|
try {
|
|
4328
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-
|
|
4328
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-DZLHUESI.js");
|
|
4329
4329
|
const url = await startDevToolsServer(config);
|
|
4330
4330
|
if (shouldLaunchBrowser()) {
|
|
4331
4331
|
try {
|
|
@@ -2,7 +2,7 @@ const require = (await import('node:module')).createRequire(import.meta.url); co
|
|
|
2
2
|
import {
|
|
3
3
|
coreEvents,
|
|
4
4
|
debugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QCOIICKD.js";
|
|
6
6
|
import "./chunk-664ZODQF.js";
|
|
7
7
|
import "./chunk-IUUIT4SU.js";
|
|
8
8
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -4324,7 +4324,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4324
4324
|
return;
|
|
4325
4325
|
}
|
|
4326
4326
|
try {
|
|
4327
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-
|
|
4327
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./core-IV4CNC54.js");
|
|
4328
4328
|
const url = await startDevToolsServer(config);
|
|
4329
4329
|
if (shouldLaunchBrowser()) {
|
|
4330
4330
|
try {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CoreEvent,
|
|
4
4
|
coreEvents,
|
|
5
5
|
debugLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TBDX7VEE.js";
|
|
7
7
|
import "./chunk-664ZODQF.js";
|
|
8
8
|
import "./chunk-IUUIT4SU.js";
|
|
9
9
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4325
4325
|
return;
|
|
4326
4326
|
}
|
|
4327
4327
|
try {
|
|
4328
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-
|
|
4328
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-GGMH7TPR.js");
|
|
4329
4329
|
const url = await startDevToolsServer(config);
|
|
4330
4330
|
if (shouldLaunchBrowser()) {
|
|
4331
4331
|
try {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
CoreEvent,
|
|
4
4
|
coreEvents,
|
|
5
5
|
debugLogger
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZYL2LM3Y.js";
|
|
7
7
|
import "./chunk-664ZODQF.js";
|
|
8
8
|
import "./chunk-IUUIT4SU.js";
|
|
9
9
|
import "./chunk-TUDYL3X4.js";
|
|
@@ -4325,7 +4325,7 @@ async function toggleDevToolsPanel(config, isOpen, toggle, setOpen) {
|
|
|
4325
4325
|
return;
|
|
4326
4326
|
}
|
|
4327
4327
|
try {
|
|
4328
|
-
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-
|
|
4328
|
+
const { openBrowserSecurely, shouldLaunchBrowser } = await import("./dist-6SH22WAQ.js");
|
|
4329
4329
|
const url = await startDevToolsServer(config);
|
|
4330
4330
|
if (shouldLaunchBrowser()) {
|
|
4331
4331
|
try {
|