@google/gemini-cli 0.59.0-preview.0 → 0.60.0-nightly.20260905.g85aca163f
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/bundled/chrome-devtools-mcp.mjs +1 -1
- package/bundle/bundled/third_party/index.js +1 -1
- package/bundle/{chunk-NQC3UDKG.js → chunk-3CDPEGVA.js} +1 -1
- package/bundle/{chunk-THPIH2AE.js → chunk-3MT62KJ7.js} +1 -1
- package/bundle/{chunk-23C4TBLH.js → chunk-3SPYWTAG.js} +2 -2
- package/bundle/{chunk-UGT6DHAE.js → chunk-AL25HEEO.js} +210 -46
- package/bundle/{chunk-52JU4ECF.js → chunk-AXAX7FSE.js} +3845 -2735
- package/bundle/{chunk-KDHW7PJD.js → chunk-B7XEMEN5.js} +3 -3
- package/bundle/{chunk-UZXNPI5Z.js → chunk-DFOZHS4G.js} +270 -93
- package/bundle/{chunk-UA5K3TB5.js → chunk-FIESYQDV.js} +3967 -2757
- package/bundle/{chunk-YI5PKR5L.js → chunk-FPVYQTVA.js} +11349 -16975
- package/bundle/{chunk-D6XI6WNG.js → chunk-FX53IMQ4.js} +1 -1
- package/bundle/{chunk-IJPZK2CD.js → chunk-FYCX7S2H.js} +1 -1
- package/bundle/{chunk-VCQFRV5A.js → chunk-G4V32KTT.js} +1 -1
- package/bundle/{chunk-M6UTVOUK.js → chunk-IK5LG3S5.js} +1 -1
- package/bundle/{chunk-YLSAASP5.js → chunk-JE7V5AAP.js} +3 -3
- package/bundle/{chunk-LXBSPQEH.js → chunk-JIXDRDKL.js} +25 -4
- package/bundle/{chunk-DH76W27O.js → chunk-KI4HA3RK.js} +2 -2
- package/bundle/{chunk-FXZRZ2YL.js → chunk-L5DTYBPR.js} +210 -46
- package/bundle/chunk-M2YOG367.js +398992 -0
- package/bundle/{chunk-ILPBRVSF.js → chunk-M4VSTX4X.js} +1 -1
- package/bundle/{chunk-55V2C3NE.js → chunk-N7PUYZ2C.js} +3 -3
- package/bundle/{chunk-HSRFT2PV.js → chunk-OI5WY42W.js} +2 -2
- package/bundle/{chunk-7QCPYRGC.js → chunk-OSSPFBB5.js} +1 -1
- package/bundle/{chunk-GPE57TQ5.js → chunk-PHCDH4SW.js} +32 -8
- package/bundle/{chunk-GOBGZY54.js → chunk-Q5CIEKL6.js} +9 -8
- package/bundle/chunk-QCBXPS5K.js +154 -0
- package/bundle/chunk-TVCSMCKT.js +512 -0
- package/bundle/chunk-VEXKBYW3.js +1571 -0
- package/bundle/{chunk-F45BTUYK.js → chunk-VIXOL23X.js} +25 -4
- package/bundle/chunk-VKWL57SN.js +102670 -0
- package/bundle/chunk-W7R7PC32.js +17353 -0
- package/bundle/chunk-XTLORUWQ.js +398 -0
- package/bundle/chunk-ZIQEES26.js +118 -0
- package/bundle/{cleanup-IGZ72X72.js → cleanup-3YWFIXB3.js} +2 -2
- package/bundle/{cleanup-OHSG4ABA.js → cleanup-NQDXOU2K.js} +2 -2
- package/bundle/{cleanup-VTATI2S7.js → cleanup-SXOQFKSA.js} +2 -2
- package/bundle/cleanup-XSTC4XRT.js +32 -0
- package/bundle/{core-XJO3GR5B.js → core-T6ZA3RPN.js} +25 -1
- package/bundle/{devtoolsService-OSXWGLT3.js → devtoolsService-AYPMPUPD.js} +2 -2
- package/bundle/{devtoolsService-VQJ4XEED.js → devtoolsService-FPEN37GX.js} +4 -3
- package/bundle/{devtoolsService-TJCP6X22.js → devtoolsService-J5IMHON6.js} +2 -2
- package/bundle/devtoolsService-UV75F4RP.js +4359 -0
- package/bundle/{dist-KC5GXNU5.js → dist-CUTV6FXO.js} +25 -1
- package/bundle/{core-Q2DBVF5E.js → dist-QOCIGEB4.js} +25 -1
- package/bundle/dist-ZTPNJYCX.js +2212 -0
- package/bundle/docs/changelogs/index.md +20 -0
- package/bundle/docs/changelogs/latest.md +32 -281
- package/bundle/docs/changelogs/preview.md +18 -31
- package/bundle/docs/reference/tools.md +4 -4
- package/bundle/docs/tools/mcp-server.md +53 -0
- package/bundle/docs/tools/web-fetch.md +7 -3
- package/bundle/{gemini-FMVYHQ4P.js → gemini-DM7UHG5I.js} +56 -23
- package/bundle/{gemini-G4U2XJ5N.js → gemini-JANWUJ6X.js} +56 -23
- package/bundle/{gemini-G3Y4ZBUW.js → gemini-UBKFBQUZ.js} +256 -207
- package/bundle/gemini-ZT27CSNJ.js +17370 -0
- package/bundle/gemini.js +7 -7
- package/bundle/{interactiveCli-ODBGO5ZB.js → interactiveCli-AGRRFZQX.js} +8 -8
- package/bundle/{interactiveCli-J7RHUM6Y.js → interactiveCli-NC7ZBX74.js} +8 -8
- package/bundle/{interactiveCli-DFQDNRQR.js → interactiveCli-Q2LPGB6L.js} +315 -296
- package/bundle/interactiveCli-WG2TABNS.js +34983 -0
- package/bundle/{liteRtServerManager-FYXZXFSP.js → liteRtServerManager-6DPVBVVU.js} +4 -4
- package/bundle/{liteRtServerManager-H3DCLTFE.js → liteRtServerManager-HE2FE4FH.js} +4 -4
- package/bundle/{liteRtServerManager-BEQPNIUI.js → liteRtServerManager-JSW26OPJ.js} +4 -4
- package/bundle/liteRtServerManager-PJ223Y36.js +65 -0
- package/bundle/{oauth2-provider-2DCMBS2D.js → oauth2-provider-BR53NDPU.js} +1 -1
- package/bundle/{oauth2-provider-3RBG2E74.js → oauth2-provider-I665TJQN.js} +1 -1
- package/bundle/{oauth2-provider-DX42O6UX.js → oauth2-provider-UBZT242N.js} +38 -72
- package/bundle/oauth2-provider-WUYROQ6O.js +235 -0
- package/bundle/{start-MJKXAIFL.js → start-AA23VJDL.js} +6 -6
- package/bundle/{start-R4LT7TW6.js → start-U6VMEF32.js} +6 -6
- package/bundle/{start-MIKPZTJ4.js → start-WLQTESZU.js} +6 -6
- package/bundle/start-YX32XE72.js +18 -0
- package/package.json +1 -1
|
@@ -214893,7 +214893,7 @@ For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides
|
|
|
214893
214893
|
};
|
|
214894
214894
|
str_$n = registerUIStrings("models/crux-manager/CrUXManager.ts", UIStrings$o);
|
|
214895
214895
|
i18nString$a = getLocalizedString.bind(void 0, str_$n);
|
|
214896
|
-
CRUX_API_KEY = "
|
|
214896
|
+
CRUX_API_KEY = (process.env.CRUX_API_KEY || "");
|
|
214897
214897
|
DEFAULT_ENDPOINT = `https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=${CRUX_API_KEY}`;
|
|
214898
214898
|
DEVICE_SCOPE_LIST = ["ALL", "DESKTOP", "PHONE"];
|
|
214899
214899
|
pageScopeList = ["origin", "url"];
|
|
@@ -164530,7 +164530,7 @@ const UIStrings$o = {
|
|
|
164530
164530
|
};
|
|
164531
164531
|
const str_$n = registerUIStrings('models/crux-manager/CrUXManager.ts', UIStrings$o);
|
|
164532
164532
|
const i18nString$a = getLocalizedString.bind(undefined, str_$n);
|
|
164533
|
-
const CRUX_API_KEY =
|
|
164533
|
+
const CRUX_API_KEY = (process.env.CRUX_API_KEY || "");
|
|
164534
164534
|
const DEFAULT_ENDPOINT = `https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=${CRUX_API_KEY}`;
|
|
164535
164535
|
let cruxManagerInstance;
|
|
164536
164536
|
const DEVICE_SCOPE_LIST = ['ALL', 'DESKTOP', 'PHONE'];
|
|
@@ -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-QCBXPS5K.js";
|
|
5
5
|
import {
|
|
6
6
|
RELEASE_CHANNEL_STABILITY,
|
|
7
7
|
debugLogger,
|
|
8
8
|
getChannelFromVersion,
|
|
9
9
|
isGitRepository
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-M2YOG367.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-FYCX7S2H.js";
|
|
6
6
|
import {
|
|
7
7
|
AppEvent,
|
|
8
8
|
appEvents
|
|
@@ -59,14 +59,14 @@ import {
|
|
|
59
59
|
stripUnsafeCharacters,
|
|
60
60
|
toCodePoints,
|
|
61
61
|
validateCustomTheme
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-JIXDRDKL.js";
|
|
63
63
|
import {
|
|
64
64
|
isDevelopment
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-OI5WY42W.js";
|
|
66
66
|
import {
|
|
67
67
|
emptyIcon,
|
|
68
68
|
require_react
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-TVCSMCKT.js";
|
|
70
70
|
import {
|
|
71
71
|
ALL_EDITORS,
|
|
72
72
|
ApprovalMode,
|
|
@@ -244,7 +244,7 @@ import {
|
|
|
244
244
|
tokenLimit,
|
|
245
245
|
uiTelemetryService,
|
|
246
246
|
unescapePath
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-AXAX7FSE.js";
|
|
248
248
|
import {
|
|
249
249
|
require_src
|
|
250
250
|
} from "./chunk-TUDYL3X4.js";
|
|
@@ -25734,11 +25734,11 @@ var require_util4 = __commonJS({
|
|
|
25734
25734
|
var { isUint8Array } = __require("node:util/types");
|
|
25735
25735
|
var { webidl } = require_webidl();
|
|
25736
25736
|
var supportedHashes = [];
|
|
25737
|
-
var
|
|
25737
|
+
var crypto3;
|
|
25738
25738
|
try {
|
|
25739
|
-
|
|
25739
|
+
crypto3 = __require("node:crypto");
|
|
25740
25740
|
const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
|
|
25741
|
-
supportedHashes =
|
|
25741
|
+
supportedHashes = crypto3.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
|
|
25742
25742
|
} catch {
|
|
25743
25743
|
}
|
|
25744
25744
|
function responseURL(response) {
|
|
@@ -26041,7 +26041,7 @@ var require_util4 = __commonJS({
|
|
|
26041
26041
|
return isOriginPotentiallyTrustworthy(url.origin);
|
|
26042
26042
|
}
|
|
26043
26043
|
function bytesMatch(bytes, metadataList) {
|
|
26044
|
-
if (
|
|
26044
|
+
if (crypto3 === void 0) {
|
|
26045
26045
|
return true;
|
|
26046
26046
|
}
|
|
26047
26047
|
const parsedMetadata = parseMetadata(metadataList);
|
|
@@ -26056,7 +26056,7 @@ var require_util4 = __commonJS({
|
|
|
26056
26056
|
for (const item of metadata) {
|
|
26057
26057
|
const algorithm = item.algo;
|
|
26058
26058
|
const expectedValue = item.hash;
|
|
26059
|
-
let actualValue =
|
|
26059
|
+
let actualValue = crypto3.createHash(algorithm).update(bytes).digest("base64");
|
|
26060
26060
|
if (actualValue[actualValue.length - 1] === "=") {
|
|
26061
26061
|
if (actualValue[actualValue.length - 2] === "=") {
|
|
26062
26062
|
actualValue = actualValue.slice(0, -2);
|
|
@@ -27074,8 +27074,8 @@ var require_body = __commonJS({
|
|
|
27074
27074
|
var { multipartFormDataParser } = require_formdata_parser();
|
|
27075
27075
|
var random;
|
|
27076
27076
|
try {
|
|
27077
|
-
const
|
|
27078
|
-
random = (max) =>
|
|
27077
|
+
const crypto3 = __require("node:crypto");
|
|
27078
|
+
random = (max) => crypto3.randomInt(0, max);
|
|
27079
27079
|
} catch {
|
|
27080
27080
|
random = (max) => Math.floor(Math.random() * max);
|
|
27081
27081
|
}
|
|
@@ -39992,13 +39992,13 @@ var require_frame = __commonJS({
|
|
|
39992
39992
|
"use strict";
|
|
39993
39993
|
var { maxUnsigned16Bit, opcodes } = require_constants7();
|
|
39994
39994
|
var BUFFER_SIZE = 8 * 1024;
|
|
39995
|
-
var
|
|
39995
|
+
var crypto3;
|
|
39996
39996
|
var buffer = null;
|
|
39997
39997
|
var bufIdx = BUFFER_SIZE;
|
|
39998
39998
|
try {
|
|
39999
|
-
|
|
39999
|
+
crypto3 = __require("node:crypto");
|
|
40000
40000
|
} catch {
|
|
40001
|
-
|
|
40001
|
+
crypto3 = {
|
|
40002
40002
|
// not full compatibility, but minimum.
|
|
40003
40003
|
randomFillSync: function randomFillSync(buffer2, _offset, _size) {
|
|
40004
40004
|
for (let i = 0; i < buffer2.length; ++i) {
|
|
@@ -40011,7 +40011,7 @@ var require_frame = __commonJS({
|
|
|
40011
40011
|
function generateMask() {
|
|
40012
40012
|
if (bufIdx === BUFFER_SIZE) {
|
|
40013
40013
|
bufIdx = 0;
|
|
40014
|
-
|
|
40014
|
+
crypto3.randomFillSync(buffer ??= Buffer.allocUnsafeSlow(BUFFER_SIZE), 0, BUFFER_SIZE);
|
|
40015
40015
|
}
|
|
40016
40016
|
return [buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++], buffer[bufIdx++]];
|
|
40017
40017
|
}
|
|
@@ -40109,9 +40109,9 @@ var require_connection = __commonJS({
|
|
|
40109
40109
|
var { getDecodeSplit } = require_util4();
|
|
40110
40110
|
var { WebsocketFrameSend } = require_frame();
|
|
40111
40111
|
var assert = __require("node:assert");
|
|
40112
|
-
var
|
|
40112
|
+
var crypto3;
|
|
40113
40113
|
try {
|
|
40114
|
-
|
|
40114
|
+
crypto3 = __require("node:crypto");
|
|
40115
40115
|
} catch {
|
|
40116
40116
|
}
|
|
40117
40117
|
function establishWebSocketConnection(url, protocols, client, handler2, options) {
|
|
@@ -40131,7 +40131,7 @@ var require_connection = __commonJS({
|
|
|
40131
40131
|
const headersList = getHeadersList(new Headers(options.headers));
|
|
40132
40132
|
request.headersList = headersList;
|
|
40133
40133
|
}
|
|
40134
|
-
const keyValue =
|
|
40134
|
+
const keyValue = crypto3.randomBytes(16).toString("base64");
|
|
40135
40135
|
request.headersList.append("sec-websocket-key", keyValue, true);
|
|
40136
40136
|
request.headersList.append("sec-websocket-version", "13", true);
|
|
40137
40137
|
for (const protocol of protocols) {
|
|
@@ -40164,7 +40164,7 @@ var require_connection = __commonJS({
|
|
|
40164
40164
|
return;
|
|
40165
40165
|
}
|
|
40166
40166
|
const secWSAccept = response.headersList.get("Sec-WebSocket-Accept");
|
|
40167
|
-
const digest =
|
|
40167
|
+
const digest = crypto3.createHash("sha1").update(keyValue + uid).digest("base64");
|
|
40168
40168
|
if (secWSAccept !== digest) {
|
|
40169
40169
|
failWebsocketConnection(handler2, 1002, "Incorrect hash received in Sec-WebSocket-Accept header.");
|
|
40170
40170
|
return;
|
|
@@ -60865,6 +60865,7 @@ async function validateAuthMethod(authMethod) {
|
|
|
60865
60865
|
}
|
|
60866
60866
|
|
|
60867
60867
|
// packages/cli/src/config/extensions/consent.ts
|
|
60868
|
+
import * as crypto from "node:crypto";
|
|
60868
60869
|
import * as fs9 from "node:fs/promises";
|
|
60869
60870
|
import * as path3 from "node:path";
|
|
60870
60871
|
var import_chalk4 = __toESM(require_source(), 1);
|
|
@@ -60934,6 +60935,27 @@ async function promptForConsentInteractive(prompt, addExtensionUpdateConfirmatio
|
|
|
60934
60935
|
});
|
|
60935
60936
|
});
|
|
60936
60937
|
}
|
|
60938
|
+
function isRecord(value) {
|
|
60939
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
60940
|
+
}
|
|
60941
|
+
function getMcpServerConfigHash(mcpServer) {
|
|
60942
|
+
const plainMcpServer = isRecord(mcpServer) ? mcpServer : {};
|
|
60943
|
+
const copy = { ...plainMcpServer };
|
|
60944
|
+
delete copy["extension"];
|
|
60945
|
+
const canonicalString = JSON.stringify(copy, (key, value) => {
|
|
60946
|
+
if (value instanceof RegExp) {
|
|
60947
|
+
return value.toString();
|
|
60948
|
+
}
|
|
60949
|
+
if (isRecord(value)) {
|
|
60950
|
+
return Object.keys(value).sort().reduce((result, k2) => {
|
|
60951
|
+
result[k2] = value[k2];
|
|
60952
|
+
return result;
|
|
60953
|
+
}, {});
|
|
60954
|
+
}
|
|
60955
|
+
return value;
|
|
60956
|
+
});
|
|
60957
|
+
return crypto.createHash("sha256").update(canonicalString).digest("hex");
|
|
60958
|
+
}
|
|
60937
60959
|
async function extensionConsentString(extensionConfig, hasHooks, skills = [], previousName, wasMigrated) {
|
|
60938
60960
|
const sanitizedConfig = escapeAnsiCtrlCodes(extensionConfig);
|
|
60939
60961
|
const output = [];
|
|
@@ -60961,6 +60983,83 @@ async function extensionConsentString(extensionConfig, hasHooks, skills = [], pr
|
|
|
60961
60983
|
const isLocal = !!mcpServer.command;
|
|
60962
60984
|
const source2 = mcpServer.httpUrl ?? `${mcpServer.command || ""}${mcpServer.args ? " " + mcpServer.args.join(" ") : ""}`;
|
|
60963
60985
|
output.push(` * ${key} (${isLocal ? "local" : "remote"}): ${source2}`);
|
|
60986
|
+
if (mcpServer.cwd) {
|
|
60987
|
+
output.push(` Working directory: ${mcpServer.cwd}`);
|
|
60988
|
+
}
|
|
60989
|
+
if (mcpServer.env && Object.keys(mcpServer.env).length > 0) {
|
|
60990
|
+
output.push(" Environment variables:");
|
|
60991
|
+
const sortedEnv = Object.entries(mcpServer.env).sort(
|
|
60992
|
+
([a], [b2]) => a.localeCompare(b2)
|
|
60993
|
+
);
|
|
60994
|
+
for (const [envKey, envValue] of sortedEnv) {
|
|
60995
|
+
const isSensitive = /token|secret|password|passwd|key|auth|credential|creds|private|cert/i.test(
|
|
60996
|
+
envKey
|
|
60997
|
+
);
|
|
60998
|
+
const displayValue = isSensitive && envValue ? "********" : envValue ?? "";
|
|
60999
|
+
output.push(` - ${envKey}: ${displayValue}`);
|
|
61000
|
+
}
|
|
61001
|
+
}
|
|
61002
|
+
if (mcpServer.headers && Object.keys(mcpServer.headers).length > 0) {
|
|
61003
|
+
output.push(" Headers:");
|
|
61004
|
+
const sortedHeaders = Object.entries(mcpServer.headers).sort(
|
|
61005
|
+
([a], [b2]) => a.localeCompare(b2)
|
|
61006
|
+
);
|
|
61007
|
+
for (const [headerKey, headerValue] of sortedHeaders) {
|
|
61008
|
+
const isSensitive = /authorization|key|cookie|token|secret/i.test(
|
|
61009
|
+
headerKey
|
|
61010
|
+
);
|
|
61011
|
+
const displayValue = isSensitive && headerValue ? "********" : headerValue ?? "";
|
|
61012
|
+
output.push(` - ${headerKey}: ${displayValue}`);
|
|
61013
|
+
}
|
|
61014
|
+
}
|
|
61015
|
+
if (mcpServer.url) {
|
|
61016
|
+
output.push(` URL: ${mcpServer.url}`);
|
|
61017
|
+
}
|
|
61018
|
+
if (mcpServer.tcp) {
|
|
61019
|
+
output.push(` TCP: ${mcpServer.tcp}`);
|
|
61020
|
+
}
|
|
61021
|
+
if (mcpServer.type) {
|
|
61022
|
+
output.push(` Type: ${mcpServer.type}`);
|
|
61023
|
+
}
|
|
61024
|
+
if (mcpServer.timeout !== void 0) {
|
|
61025
|
+
output.push(` Timeout: ${mcpServer.timeout}`);
|
|
61026
|
+
}
|
|
61027
|
+
if (mcpServer.trust !== void 0) {
|
|
61028
|
+
output.push(` Trust: ${mcpServer.trust}`);
|
|
61029
|
+
}
|
|
61030
|
+
if (mcpServer.description) {
|
|
61031
|
+
output.push(` Description: ${mcpServer.description}`);
|
|
61032
|
+
}
|
|
61033
|
+
if (mcpServer.includeTools && mcpServer.includeTools.length > 0) {
|
|
61034
|
+
output.push(` Include tools: ${mcpServer.includeTools.join(", ")}`);
|
|
61035
|
+
}
|
|
61036
|
+
if (mcpServer.excludeTools && mcpServer.excludeTools.length > 0) {
|
|
61037
|
+
output.push(` Exclude tools: ${mcpServer.excludeTools.join(", ")}`);
|
|
61038
|
+
}
|
|
61039
|
+
if (mcpServer.authProviderType) {
|
|
61040
|
+
output.push(` Auth Provider Type: ${mcpServer.authProviderType}`);
|
|
61041
|
+
}
|
|
61042
|
+
if (mcpServer.targetAudience) {
|
|
61043
|
+
output.push(` Target Audience: ${mcpServer.targetAudience}`);
|
|
61044
|
+
}
|
|
61045
|
+
if (mcpServer.targetServiceAccount) {
|
|
61046
|
+
output.push(
|
|
61047
|
+
` Target Service Account: ${mcpServer.targetServiceAccount}`
|
|
61048
|
+
);
|
|
61049
|
+
}
|
|
61050
|
+
if (mcpServer.oauth) {
|
|
61051
|
+
output.push(" OAuth Configuration:");
|
|
61052
|
+
const sortedOauth = Object.entries(mcpServer.oauth).sort(
|
|
61053
|
+
([a], [b2]) => a.localeCompare(b2)
|
|
61054
|
+
);
|
|
61055
|
+
for (const [oKey, oValue] of sortedOauth) {
|
|
61056
|
+
const isSensitive = /secret|token|password/i.test(oKey);
|
|
61057
|
+
const valStr = Array.isArray(oValue) ? oValue.join(", ") : String(oValue ?? "");
|
|
61058
|
+
const displayValue = isSensitive && valStr ? "********" : valStr;
|
|
61059
|
+
output.push(` - ${oKey}: ${displayValue}`);
|
|
61060
|
+
}
|
|
61061
|
+
}
|
|
61062
|
+
output.push(` Config signature: ${getMcpServerConfigHash(mcpServer)}`);
|
|
60964
61063
|
}
|
|
60965
61064
|
}
|
|
60966
61065
|
if (sanitizedConfig.contextFileName) {
|
|
@@ -61576,7 +61675,7 @@ var ExtensionEnablementManager = class {
|
|
|
61576
61675
|
};
|
|
61577
61676
|
|
|
61578
61677
|
// packages/cli/src/config/extension-manager.ts
|
|
61579
|
-
import { createHash, randomUUID } from "node:crypto";
|
|
61678
|
+
import { createHash as createHash2, randomUUID } from "node:crypto";
|
|
61580
61679
|
|
|
61581
61680
|
// packages/cli/src/config/extension.ts
|
|
61582
61681
|
import * as fs13 from "node:fs";
|
|
@@ -65795,18 +65894,10 @@ Would you like to attempt to install via "git clone" instead?`
|
|
|
65795
65894
|
}
|
|
65796
65895
|
}
|
|
65797
65896
|
}
|
|
65798
|
-
const contextFiles =
|
|
65799
|
-
|
|
65800
|
-
|
|
65801
|
-
|
|
65802
|
-
);
|
|
65803
|
-
if (!isSubpath(effectiveExtensionPath, contextFilePath)) {
|
|
65804
|
-
throw new Error(
|
|
65805
|
-
`Invalid context file path: "${contextFileName}". Context files must be within the extension directory.`
|
|
65806
|
-
);
|
|
65807
|
-
}
|
|
65808
|
-
return contextFilePath;
|
|
65809
|
-
}).filter((contextFilePath) => fs16.existsSync(contextFilePath));
|
|
65897
|
+
const contextFiles = resolveContextFilePaths(
|
|
65898
|
+
config,
|
|
65899
|
+
effectiveExtensionPath
|
|
65900
|
+
);
|
|
65810
65901
|
const hydrationContext = {
|
|
65811
65902
|
extensionPath: effectiveExtensionPath,
|
|
65812
65903
|
workspacePath: this.workspaceDir,
|
|
@@ -65879,6 +65970,15 @@ Details: ${error.details}` : ""}`
|
|
|
65879
65970
|
`[ExtensionManager] Error loading agent from ${config.name}: ${error.message}`
|
|
65880
65971
|
);
|
|
65881
65972
|
}
|
|
65973
|
+
let plan = config.plan;
|
|
65974
|
+
if (plan?.directory) {
|
|
65975
|
+
if (typeof plan.directory !== "string" || path10.isAbsolute(plan.directory) || path10.win32.isAbsolute(plan.directory) || plan.directory.includes("..")) {
|
|
65976
|
+
debugLogger.warn(
|
|
65977
|
+
`[ExtensionManager] Invalid plan.directory in extension "${config.name}": "${plan.directory}". Relative parent navigation and absolute paths are not allowed.`
|
|
65978
|
+
);
|
|
65979
|
+
plan = void 0;
|
|
65980
|
+
}
|
|
65981
|
+
}
|
|
65882
65982
|
return {
|
|
65883
65983
|
name: config.name,
|
|
65884
65984
|
version: config.version,
|
|
@@ -65901,7 +66001,7 @@ Details: ${error.details}` : ""}`
|
|
|
65901
66001
|
themes: config.themes,
|
|
65902
66002
|
rules,
|
|
65903
66003
|
checkers,
|
|
65904
|
-
plan
|
|
66004
|
+
plan
|
|
65905
66005
|
};
|
|
65906
66006
|
} catch (e) {
|
|
65907
66007
|
debugLogger.error(
|
|
@@ -66156,6 +66256,69 @@ function getContextFileNames(config) {
|
|
|
66156
66256
|
}
|
|
66157
66257
|
return config.contextFileName;
|
|
66158
66258
|
}
|
|
66259
|
+
function validateContextFilePath(contextFileName, effectiveExtensionPath) {
|
|
66260
|
+
if (typeof contextFileName !== "string" || !contextFileName.trim()) {
|
|
66261
|
+
return {
|
|
66262
|
+
isValid: false,
|
|
66263
|
+
errorMessage: "expected a non-empty string."
|
|
66264
|
+
};
|
|
66265
|
+
}
|
|
66266
|
+
if (contextFileName.includes("\0")) {
|
|
66267
|
+
return {
|
|
66268
|
+
isValid: false,
|
|
66269
|
+
errorMessage: "null bytes are not allowed."
|
|
66270
|
+
};
|
|
66271
|
+
}
|
|
66272
|
+
if (path10.isAbsolute(contextFileName) || path10.win32.isAbsolute(contextFileName)) {
|
|
66273
|
+
return {
|
|
66274
|
+
isValid: false,
|
|
66275
|
+
errorMessage: "Absolute paths are not allowed."
|
|
66276
|
+
};
|
|
66277
|
+
}
|
|
66278
|
+
let decodedFileName = contextFileName;
|
|
66279
|
+
try {
|
|
66280
|
+
decodedFileName = decodeURIComponent(contextFileName);
|
|
66281
|
+
} catch {
|
|
66282
|
+
debugLogger.debug(
|
|
66283
|
+
`[ExtensionManager] Could not decode URI component in contextFileName: "${contextFileName}". Proceeding with undecoded name.`
|
|
66284
|
+
);
|
|
66285
|
+
}
|
|
66286
|
+
if (contextFileName.includes("..") || decodedFileName.includes("..")) {
|
|
66287
|
+
return {
|
|
66288
|
+
isValid: false,
|
|
66289
|
+
errorMessage: 'Relative parent directory references ("..") are not allowed.'
|
|
66290
|
+
};
|
|
66291
|
+
}
|
|
66292
|
+
const resolvedExtensionRoot = path10.resolve(effectiveExtensionPath);
|
|
66293
|
+
const contextFilePath = path10.resolve(resolvedExtensionRoot, contextFileName);
|
|
66294
|
+
if (!isSubpath(resolvedExtensionRoot, contextFilePath)) {
|
|
66295
|
+
return {
|
|
66296
|
+
isValid: false,
|
|
66297
|
+
errorMessage: `escapes the extension directory boundary ("${resolvedExtensionRoot}").`
|
|
66298
|
+
};
|
|
66299
|
+
}
|
|
66300
|
+
return {
|
|
66301
|
+
isValid: true,
|
|
66302
|
+
resolvedPath: contextFilePath
|
|
66303
|
+
};
|
|
66304
|
+
}
|
|
66305
|
+
function resolveContextFilePaths(config, effectiveExtensionPath) {
|
|
66306
|
+
return getContextFileNames(config).map((contextFileName) => {
|
|
66307
|
+
const validation = validateContextFilePath(
|
|
66308
|
+
contextFileName,
|
|
66309
|
+
effectiveExtensionPath
|
|
66310
|
+
);
|
|
66311
|
+
if (!validation.isValid) {
|
|
66312
|
+
debugLogger.warn(
|
|
66313
|
+
`[ExtensionManager] Invalid contextFileName: "${contextFileName}" in extension "${config.name}". ${validation.errorMessage}`
|
|
66314
|
+
);
|
|
66315
|
+
return null;
|
|
66316
|
+
}
|
|
66317
|
+
return validation.resolvedPath;
|
|
66318
|
+
}).filter(
|
|
66319
|
+
(contextFilePath) => contextFilePath !== null && fs16.existsSync(contextFilePath)
|
|
66320
|
+
);
|
|
66321
|
+
}
|
|
66159
66322
|
function validateName(name) {
|
|
66160
66323
|
if (!/^[a-zA-Z0-9-]+$/.test(name)) {
|
|
66161
66324
|
throw new Error(
|
|
@@ -66200,7 +66363,7 @@ function getExtensionId(config, installMetadata) {
|
|
|
66200
66363
|
return hashValue(idValue);
|
|
66201
66364
|
}
|
|
66202
66365
|
function hashValue(value) {
|
|
66203
|
-
return
|
|
66366
|
+
return createHash2("sha256").update(value).digest("hex");
|
|
66204
66367
|
}
|
|
66205
66368
|
|
|
66206
66369
|
// packages/cli/src/config/mcp/mcpServerEnablement.ts
|
|
@@ -66477,7 +66640,7 @@ function getDialogRestartRequiredSettings() {
|
|
|
66477
66640
|
(definition) => definition.requiresRestart && definition.showInDialog !== false
|
|
66478
66641
|
).map((definition) => definition.key);
|
|
66479
66642
|
}
|
|
66480
|
-
function
|
|
66643
|
+
function isRecord2(value) {
|
|
66481
66644
|
return typeof value === "object" && value !== null;
|
|
66482
66645
|
}
|
|
66483
66646
|
function isSettingsValue(value) {
|
|
@@ -66489,7 +66652,7 @@ function isSettingsValue(value) {
|
|
|
66489
66652
|
function getNestedValue(obj, path38) {
|
|
66490
66653
|
let current = obj;
|
|
66491
66654
|
for (const key of path38) {
|
|
66492
|
-
if (!
|
|
66655
|
+
if (!isRecord2(current) || !(key in current)) {
|
|
66493
66656
|
return void 0;
|
|
66494
66657
|
}
|
|
66495
66658
|
current = current[key];
|
|
@@ -66556,7 +66719,7 @@ function tryParseJsonStringArray(input) {
|
|
|
66556
66719
|
function tryParseJsonObject(input) {
|
|
66557
66720
|
try {
|
|
66558
66721
|
const parsed = JSON.parse(input);
|
|
66559
|
-
if (
|
|
66722
|
+
if (isRecord2(parsed) && !Array.isArray(parsed)) {
|
|
66560
66723
|
return parsed;
|
|
66561
66724
|
}
|
|
66562
66725
|
return null;
|
|
@@ -67157,8 +67320,8 @@ var import_execa = __toESM(require_execa(), 1);
|
|
|
67157
67320
|
|
|
67158
67321
|
// node_modules/crypto-random-string/index.js
|
|
67159
67322
|
import { promisify } from "util";
|
|
67160
|
-
import
|
|
67161
|
-
var randomBytesAsync = promisify(
|
|
67323
|
+
import crypto2 from "crypto";
|
|
67324
|
+
var randomBytesAsync = promisify(crypto2.randomBytes);
|
|
67162
67325
|
var urlSafeCharacters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split("");
|
|
67163
67326
|
var numericCharacters = "0123456789".split("");
|
|
67164
67327
|
var distinguishableCharacters = "CDEHKMPRTUWXY012458".split("");
|
|
@@ -67171,7 +67334,7 @@ var generateForCustomCharacters = (length, characters) => {
|
|
|
67171
67334
|
let string = "";
|
|
67172
67335
|
let stringLength = 0;
|
|
67173
67336
|
while (stringLength < length) {
|
|
67174
|
-
const entropy =
|
|
67337
|
+
const entropy = crypto2.randomBytes(entropyLength);
|
|
67175
67338
|
let entropyPosition = 0;
|
|
67176
67339
|
while (entropyPosition < entropyLength && stringLength < length) {
|
|
67177
67340
|
const entropyValue = entropy.readUInt16LE(entropyPosition);
|
|
@@ -67206,7 +67369,7 @@ var generateForCustomCharactersAsync = async (length, characters) => {
|
|
|
67206
67369
|
}
|
|
67207
67370
|
return string;
|
|
67208
67371
|
};
|
|
67209
|
-
var generateRandomBytes = (byteLength, type, length) =>
|
|
67372
|
+
var generateRandomBytes = (byteLength, type, length) => crypto2.randomBytes(byteLength).toString(type).slice(0, length);
|
|
67210
67373
|
var generateRandomBytesAsync = async (byteLength, type, length) => {
|
|
67211
67374
|
const buffer = await randomBytesAsync(byteLength);
|
|
67212
67375
|
return buffer.toString(type).slice(0, length);
|
|
@@ -77177,7 +77340,7 @@ var authCommand = {
|
|
|
77177
77340
|
import process29 from "node:process";
|
|
77178
77341
|
|
|
77179
77342
|
// packages/cli/src/generated/git-commit.ts
|
|
77180
|
-
var GIT_COMMIT_INFO = "
|
|
77343
|
+
var GIT_COMMIT_INFO = "85aca163f";
|
|
77181
77344
|
|
|
77182
77345
|
// packages/cli/src/ui/utils/historyExportUtils.ts
|
|
77183
77346
|
import * as fsPromises from "node:fs/promises";
|
|
@@ -78990,7 +79153,7 @@ var ExtensionRegistryClient = class _ExtensionRegistryClient {
|
|
|
78990
79153
|
_ExtensionRegistryClient.fetchPromise = (async () => {
|
|
78991
79154
|
try {
|
|
78992
79155
|
if (uri.startsWith("http")) {
|
|
78993
|
-
if (isPrivateIp(uri)) {
|
|
79156
|
+
if (await isPrivateIp(uri)) {
|
|
78994
79157
|
throw new Error(
|
|
78995
79158
|
"Private IP addresses are not allowed for the extension registry."
|
|
78996
79159
|
);
|
|
@@ -82958,7 +83121,7 @@ Use /mcp auth <server-name> to authenticate.`
|
|
|
82958
83121
|
type: "info",
|
|
82959
83122
|
text: `Starting OAuth authentication for MCP server '${serverName}'...`
|
|
82960
83123
|
});
|
|
82961
|
-
const { MCPOAuthProvider } = await import("./dist-
|
|
83124
|
+
const { MCPOAuthProvider } = await import("./dist-CUTV6FXO.js");
|
|
82962
83125
|
let oauthConfig = server.oauth;
|
|
82963
83126
|
if (!oauthConfig) {
|
|
82964
83127
|
oauthConfig = { enabled: false };
|
|
@@ -102142,6 +102305,7 @@ export {
|
|
|
102142
102305
|
configureAllExtensions,
|
|
102143
102306
|
getFormattedSettingValue,
|
|
102144
102307
|
ExtensionManager,
|
|
102308
|
+
validateContextFilePath,
|
|
102145
102309
|
inferInstallMetadata,
|
|
102146
102310
|
normalizeServerId,
|
|
102147
102311
|
canLoadServer,
|
|
@@ -102159,7 +102323,7 @@ export {
|
|
|
102159
102323
|
statusCommand,
|
|
102160
102324
|
getSettingDefinition,
|
|
102161
102325
|
getDialogRestartRequiredSettings,
|
|
102162
|
-
isRecord,
|
|
102326
|
+
isRecord2 as isRecord,
|
|
102163
102327
|
getNestedValue,
|
|
102164
102328
|
getEffectiveValue,
|
|
102165
102329
|
getDialogSettingKeys,
|