@google/gemini-cli 0.35.0-preview.3 → 0.35.0-preview.5
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/{chunk-GGMTXEJO.js → chunk-KMUDKBYI.js} +319 -154
- package/bundle/{chunk-L5MOJUPU.js → chunk-L4UWHILQ.js} +318 -150
- package/bundle/{chunk-5SBB3P4L.js → chunk-MRCHI5MK.js} +8 -15
- package/bundle/{chunk-BSHOJUT2.js → chunk-OWPZY7X4.js} +318 -150
- package/bundle/{chunk-UXRMEIL2.js → chunk-QNUZOILC.js} +8 -15
- package/bundle/{chunk-HC2FCDHO.js → chunk-QRBJWIYD.js} +8 -15
- package/bundle/{chunk-UMBTJI7I.js → chunk-UB2QZMEG.js} +8 -15
- package/bundle/{chunk-YTK7AJUV.js → chunk-UCKFA5HR.js} +318 -150
- package/bundle/{core-LTXVJI4H.js → core-LGRNIQIP.js} +9 -1
- package/bundle/{devtoolsService-WNWR6HYK.js → devtoolsService-D7CKQLLY.js} +2 -2
- package/bundle/{devtoolsService-442KPRIR.js → devtoolsService-E7BY5PIF.js} +2 -2
- package/bundle/{devtoolsService-WKGY5DWT.js → devtoolsService-EUPHEGN3.js} +2 -2
- package/bundle/{devtoolsService-R5JE4MLS.js → devtoolsService-USGBA4VO.js} +2 -2
- package/bundle/{dist-56D2FMJJ.js → dist-F2SWGU2N.js} +9 -1
- package/bundle/{dist-GL2LLCWF.js → dist-YBDSG67U.js} +9 -1
- package/bundle/{dist-PMCRGIU3.js → dist-YGZCQC5A.js} +9 -1
- package/bundle/docs/cli/telemetry.md +28 -0
- package/bundle/docs/reference/configuration.md +1 -1
- package/bundle/gemini.js +6 -6
- package/bundle/{interactiveCli-6Z6IFUTV.js → interactiveCli-2ASAJB6L.js} +3 -3
- package/bundle/{interactiveCli-7XKQ7W7K.js → interactiveCli-3ZVKTAC5.js} +3 -3
- package/bundle/{interactiveCli-ZWXGL7LQ.js → interactiveCli-TPT5TLWV.js} +3 -3
- package/bundle/{interactiveCli-PZEQS2Z6.js → interactiveCli-WK36N6AP.js} +3 -3
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-32N4SW2N.js → oauth2-provider-CR5U52N6.js} +1 -1
- package/bundle/{oauth2-provider-L2WMQ3QS.js → oauth2-provider-NTT4KBFN.js} +1 -1
- package/bundle/{oauth2-provider-V2ZMYLUK.js → oauth2-provider-ON47VIFW.js} +1 -1
- package/bundle/{oauth2-provider-7CBBPEZS.js → oauth2-provider-OYNEH6QL.js} +1 -1
- package/package.json +1 -1
|
@@ -9597,7 +9597,7 @@ var require_googleauth = __commonJS({
|
|
|
9597
9597
|
var child_process_1 = __require("child_process");
|
|
9598
9598
|
var fs60 = __require("fs");
|
|
9599
9599
|
var gcpMetadata = require_src4();
|
|
9600
|
-
var
|
|
9600
|
+
var os25 = __require("os");
|
|
9601
9601
|
var path78 = __require("path");
|
|
9602
9602
|
var crypto_1 = require_crypto3();
|
|
9603
9603
|
var transporters_1 = require_transporters();
|
|
@@ -10038,7 +10038,7 @@ var require_googleauth = __commonJS({
|
|
|
10038
10038
|
* @api private
|
|
10039
10039
|
*/
|
|
10040
10040
|
_isWindows() {
|
|
10041
|
-
const sys =
|
|
10041
|
+
const sys = os25.platform();
|
|
10042
10042
|
if (sys && sys.length >= 3) {
|
|
10043
10043
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
10044
10044
|
return true;
|
|
@@ -15975,7 +15975,7 @@ var require_service_config = __commonJS({
|
|
|
15975
15975
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
15976
15976
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
15977
15977
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
15978
|
-
var
|
|
15978
|
+
var os25 = __require("os");
|
|
15979
15979
|
var constants_1 = require_constants2();
|
|
15980
15980
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
15981
15981
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -16274,7 +16274,7 @@ var require_service_config = __commonJS({
|
|
|
16274
16274
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
16275
16275
|
let hostnameMatched = false;
|
|
16276
16276
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
16277
|
-
if (hostname3 ===
|
|
16277
|
+
if (hostname3 === os25.hostname()) {
|
|
16278
16278
|
hostnameMatched = true;
|
|
16279
16279
|
}
|
|
16280
16280
|
}
|
|
@@ -29795,7 +29795,7 @@ var require_subchannel_call = __commonJS({
|
|
|
29795
29795
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
29796
29796
|
exports2.Http2SubchannelCall = void 0;
|
|
29797
29797
|
var http22 = __require("http2");
|
|
29798
|
-
var
|
|
29798
|
+
var os25 = __require("os");
|
|
29799
29799
|
var constants_1 = require_constants2();
|
|
29800
29800
|
var metadata_1 = require_metadata();
|
|
29801
29801
|
var stream_decoder_1 = require_stream_decoder();
|
|
@@ -29803,7 +29803,7 @@ var require_subchannel_call = __commonJS({
|
|
|
29803
29803
|
var constants_2 = require_constants2();
|
|
29804
29804
|
var TRACER_NAME2 = "subchannel_call";
|
|
29805
29805
|
function getSystemErrorName(errno) {
|
|
29806
|
-
for (const [name3, num] of Object.entries(
|
|
29806
|
+
for (const [name3, num] of Object.entries(os25.constants.errno)) {
|
|
29807
29807
|
if (num === errno) {
|
|
29808
29808
|
return name3;
|
|
29809
29809
|
}
|
|
@@ -50050,7 +50050,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
50050
50050
|
exports2.processDetector = void 0;
|
|
50051
50051
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
50052
50052
|
var semconv_1 = require_semconv2();
|
|
50053
|
-
var
|
|
50053
|
+
var os25 = __require("os");
|
|
50054
50054
|
var ProcessDetector = class {
|
|
50055
50055
|
detect(_config) {
|
|
50056
50056
|
const attributes = {
|
|
@@ -50070,7 +50070,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
50070
50070
|
attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
50071
50071
|
}
|
|
50072
50072
|
try {
|
|
50073
|
-
const userInfo2 =
|
|
50073
|
+
const userInfo2 = os25.userInfo();
|
|
50074
50074
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
|
|
50075
50075
|
} catch (e2) {
|
|
50076
50076
|
api_1.diag.debug(`error obtaining process owner: ${e2}`);
|
|
@@ -69580,7 +69580,7 @@ var require_package4 = __commonJS({
|
|
|
69580
69580
|
var require_util7 = __commonJS({
|
|
69581
69581
|
"node_modules/systeminformation/lib/util.js"(exports2) {
|
|
69582
69582
|
"use strict";
|
|
69583
|
-
var
|
|
69583
|
+
var os25 = __require("os");
|
|
69584
69584
|
var fs60 = __require("fs");
|
|
69585
69585
|
var path78 = __require("path");
|
|
69586
69586
|
var spawn10 = __require("child_process").spawn;
|
|
@@ -69687,7 +69687,7 @@ var require_util7 = __commonJS({
|
|
|
69687
69687
|
}
|
|
69688
69688
|
function cores() {
|
|
69689
69689
|
if (_cores === 0) {
|
|
69690
|
-
_cores =
|
|
69690
|
+
_cores = os25.cpus().length;
|
|
69691
69691
|
}
|
|
69692
69692
|
return _cores;
|
|
69693
69693
|
}
|
|
@@ -69948,7 +69948,7 @@ var require_util7 = __commonJS({
|
|
|
69948
69948
|
function powerShellRelease() {
|
|
69949
69949
|
try {
|
|
69950
69950
|
if (_psChild) {
|
|
69951
|
-
_psChild.stdin.write("exit" +
|
|
69951
|
+
_psChild.stdin.write("exit" + os25.EOL);
|
|
69952
69952
|
_psChild.stdin.end();
|
|
69953
69953
|
}
|
|
69954
69954
|
} catch {
|
|
@@ -69975,7 +69975,7 @@ var require_util7 = __commonJS({
|
|
|
69975
69975
|
});
|
|
69976
69976
|
try {
|
|
69977
69977
|
if (_psChild && _psChild.pid) {
|
|
69978
|
-
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " +
|
|
69978
|
+
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os25.EOL + cmd + os25.EOL + "echo " + _psCmdSeperator + os25.EOL);
|
|
69979
69979
|
}
|
|
69980
69980
|
} catch {
|
|
69981
69981
|
resolve16("");
|
|
@@ -69987,7 +69987,7 @@ var require_util7 = __commonJS({
|
|
|
69987
69987
|
return new Promise((resolve16) => {
|
|
69988
69988
|
process.nextTick(() => {
|
|
69989
69989
|
try {
|
|
69990
|
-
const osVersion =
|
|
69990
|
+
const osVersion = os25.release().split(".").map(Number);
|
|
69991
69991
|
const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
|
|
69992
69992
|
const child = spawn10(_powerShell, spanOptions, {
|
|
69993
69993
|
stdio: "pipe",
|
|
@@ -70019,8 +70019,8 @@ var require_util7 = __commonJS({
|
|
|
70019
70019
|
});
|
|
70020
70020
|
if (osVersion[0] < 10) {
|
|
70021
70021
|
try {
|
|
70022
|
-
child.stdin.write(_psToUTF8 + cmd +
|
|
70023
|
-
child.stdin.write("exit" +
|
|
70022
|
+
child.stdin.write(_psToUTF8 + cmd + os25.EOL);
|
|
70023
|
+
child.stdin.write("exit" + os25.EOL);
|
|
70024
70024
|
child.stdin.end();
|
|
70025
70025
|
} catch {
|
|
70026
70026
|
child.kill();
|
|
@@ -72168,7 +72168,7 @@ var require_util7 = __commonJS({
|
|
|
72168
72168
|
var require_osinfo = __commonJS({
|
|
72169
72169
|
"node_modules/systeminformation/lib/osinfo.js"(exports2) {
|
|
72170
72170
|
"use strict";
|
|
72171
|
-
var
|
|
72171
|
+
var os25 = __require("os");
|
|
72172
72172
|
var fs60 = __require("fs");
|
|
72173
72173
|
var util2 = require_util7();
|
|
72174
72174
|
var exec3 = __require("child_process").exec;
|
|
@@ -72191,14 +72191,14 @@ var require_osinfo = __commonJS({
|
|
|
72191
72191
|
}
|
|
72192
72192
|
const result2 = {
|
|
72193
72193
|
current: Date.now(),
|
|
72194
|
-
uptime:
|
|
72194
|
+
uptime: os25.uptime(),
|
|
72195
72195
|
timezone: t2.length >= 7 ? t2[5] : "",
|
|
72196
72196
|
timezoneName
|
|
72197
72197
|
};
|
|
72198
72198
|
if (_darwin || _linux) {
|
|
72199
72199
|
try {
|
|
72200
72200
|
const stdout = execSync5("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null", util2.execOptsLinux);
|
|
72201
|
-
const lines = stdout.toString().split(
|
|
72201
|
+
const lines = stdout.toString().split(os25.EOL);
|
|
72202
72202
|
if (lines.length > 3 && !lines[0]) {
|
|
72203
72203
|
lines.shift();
|
|
72204
72204
|
}
|
|
@@ -72208,7 +72208,7 @@ var require_osinfo = __commonJS({
|
|
|
72208
72208
|
}
|
|
72209
72209
|
return {
|
|
72210
72210
|
current: Date.now(),
|
|
72211
|
-
uptime:
|
|
72211
|
+
uptime: os25.uptime(),
|
|
72212
72212
|
timezone: lines[1] ? timezone + lines[1] : timezone,
|
|
72213
72213
|
timezoneName: lines[2] && lines[2].indexOf("/zoneinfo/") > 0 ? lines[2].split("/zoneinfo/")[1] || "" : ""
|
|
72214
72214
|
};
|
|
@@ -72327,11 +72327,11 @@ var require_osinfo = __commonJS({
|
|
|
72327
72327
|
return "";
|
|
72328
72328
|
}
|
|
72329
72329
|
function getFQDN() {
|
|
72330
|
-
let fqdn =
|
|
72330
|
+
let fqdn = os25.hostname;
|
|
72331
72331
|
if (_linux || _darwin) {
|
|
72332
72332
|
try {
|
|
72333
72333
|
const stdout = execSync5("hostname -f 2>/dev/null", util2.execOptsLinux);
|
|
72334
|
-
fqdn = stdout.toString().split(
|
|
72334
|
+
fqdn = stdout.toString().split(os25.EOL)[0];
|
|
72335
72335
|
} catch {
|
|
72336
72336
|
util2.noop();
|
|
72337
72337
|
}
|
|
@@ -72339,7 +72339,7 @@ var require_osinfo = __commonJS({
|
|
|
72339
72339
|
if (_freebsd || _openbsd || _netbsd) {
|
|
72340
72340
|
try {
|
|
72341
72341
|
const stdout = execSync5("hostname 2>/dev/null");
|
|
72342
|
-
fqdn = stdout.toString().split(
|
|
72342
|
+
fqdn = stdout.toString().split(os25.EOL)[0];
|
|
72343
72343
|
} catch {
|
|
72344
72344
|
util2.noop();
|
|
72345
72345
|
}
|
|
@@ -72347,7 +72347,7 @@ var require_osinfo = __commonJS({
|
|
|
72347
72347
|
if (_windows) {
|
|
72348
72348
|
try {
|
|
72349
72349
|
const stdout = execSync5("echo %COMPUTERNAME%.%USERDNSDOMAIN%", util2.execOptsWin);
|
|
72350
|
-
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(
|
|
72350
|
+
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os25.EOL)[0];
|
|
72351
72351
|
} catch {
|
|
72352
72352
|
util2.noop();
|
|
72353
72353
|
}
|
|
@@ -72362,9 +72362,9 @@ var require_osinfo = __commonJS({
|
|
|
72362
72362
|
distro: "unknown",
|
|
72363
72363
|
release: "unknown",
|
|
72364
72364
|
codename: "",
|
|
72365
|
-
kernel:
|
|
72366
|
-
arch:
|
|
72367
|
-
hostname:
|
|
72365
|
+
kernel: os25.release(),
|
|
72366
|
+
arch: os25.arch(),
|
|
72367
|
+
hostname: os25.hostname(),
|
|
72368
72368
|
fqdn: getFQDN(),
|
|
72369
72369
|
codepage: "",
|
|
72370
72370
|
logofile: "",
|
|
@@ -72375,18 +72375,18 @@ var require_osinfo = __commonJS({
|
|
|
72375
72375
|
};
|
|
72376
72376
|
if (_linux) {
|
|
72377
72377
|
exec3("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release", (error40, stdout) => {
|
|
72378
|
-
let
|
|
72378
|
+
let release3 = {};
|
|
72379
72379
|
let lines = stdout.toString().split("\n");
|
|
72380
72380
|
lines.forEach((line) => {
|
|
72381
72381
|
if (line.indexOf("=") !== -1) {
|
|
72382
|
-
|
|
72382
|
+
release3[line.split("=")[0].trim().toUpperCase()] = line.split("=")[1].trim();
|
|
72383
72383
|
}
|
|
72384
72384
|
});
|
|
72385
|
-
result2.distro = (
|
|
72385
|
+
result2.distro = (release3.DISTRIB_ID || release3.NAME || "unknown").replace(/"/g, "");
|
|
72386
72386
|
result2.logofile = getLogoFile(result2.distro);
|
|
72387
|
-
let releaseVersion = (
|
|
72388
|
-
let codename = (
|
|
72389
|
-
const prettyName = (
|
|
72387
|
+
let releaseVersion = (release3.VERSION || "").replace(/"/g, "");
|
|
72388
|
+
let codename = (release3.DISTRIB_CODENAME || release3.VERSION_CODENAME || "").replace(/"/g, "");
|
|
72389
|
+
const prettyName = (release3.PRETTY_NAME || "").replace(/"/g, "");
|
|
72390
72390
|
if (prettyName.indexOf(result2.distro + " ") === 0) {
|
|
72391
72391
|
releaseVersion = prettyName.replace(result2.distro + " ", "").trim();
|
|
72392
72392
|
}
|
|
@@ -72394,10 +72394,10 @@ var require_osinfo = __commonJS({
|
|
|
72394
72394
|
codename = releaseVersion.split("(")[1].replace(/[()]/g, "").trim();
|
|
72395
72395
|
releaseVersion = releaseVersion.split("(")[0].trim();
|
|
72396
72396
|
}
|
|
72397
|
-
result2.release = (releaseVersion ||
|
|
72397
|
+
result2.release = (releaseVersion || release3.DISTRIB_RELEASE || release3.VERSION_ID || "unknown").replace(/"/g, "");
|
|
72398
72398
|
result2.codename = codename;
|
|
72399
72399
|
result2.codepage = util2.getCodepage();
|
|
72400
|
-
result2.build = (
|
|
72400
|
+
result2.build = (release3.BUILD_ID || "").replace(/"/g, "").trim();
|
|
72401
72401
|
isUefiLinux().then((uefi) => {
|
|
72402
72402
|
result2.uefi = uefi;
|
|
72403
72403
|
uuid3().then((data) => {
|
|
@@ -72415,14 +72415,14 @@ var require_osinfo = __commonJS({
|
|
|
72415
72415
|
let lines = stdout.toString().split("\n");
|
|
72416
72416
|
const distro = util2.getValue(lines, "kern.ostype");
|
|
72417
72417
|
const logofile = getLogoFile(distro);
|
|
72418
|
-
const
|
|
72418
|
+
const release3 = util2.getValue(lines, "kern.osrelease").split("-")[0];
|
|
72419
72419
|
const serial = util2.getValue(lines, "kern.uuid");
|
|
72420
72420
|
const bootmethod = util2.getValue(lines, "machdep.bootmethod");
|
|
72421
72421
|
const uefiConf = stdout.toString().indexOf("<type>efi</type>") >= 0;
|
|
72422
72422
|
const uefi = bootmethod ? bootmethod.toLowerCase().indexOf("uefi") >= 0 : uefiConf ? uefiConf : null;
|
|
72423
72423
|
result2.distro = distro || result2.distro;
|
|
72424
72424
|
result2.logofile = logofile || result2.logofile;
|
|
72425
|
-
result2.release =
|
|
72425
|
+
result2.release = release3 || result2.release;
|
|
72426
72426
|
result2.serial = serial || result2.serial;
|
|
72427
72427
|
result2.codename = "";
|
|
72428
72428
|
result2.codepage = util2.getCodepage();
|
|
@@ -72573,7 +72573,7 @@ var require_osinfo = __commonJS({
|
|
|
72573
72573
|
}
|
|
72574
72574
|
function versions(apps2, callback) {
|
|
72575
72575
|
let versionObject = {
|
|
72576
|
-
kernel:
|
|
72576
|
+
kernel: os25.release(),
|
|
72577
72577
|
apache: "",
|
|
72578
72578
|
bash: "",
|
|
72579
72579
|
bun: "",
|
|
@@ -73283,7 +73283,7 @@ var require_osinfo = __commonJS({
|
|
|
73283
73283
|
function getUniqueMacAdresses() {
|
|
73284
73284
|
let macs = [];
|
|
73285
73285
|
try {
|
|
73286
|
-
const ifaces =
|
|
73286
|
+
const ifaces = os25.networkInterfaces();
|
|
73287
73287
|
for (let dev in ifaces) {
|
|
73288
73288
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
73289
73289
|
ifaces[dev].forEach((details) => {
|
|
@@ -73405,7 +73405,7 @@ var require_system = __commonJS({
|
|
|
73405
73405
|
"node_modules/systeminformation/lib/system.js"(exports2) {
|
|
73406
73406
|
"use strict";
|
|
73407
73407
|
var fs60 = __require("fs");
|
|
73408
|
-
var
|
|
73408
|
+
var os25 = __require("os");
|
|
73409
73409
|
var util2 = require_util7();
|
|
73410
73410
|
var { uuid: uuid3 } = require_osinfo();
|
|
73411
73411
|
var exec3 = __require("child_process").exec;
|
|
@@ -73529,8 +73529,8 @@ var require_system = __commonJS({
|
|
|
73529
73529
|
util2.noop();
|
|
73530
73530
|
}
|
|
73531
73531
|
}
|
|
73532
|
-
if (!result2.virtual && (
|
|
73533
|
-
const kernelVersion = parseFloat(
|
|
73532
|
+
if (!result2.virtual && (os25.release().toLowerCase().indexOf("microsoft") >= 0 || os25.release().toLowerCase().endsWith("wsl2"))) {
|
|
73533
|
+
const kernelVersion = parseFloat(os25.release().toLowerCase());
|
|
73534
73534
|
result2.virtual = true;
|
|
73535
73535
|
result2.manufacturer = "Microsoft";
|
|
73536
73536
|
result2.model = "WSL";
|
|
@@ -73940,7 +73940,7 @@ var require_system = __commonJS({
|
|
|
73940
73940
|
result2.model = "Raspberry Pi";
|
|
73941
73941
|
result2.serial = rpi.serial;
|
|
73942
73942
|
result2.version = rpi.type + " - " + rpi.revision;
|
|
73943
|
-
result2.memMax =
|
|
73943
|
+
result2.memMax = os25.totalmem();
|
|
73944
73944
|
result2.memSlots = 0;
|
|
73945
73945
|
}
|
|
73946
73946
|
if (callback) {
|
|
@@ -73966,9 +73966,9 @@ var require_system = __commonJS({
|
|
|
73966
73966
|
}
|
|
73967
73967
|
devices.shift();
|
|
73968
73968
|
result2.memSlots = devices.length;
|
|
73969
|
-
if (
|
|
73969
|
+
if (os25.arch() === "arm64") {
|
|
73970
73970
|
result2.memSlots = 0;
|
|
73971
|
-
result2.memMax =
|
|
73971
|
+
result2.memMax = os25.totalmem();
|
|
73972
73972
|
}
|
|
73973
73973
|
if (callback) {
|
|
73974
73974
|
callback(result2);
|
|
@@ -73985,7 +73985,7 @@ var require_system = __commonJS({
|
|
|
73985
73985
|
if (_windows) {
|
|
73986
73986
|
try {
|
|
73987
73987
|
const workload = [];
|
|
73988
|
-
const win10plus = parseInt(
|
|
73988
|
+
const win10plus = parseInt(os25.release()) >= 10;
|
|
73989
73989
|
const maxCapacityAttribute = win10plus ? "MaxCapacityEx" : "MaxCapacity";
|
|
73990
73990
|
workload.push(util2.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl"));
|
|
73991
73991
|
workload.push(util2.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
|
|
@@ -74181,7 +74181,7 @@ var require_system = __commonJS({
|
|
|
74181
74181
|
var require_cpu = __commonJS({
|
|
74182
74182
|
"node_modules/systeminformation/lib/cpu.js"(exports2) {
|
|
74183
74183
|
"use strict";
|
|
74184
|
-
var
|
|
74184
|
+
var os25 = __require("os");
|
|
74185
74185
|
var exec3 = __require("child_process").exec;
|
|
74186
74186
|
var execSync5 = __require("child_process").execSync;
|
|
74187
74187
|
var fs60 = __require("fs");
|
|
@@ -75044,7 +75044,7 @@ var require_cpu = __commonJS({
|
|
|
75044
75044
|
const countProcessors = util2.getValue(lines, "hw.packages");
|
|
75045
75045
|
const countCores = util2.getValue(lines, "hw.physicalcpu_max");
|
|
75046
75046
|
const countThreads = util2.getValue(lines, "hw.ncpu");
|
|
75047
|
-
if (
|
|
75047
|
+
if (os25.arch() === "arm64") {
|
|
75048
75048
|
result2.socket = "SOC";
|
|
75049
75049
|
try {
|
|
75050
75050
|
const clusters = execSync5("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n");
|
|
@@ -75072,8 +75072,8 @@ var require_cpu = __commonJS({
|
|
|
75072
75072
|
if (_linux) {
|
|
75073
75073
|
let modelline = "";
|
|
75074
75074
|
let lines = [];
|
|
75075
|
-
if (
|
|
75076
|
-
modelline =
|
|
75075
|
+
if (os25.cpus()[0] && os25.cpus()[0].model) {
|
|
75076
|
+
modelline = os25.cpus()[0].model;
|
|
75077
75077
|
}
|
|
75078
75078
|
exec3('export LC_ALL=C; lscpu; echo -n "Governor: "; cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 2>/dev/null; echo; unset LC_ALL', (error40, stdout) => {
|
|
75079
75079
|
if (!error40) {
|
|
@@ -75162,8 +75162,8 @@ var require_cpu = __commonJS({
|
|
|
75162
75162
|
if (_freebsd || _openbsd || _netbsd) {
|
|
75163
75163
|
let modelline = "";
|
|
75164
75164
|
let lines = [];
|
|
75165
|
-
if (
|
|
75166
|
-
modelline =
|
|
75165
|
+
if (os25.cpus()[0] && os25.cpus()[0].model) {
|
|
75166
|
+
modelline = os25.cpus()[0].model;
|
|
75167
75167
|
}
|
|
75168
75168
|
exec3("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error40, stdout) => {
|
|
75169
75169
|
let cache3 = [];
|
|
@@ -75323,7 +75323,7 @@ var require_cpu = __commonJS({
|
|
|
75323
75323
|
}
|
|
75324
75324
|
exports2.cpu = cpu;
|
|
75325
75325
|
function getCpuCurrentSpeedSync() {
|
|
75326
|
-
const cpus2 =
|
|
75326
|
+
const cpus2 = os25.cpus();
|
|
75327
75327
|
let minFreq = 999999999;
|
|
75328
75328
|
let maxFreq = 0;
|
|
75329
75329
|
let avgFreq = 0;
|
|
@@ -76018,7 +76018,7 @@ var require_cpu = __commonJS({
|
|
|
76018
76018
|
function getLoad() {
|
|
76019
76019
|
return new Promise((resolve16) => {
|
|
76020
76020
|
process.nextTick(() => {
|
|
76021
|
-
const loads =
|
|
76021
|
+
const loads = os25.loadavg().map((x) => {
|
|
76022
76022
|
return x / util2.cores();
|
|
76023
76023
|
});
|
|
76024
76024
|
const avgLoad = parseFloat(Math.max.apply(Math, loads).toFixed(2));
|
|
@@ -76026,7 +76026,7 @@ var require_cpu = __commonJS({
|
|
|
76026
76026
|
const now = Date.now() - _current_cpu.ms;
|
|
76027
76027
|
if (now >= 200) {
|
|
76028
76028
|
_current_cpu.ms = Date.now();
|
|
76029
|
-
const cpus2 =
|
|
76029
|
+
const cpus2 = os25.cpus().map((cpu2) => {
|
|
76030
76030
|
cpu2.times.steal = 0;
|
|
76031
76031
|
cpu2.times.guest = 0;
|
|
76032
76032
|
return cpu2;
|
|
@@ -76220,7 +76220,7 @@ var require_cpu = __commonJS({
|
|
|
76220
76220
|
function getFullLoad() {
|
|
76221
76221
|
return new Promise((resolve16) => {
|
|
76222
76222
|
process.nextTick(() => {
|
|
76223
|
-
const cpus2 =
|
|
76223
|
+
const cpus2 = os25.cpus();
|
|
76224
76224
|
let totalUser = 0;
|
|
76225
76225
|
let totalSystem = 0;
|
|
76226
76226
|
let totalNice = 0;
|
|
@@ -76263,7 +76263,7 @@ var require_cpu = __commonJS({
|
|
|
76263
76263
|
var require_memory = __commonJS({
|
|
76264
76264
|
"node_modules/systeminformation/lib/memory.js"(exports2) {
|
|
76265
76265
|
"use strict";
|
|
76266
|
-
var
|
|
76266
|
+
var os25 = __require("os");
|
|
76267
76267
|
var exec3 = __require("child_process").exec;
|
|
76268
76268
|
var execSync5 = __require("child_process").execSync;
|
|
76269
76269
|
var util2 = require_util7();
|
|
@@ -76309,12 +76309,12 @@ var require_memory = __commonJS({
|
|
|
76309
76309
|
return new Promise((resolve16) => {
|
|
76310
76310
|
process.nextTick(() => {
|
|
76311
76311
|
let result2 = {
|
|
76312
|
-
total:
|
|
76313
|
-
free:
|
|
76314
|
-
used:
|
|
76315
|
-
active:
|
|
76312
|
+
total: os25.totalmem(),
|
|
76313
|
+
free: os25.freemem(),
|
|
76314
|
+
used: os25.totalmem() - os25.freemem(),
|
|
76315
|
+
active: os25.totalmem() - os25.freemem(),
|
|
76316
76316
|
// temporarily (fallback)
|
|
76317
|
-
available:
|
|
76317
|
+
available: os25.freemem(),
|
|
76318
76318
|
// temporarily (fallback)
|
|
76319
76319
|
buffers: 0,
|
|
76320
76320
|
cached: 0,
|
|
@@ -76333,9 +76333,9 @@ var require_memory = __commonJS({
|
|
|
76333
76333
|
if (!error40) {
|
|
76334
76334
|
const lines = stdout.toString().split("\n");
|
|
76335
76335
|
result2.total = parseInt(util2.getValue(lines, "memtotal"), 10);
|
|
76336
|
-
result2.total = result2.total ? result2.total * 1024 :
|
|
76336
|
+
result2.total = result2.total ? result2.total * 1024 : os25.totalmem();
|
|
76337
76337
|
result2.free = parseInt(util2.getValue(lines, "memfree"), 10);
|
|
76338
|
-
result2.free = result2.free ? result2.free * 1024 :
|
|
76338
|
+
result2.free = result2.free ? result2.free * 1024 : os25.freemem();
|
|
76339
76339
|
result2.used = result2.total - result2.free;
|
|
76340
76340
|
result2.buffers = parseInt(util2.getValue(lines, "buffers"), 10);
|
|
76341
76341
|
result2.buffers = result2.buffers ? result2.buffers * 1024 : 0;
|
|
@@ -76557,7 +76557,7 @@ var require_memory = __commonJS({
|
|
|
76557
76557
|
}
|
|
76558
76558
|
if (!result2.length) {
|
|
76559
76559
|
result2.push({
|
|
76560
|
-
size:
|
|
76560
|
+
size: os25.totalmem(),
|
|
76561
76561
|
bank: "",
|
|
76562
76562
|
type: "",
|
|
76563
76563
|
ecc: null,
|
|
@@ -78132,7 +78132,7 @@ var require_filesystem = __commonJS({
|
|
|
78132
78132
|
"use strict";
|
|
78133
78133
|
var util2 = require_util7();
|
|
78134
78134
|
var fs60 = __require("fs");
|
|
78135
|
-
var
|
|
78135
|
+
var os25 = __require("os");
|
|
78136
78136
|
var exec3 = __require("child_process").exec;
|
|
78137
78137
|
var execSync5 = __require("child_process").execSync;
|
|
78138
78138
|
var execPromiseSave = util2.promisifySave(__require("child_process").exec);
|
|
@@ -79326,7 +79326,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
|
|
|
79326
79326
|
}
|
|
79327
79327
|
if (_darwin) {
|
|
79328
79328
|
let cmdFullSmart = "";
|
|
79329
|
-
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(
|
|
79329
|
+
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(os25.release(), 10) > 24 ? "SPUSBHostDataType" : "SPUSBDataType"} `, { maxBuffer: 1024 * 1024 }, (error40, stdout) => {
|
|
79330
79330
|
if (!error40) {
|
|
79331
79331
|
const lines = stdout.toString().split("\n");
|
|
79332
79332
|
const linesSATA = [];
|
|
@@ -79706,7 +79706,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
|
|
|
79706
79706
|
var require_network = __commonJS({
|
|
79707
79707
|
"node_modules/systeminformation/lib/network.js"(exports2) {
|
|
79708
79708
|
"use strict";
|
|
79709
|
-
var
|
|
79709
|
+
var os25 = __require("os");
|
|
79710
79710
|
var exec3 = __require("child_process").exec;
|
|
79711
79711
|
var execSync5 = __require("child_process").execSync;
|
|
79712
79712
|
var fs60 = __require("fs");
|
|
@@ -79730,7 +79730,7 @@ var require_network = __commonJS({
|
|
|
79730
79730
|
let ifacename = "";
|
|
79731
79731
|
let ifacenameFirst = "";
|
|
79732
79732
|
try {
|
|
79733
|
-
const ifaces =
|
|
79733
|
+
const ifaces = os25.networkInterfaces();
|
|
79734
79734
|
let scopeid = 9999;
|
|
79735
79735
|
for (let dev in ifaces) {
|
|
79736
79736
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
@@ -79750,7 +79750,7 @@ var require_network = __commonJS({
|
|
|
79750
79750
|
let defaultIp = "";
|
|
79751
79751
|
const cmd = "netstat -r";
|
|
79752
79752
|
const result2 = execSync5(cmd, util2.execOptsWin);
|
|
79753
|
-
const lines = result2.toString().split(
|
|
79753
|
+
const lines = result2.toString().split(os25.EOL);
|
|
79754
79754
|
lines.forEach((line) => {
|
|
79755
79755
|
line = line.replace(/\s+/g, " ").trim();
|
|
79756
79756
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -80383,7 +80383,7 @@ var require_network = __commonJS({
|
|
|
80383
80383
|
defaultString = "" + defaultString;
|
|
80384
80384
|
return new Promise((resolve16) => {
|
|
80385
80385
|
process.nextTick(() => {
|
|
80386
|
-
const ifaces =
|
|
80386
|
+
const ifaces = os25.networkInterfaces();
|
|
80387
80387
|
let result2 = [];
|
|
80388
80388
|
let nics = [];
|
|
80389
80389
|
let dnsSuffixes = [];
|
|
@@ -81453,7 +81453,7 @@ var require_network = __commonJS({
|
|
|
81453
81453
|
if (_windows) {
|
|
81454
81454
|
try {
|
|
81455
81455
|
exec3("netstat -r", util2.execOptsWin, (error40, stdout) => {
|
|
81456
|
-
const lines = stdout.toString().split(
|
|
81456
|
+
const lines = stdout.toString().split(os25.EOL);
|
|
81457
81457
|
lines.forEach((line) => {
|
|
81458
81458
|
line = line.replace(/\s+/g, " ").trim();
|
|
81459
81459
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -81499,7 +81499,7 @@ var require_network = __commonJS({
|
|
|
81499
81499
|
var require_wifi = __commonJS({
|
|
81500
81500
|
"node_modules/systeminformation/lib/wifi.js"(exports2) {
|
|
81501
81501
|
"use strict";
|
|
81502
|
-
var
|
|
81502
|
+
var os25 = __require("os");
|
|
81503
81503
|
var exec3 = __require("child_process").exec;
|
|
81504
81504
|
var execSync5 = __require("child_process").execSync;
|
|
81505
81505
|
var util2 = require_util7();
|
|
@@ -81721,7 +81721,7 @@ var require_wifi = __commonJS({
|
|
|
81721
81721
|
parts2.shift();
|
|
81722
81722
|
parts2.forEach((part) => {
|
|
81723
81723
|
part = "ACTIVE:" + part;
|
|
81724
|
-
const lines = part.split(
|
|
81724
|
+
const lines = part.split(os25.EOL);
|
|
81725
81725
|
const channel = util2.getValue(lines, "CHAN");
|
|
81726
81726
|
const frequency = util2.getValue(lines, "FREQ").toLowerCase().replace("mhz", "").trim();
|
|
81727
81727
|
const security = util2.getValue(lines, "SECURITY").replace("(", "").replace(")", "");
|
|
@@ -81945,15 +81945,15 @@ var require_wifi = __commonJS({
|
|
|
81945
81945
|
} else if (_windows) {
|
|
81946
81946
|
const cmd = "netsh wlan show networks mode=Bssid";
|
|
81947
81947
|
util2.powerShell(cmd).then((stdout) => {
|
|
81948
|
-
const ssidParts = stdout.toString("utf8").split(
|
|
81948
|
+
const ssidParts = stdout.toString("utf8").split(os25.EOL + os25.EOL + "SSID ");
|
|
81949
81949
|
ssidParts.shift();
|
|
81950
81950
|
ssidParts.forEach((ssidPart) => {
|
|
81951
|
-
const ssidLines = ssidPart.split(
|
|
81951
|
+
const ssidLines = ssidPart.split(os25.EOL);
|
|
81952
81952
|
if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(":") >= 0) {
|
|
81953
81953
|
const bssidsParts = ssidPart.split(" BSSID");
|
|
81954
81954
|
bssidsParts.shift();
|
|
81955
81955
|
bssidsParts.forEach((bssidPart) => {
|
|
81956
|
-
const bssidLines = bssidPart.split(
|
|
81956
|
+
const bssidLines = bssidPart.split(os25.EOL);
|
|
81957
81957
|
const bssidLine = bssidLines[0].split(":");
|
|
81958
81958
|
bssidLine.shift();
|
|
81959
81959
|
const bssid = bssidLine.join(":").trim().toLowerCase();
|
|
@@ -82277,7 +82277,7 @@ var require_wifi = __commonJS({
|
|
|
82277
82277
|
var require_processes = __commonJS({
|
|
82278
82278
|
"node_modules/systeminformation/lib/processes.js"(exports2) {
|
|
82279
82279
|
"use strict";
|
|
82280
|
-
var
|
|
82280
|
+
var os25 = __require("os");
|
|
82281
82281
|
var fs60 = __require("fs");
|
|
82282
82282
|
var path78 = __require("path");
|
|
82283
82283
|
var exec3 = __require("child_process").exec;
|
|
@@ -82928,7 +82928,7 @@ var require_processes = __commonJS({
|
|
|
82928
82928
|
line = line.trim().replace(/ +/g, " ").replace(/,+/g, ".");
|
|
82929
82929
|
const parts2 = line.split(" ");
|
|
82930
82930
|
const command = parts2.slice(9).join(" ");
|
|
82931
|
-
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 /
|
|
82931
|
+
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os25.totalmem()).toFixed(1));
|
|
82932
82932
|
const started = parseElapsed(parts2[5]);
|
|
82933
82933
|
result2.push({
|
|
82934
82934
|
pid: parseInt(parts2[0]),
|
|
@@ -83131,7 +83131,7 @@ var require_processes = __commonJS({
|
|
|
83131
83131
|
cpu: 0,
|
|
83132
83132
|
cpuu: 0,
|
|
83133
83133
|
cpus: 0,
|
|
83134
|
-
mem: memw /
|
|
83134
|
+
mem: memw / os25.totalmem() * 100,
|
|
83135
83135
|
priority: element.Priority | null,
|
|
83136
83136
|
memVsz: element.PageFileUsage || null,
|
|
83137
83137
|
memRss: Math.floor((element.WorkingSetSize || 0) / 1024),
|
|
@@ -83285,7 +83285,7 @@ var require_processes = __commonJS({
|
|
|
83285
83285
|
result2.forEach((item) => {
|
|
83286
83286
|
if (item.proc.toLowerCase() === pname.toLowerCase()) {
|
|
83287
83287
|
item.pids.push(pid);
|
|
83288
|
-
item.mem += mem /
|
|
83288
|
+
item.mem += mem / os25.totalmem() * 100;
|
|
83289
83289
|
processFound = true;
|
|
83290
83290
|
}
|
|
83291
83291
|
});
|
|
@@ -83295,7 +83295,7 @@ var require_processes = __commonJS({
|
|
|
83295
83295
|
pid,
|
|
83296
83296
|
pids: [pid],
|
|
83297
83297
|
cpu: 0,
|
|
83298
|
-
mem: mem /
|
|
83298
|
+
mem: mem / os25.totalmem() * 100
|
|
83299
83299
|
});
|
|
83300
83300
|
}
|
|
83301
83301
|
}
|
|
@@ -85036,7 +85036,7 @@ var require_docker = __commonJS({
|
|
|
85036
85036
|
var require_virtualbox = __commonJS({
|
|
85037
85037
|
"node_modules/systeminformation/lib/virtualbox.js"(exports2) {
|
|
85038
85038
|
"use strict";
|
|
85039
|
-
var
|
|
85039
|
+
var os25 = __require("os");
|
|
85040
85040
|
var exec3 = __require("child_process").exec;
|
|
85041
85041
|
var util2 = require_util7();
|
|
85042
85042
|
function vboxInfo(callback) {
|
|
@@ -85045,10 +85045,10 @@ var require_virtualbox = __commonJS({
|
|
|
85045
85045
|
process.nextTick(() => {
|
|
85046
85046
|
try {
|
|
85047
85047
|
exec3(util2.getVboxmanage() + " list vms --long", (error40, stdout) => {
|
|
85048
|
-
let parts2 = (
|
|
85048
|
+
let parts2 = (os25.EOL + stdout.toString()).split(os25.EOL + "Name:");
|
|
85049
85049
|
parts2.shift();
|
|
85050
85050
|
parts2.forEach((part) => {
|
|
85051
|
-
const lines = ("Name:" + part).split(
|
|
85051
|
+
const lines = ("Name:" + part).split(os25.EOL);
|
|
85052
85052
|
const state = util2.getValue(lines, "State");
|
|
85053
85053
|
const running = state.startsWith("running");
|
|
85054
85054
|
const runningSinceString = running ? state.replace("running (since ", "").replace(")", "").trim() : "";
|
|
@@ -107545,7 +107545,7 @@ var require_grpc = __commonJS({
|
|
|
107545
107545
|
var fs60 = __require("fs");
|
|
107546
107546
|
var google_auth_library_1 = require_src6();
|
|
107547
107547
|
var grpc3 = require_src11();
|
|
107548
|
-
var
|
|
107548
|
+
var os25 = __require("os");
|
|
107549
107549
|
var path_1 = __require("path");
|
|
107550
107550
|
var path78 = __require("path");
|
|
107551
107551
|
var protobuf = require_protobufjs();
|
|
@@ -107850,7 +107850,7 @@ var require_grpc = __commonJS({
|
|
|
107850
107850
|
if ((opts === null || opts === void 0 ? void 0 : opts.cert) && (opts === null || opts === void 0 ? void 0 : opts.key)) {
|
|
107851
107851
|
return [opts.cert, opts.key];
|
|
107852
107852
|
}
|
|
107853
|
-
const metadataPath = (0, path_1.join)(
|
|
107853
|
+
const metadataPath = (0, path_1.join)(os25.homedir(), ".secureConnect", "context_aware_metadata.json");
|
|
107854
107854
|
const metadata2 = JSON.parse(await readFileAsync(metadataPath));
|
|
107855
107855
|
if (!metadata2.cert_provider_command) {
|
|
107856
107856
|
throw Error("no cert_provider_command found");
|
|
@@ -173204,8 +173204,8 @@ var require_semver2 = __commonJS({
|
|
|
173204
173204
|
}
|
|
173205
173205
|
// preminor will bump the version up to the next minor release, and immediately
|
|
173206
173206
|
// down to pre-release. premajor and prepatch work the same way.
|
|
173207
|
-
inc(
|
|
173208
|
-
if (
|
|
173207
|
+
inc(release3, identifier, identifierBase) {
|
|
173208
|
+
if (release3.startsWith("pre")) {
|
|
173209
173209
|
if (!identifier && identifierBase === false) {
|
|
173210
173210
|
throw new Error("invalid increment argument: identifier is empty");
|
|
173211
173211
|
}
|
|
@@ -173216,7 +173216,7 @@ var require_semver2 = __commonJS({
|
|
|
173216
173216
|
}
|
|
173217
173217
|
}
|
|
173218
173218
|
}
|
|
173219
|
-
switch (
|
|
173219
|
+
switch (release3) {
|
|
173220
173220
|
case "premajor":
|
|
173221
173221
|
this.prerelease.length = 0;
|
|
173222
173222
|
this.patch = 0;
|
|
@@ -173307,7 +173307,7 @@ var require_semver2 = __commonJS({
|
|
|
173307
173307
|
break;
|
|
173308
173308
|
}
|
|
173309
173309
|
default:
|
|
173310
|
-
throw new Error(`invalid increment argument: ${
|
|
173310
|
+
throw new Error(`invalid increment argument: ${release3}`);
|
|
173311
173311
|
}
|
|
173312
173312
|
this.raw = this.format();
|
|
173313
173313
|
if (this.build.length) {
|
|
@@ -194663,7 +194663,7 @@ var require_service_config2 = __commonJS({
|
|
|
194663
194663
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
194664
194664
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
194665
194665
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
194666
|
-
var
|
|
194666
|
+
var os25 = __require("os");
|
|
194667
194667
|
var constants_1 = require_constants5();
|
|
194668
194668
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
194669
194669
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -194962,7 +194962,7 @@ var require_service_config2 = __commonJS({
|
|
|
194962
194962
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
194963
194963
|
let hostnameMatched = false;
|
|
194964
194964
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
194965
|
-
if (hostname3 ===
|
|
194965
|
+
if (hostname3 === os25.hostname()) {
|
|
194966
194966
|
hostnameMatched = true;
|
|
194967
194967
|
}
|
|
194968
194968
|
}
|
|
@@ -199392,7 +199392,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
199392
199392
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
199393
199393
|
exports2.Http2SubchannelCall = void 0;
|
|
199394
199394
|
var http22 = __require("http2");
|
|
199395
|
-
var
|
|
199395
|
+
var os25 = __require("os");
|
|
199396
199396
|
var constants_1 = require_constants5();
|
|
199397
199397
|
var metadata_1 = require_metadata4();
|
|
199398
199398
|
var stream_decoder_1 = require_stream_decoder2();
|
|
@@ -199400,7 +199400,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
199400
199400
|
var constants_2 = require_constants5();
|
|
199401
199401
|
var TRACER_NAME2 = "subchannel_call";
|
|
199402
199402
|
function getSystemErrorName(errno) {
|
|
199403
|
-
for (const [name3, num] of Object.entries(
|
|
199403
|
+
for (const [name3, num] of Object.entries(os25.constants.errno)) {
|
|
199404
199404
|
if (num === errno) {
|
|
199405
199405
|
return name3;
|
|
199406
199406
|
}
|
|
@@ -212744,6 +212744,9 @@ import * as path66 from "node:path";
|
|
|
212744
212744
|
import { inspect as inspect4 } from "node:util";
|
|
212745
212745
|
import process24 from "node:process";
|
|
212746
212746
|
|
|
212747
|
+
// packages/core/src/core/contentGenerator.ts
|
|
212748
|
+
import * as os15 from "node:os";
|
|
212749
|
+
|
|
212747
212750
|
// packages/core/src/code_assist/oauth2.ts
|
|
212748
212751
|
var import_google_auth_library2 = __toESM(require_src6(), 1);
|
|
212749
212752
|
import * as http from "node:http";
|
|
@@ -213550,6 +213553,8 @@ var KEYCHAIN_AVAILABILITY_COUNT = "gemini_cli.keychain.availability.count";
|
|
|
213550
213553
|
var TOKEN_STORAGE_TYPE_COUNT = "gemini_cli.token_storage.type.count";
|
|
213551
213554
|
var OVERAGE_OPTION_COUNT = "gemini_cli.overage_option.count";
|
|
213552
213555
|
var CREDIT_PURCHASE_COUNT = "gemini_cli.credit_purchase.count";
|
|
213556
|
+
var EVENT_ONBOARDING_START = "gemini_cli.onboarding.start";
|
|
213557
|
+
var EVENT_ONBOARDING_SUCCESS = "gemini_cli.onboarding.success";
|
|
213553
213558
|
var AGENT_RUN_COUNT = "gemini_cli.agent.run.count";
|
|
213554
213559
|
var AGENT_DURATION_MS = "gemini_cli.agent.duration";
|
|
213555
213560
|
var AGENT_TURNS = "gemini_cli.agent.turns";
|
|
@@ -213730,6 +213735,18 @@ var COUNTER_DEFINITIONS = {
|
|
|
213730
213735
|
assign: (c4) => creditPurchaseCounter = c4,
|
|
213731
213736
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
213732
213737
|
attributes: {}
|
|
213738
|
+
},
|
|
213739
|
+
[EVENT_ONBOARDING_START]: {
|
|
213740
|
+
description: "Counts onboarding started",
|
|
213741
|
+
valueType: ValueType.INT,
|
|
213742
|
+
assign: (c4) => onboardingStartCounter = c4,
|
|
213743
|
+
attributes: {}
|
|
213744
|
+
},
|
|
213745
|
+
[EVENT_ONBOARDING_SUCCESS]: {
|
|
213746
|
+
description: "Counts onboarding succeeded",
|
|
213747
|
+
valueType: ValueType.INT,
|
|
213748
|
+
assign: (c4) => onboardingSuccessCounter = c4,
|
|
213749
|
+
attributes: {}
|
|
213733
213750
|
}
|
|
213734
213751
|
};
|
|
213735
213752
|
var HISTOGRAM_DEFINITIONS = {
|
|
@@ -213984,6 +214001,8 @@ var keychainAvailabilityCounter;
|
|
|
213984
214001
|
var tokenStorageTypeCounter;
|
|
213985
214002
|
var overageOptionCounter;
|
|
213986
214003
|
var creditPurchaseCounter;
|
|
214004
|
+
var onboardingStartCounter;
|
|
214005
|
+
var onboardingSuccessCounter;
|
|
213987
214006
|
var genAiClientTokenUsageHistogram;
|
|
213988
214007
|
var genAiClientOperationDurationHistogram;
|
|
213989
214008
|
var startupTimeHistogram;
|
|
@@ -214095,6 +214114,20 @@ function recordLinesChanged(config2, lines, changeType, attributes) {
|
|
|
214095
214114
|
...attributes ?? {}
|
|
214096
214115
|
});
|
|
214097
214116
|
}
|
|
214117
|
+
function recordOnboardingStart(config2) {
|
|
214118
|
+
if (!onboardingStartCounter || !isMetricsInitialized) return;
|
|
214119
|
+
onboardingStartCounter.add(
|
|
214120
|
+
1,
|
|
214121
|
+
baseMetricDefinition.getCommonAttributes(config2)
|
|
214122
|
+
);
|
|
214123
|
+
}
|
|
214124
|
+
function recordOnboardingSuccess(config2, userTier) {
|
|
214125
|
+
if (!onboardingSuccessCounter || !isMetricsInitialized) return;
|
|
214126
|
+
onboardingSuccessCounter.add(1, {
|
|
214127
|
+
...baseMetricDefinition.getCommonAttributes(config2),
|
|
214128
|
+
...userTier && { user_tier: userTier }
|
|
214129
|
+
});
|
|
214130
|
+
}
|
|
214098
214131
|
function recordFlickerFrame(config2) {
|
|
214099
214132
|
if (!flickerFrameCounter || !isMetricsInitialized) return;
|
|
214100
214133
|
flickerFrameCounter.add(1, baseMetricDefinition.getCommonAttributes(config2));
|
|
@@ -216558,6 +216591,47 @@ var KeychainAvailabilityEvent = class {
|
|
|
216558
216591
|
return `Keychain availability: ${this.available}`;
|
|
216559
216592
|
}
|
|
216560
216593
|
};
|
|
216594
|
+
var EVENT_ONBOARDING_START2 = "gemini_cli.onboarding.start";
|
|
216595
|
+
var OnboardingStartEvent = class {
|
|
216596
|
+
"event.name";
|
|
216597
|
+
"event.timestamp";
|
|
216598
|
+
constructor() {
|
|
216599
|
+
this["event.name"] = "onboarding_start";
|
|
216600
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
216601
|
+
}
|
|
216602
|
+
toOpenTelemetryAttributes(config2) {
|
|
216603
|
+
return {
|
|
216604
|
+
...getCommonAttributes(config2),
|
|
216605
|
+
"event.name": EVENT_ONBOARDING_START2,
|
|
216606
|
+
"event.timestamp": this["event.timestamp"]
|
|
216607
|
+
};
|
|
216608
|
+
}
|
|
216609
|
+
toLogBody() {
|
|
216610
|
+
return "Onboarding started.";
|
|
216611
|
+
}
|
|
216612
|
+
};
|
|
216613
|
+
var EVENT_ONBOARDING_SUCCESS2 = "gemini_cli.onboarding.success";
|
|
216614
|
+
var OnboardingSuccessEvent = class {
|
|
216615
|
+
"event.name";
|
|
216616
|
+
"event.timestamp";
|
|
216617
|
+
userTier;
|
|
216618
|
+
constructor(userTier) {
|
|
216619
|
+
this["event.name"] = "onboarding_success";
|
|
216620
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
216621
|
+
this.userTier = userTier;
|
|
216622
|
+
}
|
|
216623
|
+
toOpenTelemetryAttributes(config2) {
|
|
216624
|
+
return {
|
|
216625
|
+
...getCommonAttributes(config2),
|
|
216626
|
+
"event.name": EVENT_ONBOARDING_SUCCESS2,
|
|
216627
|
+
"event.timestamp": this["event.timestamp"],
|
|
216628
|
+
user_tier: this.userTier ?? ""
|
|
216629
|
+
};
|
|
216630
|
+
}
|
|
216631
|
+
toLogBody() {
|
|
216632
|
+
return `Onboarding succeeded.${this.userTier ? ` Tier: ${this.userTier}` : ""}`;
|
|
216633
|
+
}
|
|
216634
|
+
};
|
|
216561
216635
|
var EVENT_TOKEN_STORAGE_INITIALIZATION = "gemini_cli.token_storage.initialization";
|
|
216562
216636
|
var TokenStorageInitializationEvent = class {
|
|
216563
216637
|
"event.name";
|
|
@@ -218119,8 +218193,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
218119
218193
|
var PointerVector = import_vector.default.PointerVector;
|
|
218120
218194
|
|
|
218121
218195
|
// packages/core/src/generated/git-commit.ts
|
|
218122
|
-
var GIT_COMMIT_INFO = "
|
|
218123
|
-
var CLI_VERSION = "0.35.0-preview.
|
|
218196
|
+
var GIT_COMMIT_INFO = "e88b56bbc";
|
|
218197
|
+
var CLI_VERSION = "0.35.0-preview.4";
|
|
218124
218198
|
|
|
218125
218199
|
// packages/core/src/ide/detect-ide.ts
|
|
218126
218200
|
var IDE_DEFINITIONS = {
|
|
@@ -219586,6 +219660,31 @@ var ClearcutLogger = class _ClearcutLogger {
|
|
|
219586
219660
|
);
|
|
219587
219661
|
this.flushIfNeeded();
|
|
219588
219662
|
}
|
|
219663
|
+
logOnboardingStartEvent(_event) {
|
|
219664
|
+
const data = [
|
|
219665
|
+
{
|
|
219666
|
+
gemini_cli_key: 192 /* GEMINI_CLI_ONBOARDING_START */,
|
|
219667
|
+
value: "true"
|
|
219668
|
+
}
|
|
219669
|
+
];
|
|
219670
|
+
this.enqueueLogEvent(
|
|
219671
|
+
this.createLogEvent("onboarding_start" /* ONBOARDING_START */, data)
|
|
219672
|
+
);
|
|
219673
|
+
this.flushIfNeeded();
|
|
219674
|
+
}
|
|
219675
|
+
logOnboardingSuccessEvent(event) {
|
|
219676
|
+
const data = [];
|
|
219677
|
+
if (event.userTier) {
|
|
219678
|
+
data.push({
|
|
219679
|
+
gemini_cli_key: 193 /* GEMINI_CLI_ONBOARDING_USER_TIER */,
|
|
219680
|
+
value: event.userTier
|
|
219681
|
+
});
|
|
219682
|
+
}
|
|
219683
|
+
this.enqueueLogEvent(
|
|
219684
|
+
this.createLogEvent("onboarding_success" /* ONBOARDING_SUCCESS */, data)
|
|
219685
|
+
);
|
|
219686
|
+
this.flushIfNeeded();
|
|
219687
|
+
}
|
|
219589
219688
|
logStartupStatsEvent(event) {
|
|
219590
219689
|
const data = [
|
|
219591
219690
|
{
|
|
@@ -230726,9 +230825,9 @@ async function initializeTelemetry(config2, credentials3) {
|
|
|
230726
230825
|
if (config2.getDebugMode()) {
|
|
230727
230826
|
debugLogger.log("OpenTelemetry SDK started successfully.");
|
|
230728
230827
|
}
|
|
230729
|
-
telemetryInitialized = true;
|
|
230730
230828
|
activeTelemetryEmail = credentials3?.client_email;
|
|
230731
230829
|
initializeMetrics(config2);
|
|
230830
|
+
telemetryInitialized = true;
|
|
230732
230831
|
void flushTelemetryBuffer();
|
|
230733
230832
|
} catch (error40) {
|
|
230734
230833
|
debugLogger.error("Error starting OpenTelemetry SDK:", error40);
|
|
@@ -231397,6 +231496,30 @@ function logTokenStorageInitialization(config2, event) {
|
|
|
231397
231496
|
recordTokenStorageInitialization(config2, event);
|
|
231398
231497
|
});
|
|
231399
231498
|
}
|
|
231499
|
+
function logOnboardingStart(config2, event) {
|
|
231500
|
+
ClearcutLogger.getInstance(config2)?.logOnboardingStartEvent(event);
|
|
231501
|
+
bufferTelemetryEvent(() => {
|
|
231502
|
+
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
231503
|
+
const logRecord = {
|
|
231504
|
+
body: event.toLogBody(),
|
|
231505
|
+
attributes: event.toOpenTelemetryAttributes(config2)
|
|
231506
|
+
};
|
|
231507
|
+
logger3.emit(logRecord);
|
|
231508
|
+
recordOnboardingStart(config2);
|
|
231509
|
+
});
|
|
231510
|
+
}
|
|
231511
|
+
function logOnboardingSuccess(config2, event) {
|
|
231512
|
+
ClearcutLogger.getInstance(config2)?.logOnboardingSuccessEvent(event);
|
|
231513
|
+
bufferTelemetryEvent(() => {
|
|
231514
|
+
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
231515
|
+
const logRecord = {
|
|
231516
|
+
body: event.toLogBody(),
|
|
231517
|
+
attributes: event.toOpenTelemetryAttributes(config2)
|
|
231518
|
+
};
|
|
231519
|
+
logger3.emit(logRecord);
|
|
231520
|
+
recordOnboardingSuccess(config2, event.userTier);
|
|
231521
|
+
});
|
|
231522
|
+
}
|
|
231400
231523
|
function logBillingEvent(config2, event) {
|
|
231401
231524
|
bufferTelemetryEvent(() => {
|
|
231402
231525
|
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
@@ -248501,7 +248624,7 @@ var IdeClient = class _IdeClient {
|
|
|
248501
248624
|
* content if accepted.
|
|
248502
248625
|
*/
|
|
248503
248626
|
async openDiff(filePath, newContent) {
|
|
248504
|
-
const
|
|
248627
|
+
const release3 = await this.acquireMutex();
|
|
248505
248628
|
const promise2 = new Promise((resolve16, reject) => {
|
|
248506
248629
|
if (!this.client) {
|
|
248507
248630
|
return reject(new Error("IDE client is not connected."));
|
|
@@ -248539,7 +248662,7 @@ var IdeClient = class _IdeClient {
|
|
|
248539
248662
|
reject(err2);
|
|
248540
248663
|
});
|
|
248541
248664
|
});
|
|
248542
|
-
promise2.finally(
|
|
248665
|
+
promise2.finally(release3);
|
|
248543
248666
|
return promise2;
|
|
248544
248667
|
}
|
|
248545
248668
|
/**
|
|
@@ -248560,13 +248683,13 @@ var IdeClient = class _IdeClient {
|
|
|
248560
248683
|
* release the lock.
|
|
248561
248684
|
*/
|
|
248562
248685
|
acquireMutex() {
|
|
248563
|
-
let
|
|
248686
|
+
let release3;
|
|
248564
248687
|
const newMutex = new Promise((resolve16) => {
|
|
248565
|
-
|
|
248688
|
+
release3 = resolve16;
|
|
248566
248689
|
});
|
|
248567
248690
|
const oldMutex = this.diffMutex;
|
|
248568
248691
|
this.diffMutex = newMutex;
|
|
248569
|
-
return oldMutex.then(() =>
|
|
248692
|
+
return oldMutex.then(() => release3);
|
|
248570
248693
|
}
|
|
248571
248694
|
async closeDiff(filePath, options) {
|
|
248572
248695
|
try {
|
|
@@ -252235,7 +252358,7 @@ function getVersion() {
|
|
|
252235
252358
|
}
|
|
252236
252359
|
versionPromise = (async () => {
|
|
252237
252360
|
const pkgJson = await getPackageJson(__dirname3);
|
|
252238
|
-
return "0.35.0-preview.
|
|
252361
|
+
return "0.35.0-preview.4";
|
|
252239
252362
|
})();
|
|
252240
252363
|
return versionPromise;
|
|
252241
252364
|
}
|
|
@@ -252754,7 +252877,7 @@ function resetUserDataCacheForTesting() {
|
|
|
252754
252877
|
storage: "weakmap"
|
|
252755
252878
|
});
|
|
252756
252879
|
}
|
|
252757
|
-
async function setupUser(client,
|
|
252880
|
+
async function setupUser(client, config2, httpOptions = {}) {
|
|
252758
252881
|
const projectId = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
|
|
252759
252882
|
const projectCache = userDataCache.getOrCreate(
|
|
252760
252883
|
client,
|
|
@@ -252766,10 +252889,10 @@ async function setupUser(client, validationHandler, httpOptions = {}) {
|
|
|
252766
252889
|
);
|
|
252767
252890
|
return projectCache.getOrCreate(
|
|
252768
252891
|
projectId,
|
|
252769
|
-
() => _doSetupUser(client, projectId,
|
|
252892
|
+
() => _doSetupUser(client, projectId, config2, httpOptions)
|
|
252770
252893
|
);
|
|
252771
252894
|
}
|
|
252772
|
-
async function _doSetupUser(client, projectId,
|
|
252895
|
+
async function _doSetupUser(client, projectId, config2, httpOptions = {}) {
|
|
252773
252896
|
const caServer = new CodeAssistServer(
|
|
252774
252897
|
client,
|
|
252775
252898
|
projectId,
|
|
@@ -252783,6 +252906,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252783
252906
|
platform: "PLATFORM_UNSPECIFIED",
|
|
252784
252907
|
pluginType: "GEMINI"
|
|
252785
252908
|
};
|
|
252909
|
+
const validationHandler = config2.getValidationHandler();
|
|
252786
252910
|
let loadRes;
|
|
252787
252911
|
while (true) {
|
|
252788
252912
|
loadRes = await caServer.loadCodeAssist({
|
|
@@ -252824,7 +252948,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252824
252948
|
projectId,
|
|
252825
252949
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
252826
252950
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
252827
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
252951
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
252952
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
252828
252953
|
};
|
|
252829
252954
|
}
|
|
252830
252955
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -252833,7 +252958,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252833
252958
|
projectId: loadRes.cloudaicompanionProject,
|
|
252834
252959
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
252835
252960
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
252836
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
252961
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
252962
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
252837
252963
|
};
|
|
252838
252964
|
}
|
|
252839
252965
|
const tier = getOnboardTier(loadRes);
|
|
@@ -252859,6 +252985,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252859
252985
|
}
|
|
252860
252986
|
};
|
|
252861
252987
|
}
|
|
252988
|
+
logOnboardingStart(config2, new OnboardingStartEvent());
|
|
252862
252989
|
let lroRes = await caServer.onboardUser(onboardReq);
|
|
252863
252990
|
if (!lroRes.done && lroRes.name) {
|
|
252864
252991
|
const operationName = lroRes.name;
|
|
@@ -252867,12 +252994,15 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252867
252994
|
lroRes = await caServer.getOperation(operationName);
|
|
252868
252995
|
}
|
|
252869
252996
|
}
|
|
252997
|
+
const userTier = tier.id ?? UserTierId.STANDARD;
|
|
252998
|
+
logOnboardingSuccess(config2, new OnboardingSuccessEvent(userTier));
|
|
252870
252999
|
if (!lroRes.response?.cloudaicompanionProject?.id) {
|
|
252871
253000
|
if (projectId) {
|
|
252872
253001
|
return {
|
|
252873
253002
|
projectId,
|
|
252874
253003
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
252875
|
-
userTierName: tier.name
|
|
253004
|
+
userTierName: tier.name,
|
|
253005
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
252876
253006
|
};
|
|
252877
253007
|
}
|
|
252878
253008
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -252880,7 +253010,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252880
253010
|
return {
|
|
252881
253011
|
projectId: lroRes.response.cloudaicompanionProject.id,
|
|
252882
253012
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
252883
|
-
userTierName: tier.name
|
|
253013
|
+
userTierName: tier.name,
|
|
253014
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
252884
253015
|
};
|
|
252885
253016
|
}
|
|
252886
253017
|
function throwIneligibleOrProjectIdError(res) {
|
|
@@ -253436,11 +253567,7 @@ var LoggingContentGenerator = class {
|
|
|
253436
253567
|
async function createCodeAssistContentGenerator(httpOptions, authType, config2, sessionId2) {
|
|
253437
253568
|
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "compute-default-credentials" /* COMPUTE_ADC */) {
|
|
253438
253569
|
const authClient = await getOauthClient(authType, config2);
|
|
253439
|
-
const userData = await setupUser(
|
|
253440
|
-
authClient,
|
|
253441
|
-
config2.getValidationHandler(),
|
|
253442
|
-
httpOptions
|
|
253443
|
-
);
|
|
253570
|
+
const userData = await setupUser(authClient, config2, httpOptions);
|
|
253444
253571
|
return new CodeAssistServer(
|
|
253445
253572
|
authClient,
|
|
253446
253573
|
userData.projectId,
|
|
@@ -253615,7 +253742,7 @@ function determineSurface2() {
|
|
|
253615
253742
|
if (ide.name !== "vscode") {
|
|
253616
253743
|
return ide.name;
|
|
253617
253744
|
}
|
|
253618
|
-
if (process.env["TERM_PROGRAM"] === "vscode") {
|
|
253745
|
+
if (process.env["TERM_PROGRAM"] === "vscode" || process.env["VSCODE_PID"]) {
|
|
253619
253746
|
return ide.name;
|
|
253620
253747
|
}
|
|
253621
253748
|
if (process.env["GITHUB_SHA"]) {
|
|
@@ -253772,15 +253899,34 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
|
|
|
253772
253899
|
);
|
|
253773
253900
|
const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
|
|
253774
253901
|
const clientName = gcConfig.getClientName();
|
|
253775
|
-
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
253776
253902
|
const surface = determineSurface2();
|
|
253777
|
-
|
|
253903
|
+
let userAgent;
|
|
253904
|
+
if (clientName === "acp-vscode" || surface === "vscode") {
|
|
253905
|
+
const osTypeMap = {
|
|
253906
|
+
darwin: "macOS",
|
|
253907
|
+
win32: "Windows",
|
|
253908
|
+
linux: "Linux"
|
|
253909
|
+
};
|
|
253910
|
+
const osType = osTypeMap[process.platform] || process.platform;
|
|
253911
|
+
const osVersion = os15.release();
|
|
253912
|
+
const arch4 = process.arch;
|
|
253913
|
+
const vscodeVersion = process.env["TERM_PROGRAM_VERSION"] || "unknown";
|
|
253914
|
+
let hostPath = `VSCode/${vscodeVersion}`;
|
|
253915
|
+
if (isCloudShell()) {
|
|
253916
|
+
const cloudShellVersion = process.env["CLOUD_SHELL_VERSION"] || "unknown";
|
|
253917
|
+
hostPath += ` > CloudShell/${cloudShellVersion}`;
|
|
253918
|
+
}
|
|
253919
|
+
userAgent = `CloudCodeVSCode/${version4} (aidev_client; os_type=${osType}; os_version=${osVersion}; arch=${arch4}; host_path=${hostPath}; proxy_client=geminicli)`;
|
|
253920
|
+
} else {
|
|
253921
|
+
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
253922
|
+
userAgent = `${userAgentPrefix}/${version4}/${model} (${process.platform}; ${process.arch}; ${surface})`;
|
|
253923
|
+
}
|
|
253778
253924
|
const customHeadersMap = parseCustomHeaders(customHeadersEnv);
|
|
253779
253925
|
const apiKeyAuthMechanism = process.env["GEMINI_API_KEY_AUTH_MECHANISM"] || "x-goog-api-key";
|
|
253780
253926
|
const apiVersionEnv = process.env["GOOGLE_GENAI_API_VERSION"];
|
|
253781
253927
|
const baseHeaders = {
|
|
253782
|
-
|
|
253783
|
-
|
|
253928
|
+
"User-Agent": userAgent,
|
|
253929
|
+
...customHeadersMap
|
|
253784
253930
|
};
|
|
253785
253931
|
if (apiKeyAuthMechanism === "bearer" && (config2.authType === "gemini-api-key" /* USE_GEMINI */ || config2.authType === "vertex-ai" /* USE_VERTEX_AI */) && config2.apiKey) {
|
|
253786
253932
|
baseHeaders["Authorization"] = `Bearer ${config2.apiKey}`;
|
|
@@ -272498,7 +272644,7 @@ import {
|
|
|
272498
272644
|
lookup as dnsLookup
|
|
272499
272645
|
} from "node:dns";
|
|
272500
272646
|
import { promisify as promisify11 } from "node:util";
|
|
272501
|
-
import
|
|
272647
|
+
import os16 from "node:os";
|
|
272502
272648
|
var { Resolver: AsyncResolver } = dnsPromises;
|
|
272503
272649
|
var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
272504
272650
|
var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -272521,7 +272667,7 @@ var map4to6 = (entries2) => {
|
|
|
272521
272667
|
var getIfaceInfo = () => {
|
|
272522
272668
|
let has4 = false;
|
|
272523
272669
|
let has6 = false;
|
|
272524
|
-
for (const device of Object.values(
|
|
272670
|
+
for (const device of Object.values(os16.networkInterfaces())) {
|
|
272525
272671
|
for (const iface of device) {
|
|
272526
272672
|
if (iface.internal) {
|
|
272527
272673
|
continue;
|
|
@@ -275699,7 +275845,7 @@ var got = create_default(defaults2);
|
|
|
275699
275845
|
var source_default2 = got;
|
|
275700
275846
|
|
|
275701
275847
|
// node_modules/@joshua.litt/get-ripgrep/dist/downloadRipGrep.js
|
|
275702
|
-
import * as
|
|
275848
|
+
import * as os18 from "node:os";
|
|
275703
275849
|
import { dirname as dirname6, join as join10 } from "node:path";
|
|
275704
275850
|
|
|
275705
275851
|
// node_modules/@joshua.litt/get-ripgrep/node_modules/path-exists/index.js
|
|
@@ -275718,9 +275864,9 @@ import { pipeline } from "node:stream/promises";
|
|
|
275718
275864
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
275719
275865
|
|
|
275720
275866
|
// node_modules/xdg-basedir/index.js
|
|
275721
|
-
import
|
|
275867
|
+
import os17 from "os";
|
|
275722
275868
|
import path38 from "path";
|
|
275723
|
-
var homeDirectory =
|
|
275869
|
+
var homeDirectory = os17.homedir();
|
|
275724
275870
|
var { env } = process;
|
|
275725
275871
|
var xdgData = env.XDG_DATA_HOME || (homeDirectory ? path38.join(homeDirectory, ".local", "share") : void 0);
|
|
275726
275872
|
var xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? path38.join(homeDirectory, ".config") : void 0);
|
|
@@ -275744,8 +275890,8 @@ var REPOSITORY = `microsoft/ripgrep-prebuilt`;
|
|
|
275744
275890
|
var VERSION2 = process.env.RIPGREP_VERSION || "v13.0.0-10";
|
|
275745
275891
|
var BIN_PATH = join10(__dirname5, "../bin");
|
|
275746
275892
|
var getTarget = () => {
|
|
275747
|
-
const arch4 = process.env.npm_config_arch ||
|
|
275748
|
-
const platform10 = process.env.platform ||
|
|
275893
|
+
const arch4 = process.env.npm_config_arch || os18.arch();
|
|
275894
|
+
const platform10 = process.env.platform || os18.platform();
|
|
275749
275895
|
switch (platform10) {
|
|
275750
275896
|
case "darwin":
|
|
275751
275897
|
switch (arch4) {
|
|
@@ -275786,7 +275932,7 @@ var getTarget = () => {
|
|
|
275786
275932
|
var downloadFile = async (url3, outFile) => {
|
|
275787
275933
|
let tmpDir = void 0;
|
|
275788
275934
|
try {
|
|
275789
|
-
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(
|
|
275935
|
+
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(os18.tmpdir(), "download-ripgrep"));
|
|
275790
275936
|
const tmpFile = path39.join(tmpDir, "tmp-file");
|
|
275791
275937
|
await pipeline(source_default2.stream(url3), createWriteStream3(tmpFile));
|
|
275792
275938
|
await mkdir2(dirname6(outFile), { recursive: true });
|
|
@@ -276836,7 +276982,7 @@ var ActivateSkillTool = class _ActivateSkillTool extends BaseDeclarativeTool {
|
|
|
276836
276982
|
// packages/core/src/tools/shell.ts
|
|
276837
276983
|
import fsPromises10 from "node:fs/promises";
|
|
276838
276984
|
import path45 from "node:path";
|
|
276839
|
-
import
|
|
276985
|
+
import os22 from "node:os";
|
|
276840
276986
|
import crypto14 from "node:crypto";
|
|
276841
276987
|
|
|
276842
276988
|
// packages/core/src/utils/summarizer.ts
|
|
@@ -276918,14 +277064,14 @@ var getPty = async () => {
|
|
|
276918
277064
|
// packages/core/src/services/shellExecutionService.ts
|
|
276919
277065
|
import { spawn as cpSpawn } from "node:child_process";
|
|
276920
277066
|
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
276921
|
-
import
|
|
277067
|
+
import os21 from "node:os";
|
|
276922
277068
|
import fs32, { mkdirSync as mkdirSync2 } from "node:fs";
|
|
276923
277069
|
import path44 from "node:path";
|
|
276924
277070
|
|
|
276925
277071
|
// packages/core/src/utils/systemEncoding.ts
|
|
276926
277072
|
var import_chardet = __toESM(require_lib9(), 1);
|
|
276927
277073
|
import { execSync as execSync2 } from "node:child_process";
|
|
276928
|
-
import
|
|
277074
|
+
import os19 from "node:os";
|
|
276929
277075
|
var cachedSystemEncoding = void 0;
|
|
276930
277076
|
function resetEncodingCache() {
|
|
276931
277077
|
cachedSystemEncoding = void 0;
|
|
@@ -276940,7 +277086,7 @@ function getCachedEncodingForBuffer(buffer) {
|
|
|
276940
277086
|
return detectEncodingFromBuffer(buffer) || "utf-8";
|
|
276941
277087
|
}
|
|
276942
277088
|
function getSystemEncoding() {
|
|
276943
|
-
if (
|
|
277089
|
+
if (os19.platform() === "win32") {
|
|
276944
277090
|
try {
|
|
276945
277091
|
const output = execSync2("chcp", { encoding: "utf8" });
|
|
276946
277092
|
const match3 = output.match(/:\s*(\d+)/);
|
|
@@ -277439,11 +277585,11 @@ function convertColorToHex(color, colorMode, defaultColor) {
|
|
|
277439
277585
|
}
|
|
277440
277586
|
|
|
277441
277587
|
// packages/core/src/utils/process-utils.ts
|
|
277442
|
-
import
|
|
277588
|
+
import os20 from "node:os";
|
|
277443
277589
|
var SIGKILL_TIMEOUT_MS = 200;
|
|
277444
277590
|
async function killProcessGroup(options) {
|
|
277445
277591
|
const { pid, escalate = false, isExited = () => false, pty } = options;
|
|
277446
|
-
const isWindows2 =
|
|
277592
|
+
const isWindows2 = os20.platform() === "win32";
|
|
277447
277593
|
if (isWindows2) {
|
|
277448
277594
|
if (pty) {
|
|
277449
277595
|
try {
|
|
@@ -278056,7 +278202,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
278056
278202
|
return { finalBuffer };
|
|
278057
278203
|
};
|
|
278058
278204
|
var cleanup = cleanup2;
|
|
278059
|
-
const isWindows2 =
|
|
278205
|
+
const isWindows2 = os21.platform() === "win32";
|
|
278060
278206
|
const { executable, argsPrefix, shell } = getShellConfiguration();
|
|
278061
278207
|
const guardedCommand = ensurePromptvarsDisabled(commandToExecute, shell);
|
|
278062
278208
|
const spawnArgs = [...argsPrefix, guardedCommand];
|
|
@@ -278244,7 +278390,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
278244
278390
|
}
|
|
278245
278391
|
const finalStrippedOutput = stripAnsi(combinedOutput).trim();
|
|
278246
278392
|
const exitCode = code;
|
|
278247
|
-
const exitSignal = signal ?
|
|
278393
|
+
const exitSignal = signal ? os21.constants.signals[signal] : null;
|
|
278248
278394
|
const resultPayload = {
|
|
278249
278395
|
rawOutput: finalBuffer,
|
|
278250
278396
|
output: finalStrippedOutput,
|
|
@@ -278866,9 +279012,9 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278866
279012
|
returnDisplay: "Command cancelled by user."
|
|
278867
279013
|
};
|
|
278868
279014
|
}
|
|
278869
|
-
const isWindows2 =
|
|
279015
|
+
const isWindows2 = os22.platform() === "win32";
|
|
278870
279016
|
const tempFileName = `shell_pgrep_${crypto14.randomBytes(6).toString("hex")}.tmp`;
|
|
278871
|
-
const tempFilePath = path45.join(
|
|
279017
|
+
const tempFilePath = path45.join(os22.tmpdir(), tempFileName);
|
|
278872
279018
|
const timeoutMs = this.context.config.getShellToolInactivityTimeout();
|
|
278873
279019
|
const timeoutController = new AbortController();
|
|
278874
279020
|
let timeoutTimer;
|
|
@@ -278970,7 +279116,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278970
279116
|
}
|
|
278971
279117
|
const result2 = await resultPromise;
|
|
278972
279118
|
const backgroundPIDs = [];
|
|
278973
|
-
if (
|
|
279119
|
+
if (os22.platform() !== "win32") {
|
|
278974
279120
|
let tempFileExists = false;
|
|
278975
279121
|
try {
|
|
278976
279122
|
await fsPromises10.access(tempFilePath);
|
|
@@ -278980,7 +279126,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278980
279126
|
}
|
|
278981
279127
|
if (tempFileExists) {
|
|
278982
279128
|
const pgrepContent = await fsPromises10.readFile(tempFilePath, "utf8");
|
|
278983
|
-
const pgrepLines = pgrepContent.split(
|
|
279129
|
+
const pgrepLines = pgrepContent.split(os22.EOL).filter(Boolean);
|
|
278984
279130
|
for (const line of pgrepLines) {
|
|
278985
279131
|
if (!/^\d+$/.test(line)) {
|
|
278986
279132
|
debugLogger.error(`pgrep: ${line}`);
|
|
@@ -312184,7 +312330,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
312184
312330
|
return provider;
|
|
312185
312331
|
}
|
|
312186
312332
|
case "oauth2": {
|
|
312187
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
312333
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-OYNEH6QL.js");
|
|
312188
312334
|
const provider = new OAuth2AuthProvider(
|
|
312189
312335
|
authConfig,
|
|
312190
312336
|
options.agentName ?? "unknown",
|
|
@@ -312350,6 +312496,7 @@ var AgentRegistry = class {
|
|
|
312350
312496
|
agents = /* @__PURE__ */ new Map();
|
|
312351
312497
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
312352
312498
|
allDefinitions = /* @__PURE__ */ new Map();
|
|
312499
|
+
builtInAgents = /* @__PURE__ */ new Set();
|
|
312353
312500
|
/**
|
|
312354
312501
|
* Discovers and loads agents.
|
|
312355
312502
|
*/
|
|
@@ -312357,6 +312504,12 @@ var AgentRegistry = class {
|
|
|
312357
312504
|
coreEvents.on("model-changed" /* ModelChanged */, this.onModelChanged);
|
|
312358
312505
|
await this.loadAgents();
|
|
312359
312506
|
}
|
|
312507
|
+
/**
|
|
312508
|
+
* Returns true if the agent is a built-in agent.
|
|
312509
|
+
*/
|
|
312510
|
+
isBuiltIn(name3) {
|
|
312511
|
+
return this.builtInAgents.has(name3);
|
|
312512
|
+
}
|
|
312360
312513
|
onModelChanged = () => {
|
|
312361
312514
|
this.refreshAgents().catch((e2) => {
|
|
312362
312515
|
debugLogger.error(
|
|
@@ -312518,12 +312671,20 @@ var AgentRegistry = class {
|
|
|
312518
312671
|
}
|
|
312519
312672
|
}
|
|
312520
312673
|
loadBuiltInAgents() {
|
|
312521
|
-
|
|
312522
|
-
this.
|
|
312523
|
-
this.registerLocalAgent(
|
|
312674
|
+
const codebaseAgent = CodebaseInvestigatorAgent(this.config);
|
|
312675
|
+
this.builtInAgents.add(codebaseAgent.name);
|
|
312676
|
+
this.registerLocalAgent(codebaseAgent);
|
|
312677
|
+
const helpAgent = CliHelpAgent(this.config);
|
|
312678
|
+
this.builtInAgents.add(helpAgent.name);
|
|
312679
|
+
this.registerLocalAgent(helpAgent);
|
|
312680
|
+
const generalistAgent = GeneralistAgent(this.config);
|
|
312681
|
+
this.builtInAgents.add(generalistAgent.name);
|
|
312682
|
+
this.registerLocalAgent(generalistAgent);
|
|
312524
312683
|
const browserConfig = this.config.getBrowserAgentConfig();
|
|
312525
312684
|
if (browserConfig.enabled) {
|
|
312526
|
-
|
|
312685
|
+
const browserAgent = BrowserAgentDefinition(this.config);
|
|
312686
|
+
this.builtInAgents.add(browserAgent.name);
|
|
312687
|
+
this.registerLocalAgent(browserAgent);
|
|
312527
312688
|
}
|
|
312528
312689
|
}
|
|
312529
312690
|
async refreshAgents() {
|
|
@@ -318161,14 +318322,14 @@ var import_toml2 = __toESM(require_toml(), 1);
|
|
|
318161
318322
|
// packages/core/src/utils/security.ts
|
|
318162
318323
|
import * as fs46 from "node:fs/promises";
|
|
318163
318324
|
import { constants as constants4 } from "node:fs";
|
|
318164
|
-
import * as
|
|
318325
|
+
import * as os23 from "node:os";
|
|
318165
318326
|
async function isDirectorySecure(dirPath) {
|
|
318166
318327
|
try {
|
|
318167
318328
|
const stats = await fs46.stat(dirPath);
|
|
318168
318329
|
if (!stats.isDirectory()) {
|
|
318169
318330
|
return { secure: false, reason: "Not a directory" };
|
|
318170
318331
|
}
|
|
318171
|
-
if (
|
|
318332
|
+
if (os23.platform() === "win32") {
|
|
318172
318333
|
try {
|
|
318173
318334
|
const escapedPath = dirPath.replace(/'/g, "''");
|
|
318174
318335
|
const script = `
|
|
@@ -323644,7 +323805,7 @@ var Config = class {
|
|
|
323644
323805
|
this.model = params.model;
|
|
323645
323806
|
this.disableLoopDetection = params.disableLoopDetection ?? false;
|
|
323646
323807
|
this._activeModel = params.model;
|
|
323647
|
-
this.enableAgents = params.enableAgents ??
|
|
323808
|
+
this.enableAgents = params.enableAgents ?? false;
|
|
323648
323809
|
this.agents = params.agents ?? {};
|
|
323649
323810
|
this.disableLLMCorrection = params.disableLLMCorrection ?? true;
|
|
323650
323811
|
this.planEnabled = params.plan ?? true;
|
|
@@ -325364,7 +325525,7 @@ ${sections.join("\n")}
|
|
|
325364
325525
|
const definitions = this.agentRegistry.getAllDefinitions();
|
|
325365
325526
|
for (const definition of definitions) {
|
|
325366
325527
|
try {
|
|
325367
|
-
if (!this.isAgentsEnabled() || agentsOverrides[definition.name]?.enabled === false) {
|
|
325528
|
+
if (!this.isAgentsEnabled() && !this.agentRegistry.isBuiltIn(definition.name) || agentsOverrides[definition.name]?.enabled === false) {
|
|
325368
325529
|
continue;
|
|
325369
325530
|
}
|
|
325370
325531
|
const tool = new SubagentTool(definition, this, this.messageBus);
|
|
@@ -329192,13 +329353,13 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
|
|
|
329192
329353
|
};
|
|
329193
329354
|
|
|
329194
329355
|
// packages/core/src/utils/compatibility.ts
|
|
329195
|
-
import
|
|
329356
|
+
import os24 from "node:os";
|
|
329196
329357
|
function isWindows10() {
|
|
329197
|
-
if (
|
|
329358
|
+
if (os24.platform() !== "win32") {
|
|
329198
329359
|
return false;
|
|
329199
329360
|
}
|
|
329200
|
-
const
|
|
329201
|
-
const parts2 =
|
|
329361
|
+
const release3 = os24.release();
|
|
329362
|
+
const parts2 = release3.split(".");
|
|
329202
329363
|
if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
|
|
329203
329364
|
const build = parseInt(parts2[2], 10);
|
|
329204
329365
|
return build < 22e3;
|
|
@@ -329250,7 +329411,7 @@ function getCompatibilityWarnings(options) {
|
|
|
329250
329411
|
darwin: "iTerm2 or Ghostty",
|
|
329251
329412
|
linux: "Ghostty"
|
|
329252
329413
|
};
|
|
329253
|
-
const suggestion = platformTerminals[
|
|
329414
|
+
const suggestion = platformTerminals[os24.platform()];
|
|
329254
329415
|
const suggestedTerminals = suggestion ? ` (e.g., ${suggestion})` : "";
|
|
329255
329416
|
warnings.push({
|
|
329256
329417
|
id: "jetbrains-terminal",
|
|
@@ -329552,6 +329713,8 @@ export {
|
|
|
329552
329713
|
ModelSlashCommandEvent,
|
|
329553
329714
|
ExtensionDisableEvent,
|
|
329554
329715
|
WebFetchFallbackAttemptEvent,
|
|
329716
|
+
OnboardingStartEvent,
|
|
329717
|
+
OnboardingSuccessEvent,
|
|
329555
329718
|
KeychainSchema,
|
|
329556
329719
|
KEYCHAIN_TEST_PREFIX,
|
|
329557
329720
|
SECRET_PREFIX,
|
|
@@ -329785,6 +329948,8 @@ export {
|
|
|
329785
329948
|
logExtensionEnable,
|
|
329786
329949
|
logExtensionDisable,
|
|
329787
329950
|
logWebFetchFallbackAttempt,
|
|
329951
|
+
logOnboardingStart,
|
|
329952
|
+
logOnboardingSuccess,
|
|
329788
329953
|
logBillingEvent,
|
|
329789
329954
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
329790
329955
|
IDE_MAX_OPEN_FILES,
|