@google/gemini-cli 0.35.0-preview.2 → 0.35.0-preview.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-5OVDZKPV.js → chunk-6TYFBMHW.js} +298 -149
- package/bundle/{chunk-HYF34ISK.js → chunk-A4R3OQWV.js} +7 -14
- package/bundle/{chunk-ELVZ5MKI.js → chunk-CY52DPHS.js} +299 -153
- package/bundle/{chunk-SCIFYSWM.js → chunk-M2ILNVA4.js} +7 -14
- package/bundle/{chunk-TYZCRVGB.js → chunk-OG7ZVIE3.js} +7 -14
- package/bundle/{chunk-WXXNCSKU.js → chunk-SP3CN5SW.js} +7 -14
- package/bundle/{chunk-6AQAEYFC.js → chunk-U4R2MXAY.js} +298 -149
- package/bundle/{chunk-WTYAEXC3.js → chunk-XMXHCUTA.js} +298 -149
- package/bundle/{core-ZWMLWHG7.js → core-2LVP4WUV.js} +9 -1
- package/bundle/{devtoolsService-XMVPJFZ7.js → devtoolsService-BL26GS4A.js} +2 -2
- package/bundle/{devtoolsService-DH7MKZL2.js → devtoolsService-TJCM4TEV.js} +2 -2
- package/bundle/{devtoolsService-EVTQ32UO.js → devtoolsService-Y7NQIXSP.js} +2 -2
- package/bundle/{devtoolsService-FPFZEEVK.js → devtoolsService-ZSLJ6ZX3.js} +2 -2
- package/bundle/{dist-6LCHGUBD.js → dist-62BF6UAT.js} +9 -1
- package/bundle/{dist-AWPSKKKO.js → dist-ZB3W6HDM.js} +9 -1
- package/bundle/{dist-WOQEPX5R.js → dist-ZPSHGZCY.js} +9 -1
- package/bundle/docs/cli/telemetry.md +28 -0
- package/bundle/gemini.js +6 -6
- package/bundle/{interactiveCli-7H3T4KJF.js → interactiveCli-7UCQINHC.js} +3 -3
- package/bundle/{interactiveCli-N4QW3NCZ.js → interactiveCli-P7N2TZZ2.js} +3 -3
- package/bundle/{interactiveCli-E3DWTWRM.js → interactiveCli-QHET6XGY.js} +3 -3
- package/bundle/{interactiveCli-Z4Y6XB7M.js → interactiveCli-R42I3ZR2.js} +3 -3
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-CPMX7ITW.js → oauth2-provider-756G3OVY.js} +1 -1
- package/bundle/{oauth2-provider-IU6STKL7.js → oauth2-provider-FZKOXX3P.js} +1 -1
- package/bundle/{oauth2-provider-LTBDSRHY.js → oauth2-provider-QMCN34OP.js} +1 -1
- package/bundle/{oauth2-provider-ZWWMTBET.js → oauth2-provider-XHYKUX3S.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 = "596a736a9";
|
|
218197
|
+
var CLI_VERSION = "0.35.0-preview.3";
|
|
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
|
{
|
|
@@ -226036,11 +226135,7 @@ function normalizeCommandName(raw) {
|
|
|
226036
226135
|
return raw.slice(1, -1);
|
|
226037
226136
|
}
|
|
226038
226137
|
}
|
|
226039
|
-
|
|
226040
|
-
if (!trimmed2) {
|
|
226041
|
-
return trimmed2;
|
|
226042
|
-
}
|
|
226043
|
-
return trimmed2.split(/[\\/]/).pop() ?? trimmed2;
|
|
226138
|
+
return raw.trim();
|
|
226044
226139
|
}
|
|
226045
226140
|
function extractNameFromNode(node) {
|
|
226046
226141
|
switch (node.type) {
|
|
@@ -230730,9 +230825,9 @@ async function initializeTelemetry(config2, credentials3) {
|
|
|
230730
230825
|
if (config2.getDebugMode()) {
|
|
230731
230826
|
debugLogger.log("OpenTelemetry SDK started successfully.");
|
|
230732
230827
|
}
|
|
230733
|
-
telemetryInitialized = true;
|
|
230734
230828
|
activeTelemetryEmail = credentials3?.client_email;
|
|
230735
230829
|
initializeMetrics(config2);
|
|
230830
|
+
telemetryInitialized = true;
|
|
230736
230831
|
void flushTelemetryBuffer();
|
|
230737
230832
|
} catch (error40) {
|
|
230738
230833
|
debugLogger.error("Error starting OpenTelemetry SDK:", error40);
|
|
@@ -231401,6 +231496,30 @@ function logTokenStorageInitialization(config2, event) {
|
|
|
231401
231496
|
recordTokenStorageInitialization(config2, event);
|
|
231402
231497
|
});
|
|
231403
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
|
+
}
|
|
231404
231523
|
function logBillingEvent(config2, event) {
|
|
231405
231524
|
bufferTelemetryEvent(() => {
|
|
231406
231525
|
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
@@ -248505,7 +248624,7 @@ var IdeClient = class _IdeClient {
|
|
|
248505
248624
|
* content if accepted.
|
|
248506
248625
|
*/
|
|
248507
248626
|
async openDiff(filePath, newContent) {
|
|
248508
|
-
const
|
|
248627
|
+
const release3 = await this.acquireMutex();
|
|
248509
248628
|
const promise2 = new Promise((resolve16, reject) => {
|
|
248510
248629
|
if (!this.client) {
|
|
248511
248630
|
return reject(new Error("IDE client is not connected."));
|
|
@@ -248543,7 +248662,7 @@ var IdeClient = class _IdeClient {
|
|
|
248543
248662
|
reject(err2);
|
|
248544
248663
|
});
|
|
248545
248664
|
});
|
|
248546
|
-
promise2.finally(
|
|
248665
|
+
promise2.finally(release3);
|
|
248547
248666
|
return promise2;
|
|
248548
248667
|
}
|
|
248549
248668
|
/**
|
|
@@ -248564,13 +248683,13 @@ var IdeClient = class _IdeClient {
|
|
|
248564
248683
|
* release the lock.
|
|
248565
248684
|
*/
|
|
248566
248685
|
acquireMutex() {
|
|
248567
|
-
let
|
|
248686
|
+
let release3;
|
|
248568
248687
|
const newMutex = new Promise((resolve16) => {
|
|
248569
|
-
|
|
248688
|
+
release3 = resolve16;
|
|
248570
248689
|
});
|
|
248571
248690
|
const oldMutex = this.diffMutex;
|
|
248572
248691
|
this.diffMutex = newMutex;
|
|
248573
|
-
return oldMutex.then(() =>
|
|
248692
|
+
return oldMutex.then(() => release3);
|
|
248574
248693
|
}
|
|
248575
248694
|
async closeDiff(filePath, options) {
|
|
248576
248695
|
try {
|
|
@@ -252239,7 +252358,7 @@ function getVersion() {
|
|
|
252239
252358
|
}
|
|
252240
252359
|
versionPromise = (async () => {
|
|
252241
252360
|
const pkgJson = await getPackageJson(__dirname3);
|
|
252242
|
-
return "0.35.0-preview.
|
|
252361
|
+
return "0.35.0-preview.3";
|
|
252243
252362
|
})();
|
|
252244
252363
|
return versionPromise;
|
|
252245
252364
|
}
|
|
@@ -252758,7 +252877,7 @@ function resetUserDataCacheForTesting() {
|
|
|
252758
252877
|
storage: "weakmap"
|
|
252759
252878
|
});
|
|
252760
252879
|
}
|
|
252761
|
-
async function setupUser(client,
|
|
252880
|
+
async function setupUser(client, config2, httpOptions = {}) {
|
|
252762
252881
|
const projectId = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
|
|
252763
252882
|
const projectCache = userDataCache.getOrCreate(
|
|
252764
252883
|
client,
|
|
@@ -252770,10 +252889,10 @@ async function setupUser(client, validationHandler, httpOptions = {}) {
|
|
|
252770
252889
|
);
|
|
252771
252890
|
return projectCache.getOrCreate(
|
|
252772
252891
|
projectId,
|
|
252773
|
-
() => _doSetupUser(client, projectId,
|
|
252892
|
+
() => _doSetupUser(client, projectId, config2, httpOptions)
|
|
252774
252893
|
);
|
|
252775
252894
|
}
|
|
252776
|
-
async function _doSetupUser(client, projectId,
|
|
252895
|
+
async function _doSetupUser(client, projectId, config2, httpOptions = {}) {
|
|
252777
252896
|
const caServer = new CodeAssistServer(
|
|
252778
252897
|
client,
|
|
252779
252898
|
projectId,
|
|
@@ -252787,6 +252906,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252787
252906
|
platform: "PLATFORM_UNSPECIFIED",
|
|
252788
252907
|
pluginType: "GEMINI"
|
|
252789
252908
|
};
|
|
252909
|
+
const validationHandler = config2.getValidationHandler();
|
|
252790
252910
|
let loadRes;
|
|
252791
252911
|
while (true) {
|
|
252792
252912
|
loadRes = await caServer.loadCodeAssist({
|
|
@@ -252828,7 +252948,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252828
252948
|
projectId,
|
|
252829
252949
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
252830
252950
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
252831
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
252951
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
252952
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
252832
252953
|
};
|
|
252833
252954
|
}
|
|
252834
252955
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -252837,7 +252958,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252837
252958
|
projectId: loadRes.cloudaicompanionProject,
|
|
252838
252959
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
252839
252960
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
252840
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
252961
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
252962
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
252841
252963
|
};
|
|
252842
252964
|
}
|
|
252843
252965
|
const tier = getOnboardTier(loadRes);
|
|
@@ -252863,6 +252985,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252863
252985
|
}
|
|
252864
252986
|
};
|
|
252865
252987
|
}
|
|
252988
|
+
logOnboardingStart(config2, new OnboardingStartEvent());
|
|
252866
252989
|
let lroRes = await caServer.onboardUser(onboardReq);
|
|
252867
252990
|
if (!lroRes.done && lroRes.name) {
|
|
252868
252991
|
const operationName = lroRes.name;
|
|
@@ -252871,12 +252994,15 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252871
252994
|
lroRes = await caServer.getOperation(operationName);
|
|
252872
252995
|
}
|
|
252873
252996
|
}
|
|
252997
|
+
const userTier = tier.id ?? UserTierId.STANDARD;
|
|
252998
|
+
logOnboardingSuccess(config2, new OnboardingSuccessEvent(userTier));
|
|
252874
252999
|
if (!lroRes.response?.cloudaicompanionProject?.id) {
|
|
252875
253000
|
if (projectId) {
|
|
252876
253001
|
return {
|
|
252877
253002
|
projectId,
|
|
252878
253003
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
252879
|
-
userTierName: tier.name
|
|
253004
|
+
userTierName: tier.name,
|
|
253005
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
252880
253006
|
};
|
|
252881
253007
|
}
|
|
252882
253008
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -252884,7 +253010,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
252884
253010
|
return {
|
|
252885
253011
|
projectId: lroRes.response.cloudaicompanionProject.id,
|
|
252886
253012
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
252887
|
-
userTierName: tier.name
|
|
253013
|
+
userTierName: tier.name,
|
|
253014
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
252888
253015
|
};
|
|
252889
253016
|
}
|
|
252890
253017
|
function throwIneligibleOrProjectIdError(res) {
|
|
@@ -253440,11 +253567,7 @@ var LoggingContentGenerator = class {
|
|
|
253440
253567
|
async function createCodeAssistContentGenerator(httpOptions, authType, config2, sessionId2) {
|
|
253441
253568
|
if (authType === "oauth-personal" /* LOGIN_WITH_GOOGLE */ || authType === "compute-default-credentials" /* COMPUTE_ADC */) {
|
|
253442
253569
|
const authClient = await getOauthClient(authType, config2);
|
|
253443
|
-
const userData = await setupUser(
|
|
253444
|
-
authClient,
|
|
253445
|
-
config2.getValidationHandler(),
|
|
253446
|
-
httpOptions
|
|
253447
|
-
);
|
|
253570
|
+
const userData = await setupUser(authClient, config2, httpOptions);
|
|
253448
253571
|
return new CodeAssistServer(
|
|
253449
253572
|
authClient,
|
|
253450
253573
|
userData.projectId,
|
|
@@ -253619,7 +253742,7 @@ function determineSurface2() {
|
|
|
253619
253742
|
if (ide.name !== "vscode") {
|
|
253620
253743
|
return ide.name;
|
|
253621
253744
|
}
|
|
253622
|
-
if (process.env["TERM_PROGRAM"] === "vscode") {
|
|
253745
|
+
if (process.env["TERM_PROGRAM"] === "vscode" || process.env["VSCODE_PID"]) {
|
|
253623
253746
|
return ide.name;
|
|
253624
253747
|
}
|
|
253625
253748
|
if (process.env["GITHUB_SHA"]) {
|
|
@@ -253776,15 +253899,34 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
|
|
|
253776
253899
|
);
|
|
253777
253900
|
const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
|
|
253778
253901
|
const clientName = gcConfig.getClientName();
|
|
253779
|
-
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
253780
253902
|
const surface = determineSurface2();
|
|
253781
|
-
|
|
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
|
+
}
|
|
253782
253924
|
const customHeadersMap = parseCustomHeaders(customHeadersEnv);
|
|
253783
253925
|
const apiKeyAuthMechanism = process.env["GEMINI_API_KEY_AUTH_MECHANISM"] || "x-goog-api-key";
|
|
253784
253926
|
const apiVersionEnv = process.env["GOOGLE_GENAI_API_VERSION"];
|
|
253785
253927
|
const baseHeaders = {
|
|
253786
|
-
|
|
253787
|
-
|
|
253928
|
+
"User-Agent": userAgent,
|
|
253929
|
+
...customHeadersMap
|
|
253788
253930
|
};
|
|
253789
253931
|
if (apiKeyAuthMechanism === "bearer" && (config2.authType === "gemini-api-key" /* USE_GEMINI */ || config2.authType === "vertex-ai" /* USE_VERTEX_AI */) && config2.apiKey) {
|
|
253790
253932
|
baseHeaders["Authorization"] = `Bearer ${config2.apiKey}`;
|
|
@@ -272502,7 +272644,7 @@ import {
|
|
|
272502
272644
|
lookup as dnsLookup
|
|
272503
272645
|
} from "node:dns";
|
|
272504
272646
|
import { promisify as promisify11 } from "node:util";
|
|
272505
|
-
import
|
|
272647
|
+
import os16 from "node:os";
|
|
272506
272648
|
var { Resolver: AsyncResolver } = dnsPromises;
|
|
272507
272649
|
var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
272508
272650
|
var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -272525,7 +272667,7 @@ var map4to6 = (entries2) => {
|
|
|
272525
272667
|
var getIfaceInfo = () => {
|
|
272526
272668
|
let has4 = false;
|
|
272527
272669
|
let has6 = false;
|
|
272528
|
-
for (const device of Object.values(
|
|
272670
|
+
for (const device of Object.values(os16.networkInterfaces())) {
|
|
272529
272671
|
for (const iface of device) {
|
|
272530
272672
|
if (iface.internal) {
|
|
272531
272673
|
continue;
|
|
@@ -275703,7 +275845,7 @@ var got = create_default(defaults2);
|
|
|
275703
275845
|
var source_default2 = got;
|
|
275704
275846
|
|
|
275705
275847
|
// node_modules/@joshua.litt/get-ripgrep/dist/downloadRipGrep.js
|
|
275706
|
-
import * as
|
|
275848
|
+
import * as os18 from "node:os";
|
|
275707
275849
|
import { dirname as dirname6, join as join10 } from "node:path";
|
|
275708
275850
|
|
|
275709
275851
|
// node_modules/@joshua.litt/get-ripgrep/node_modules/path-exists/index.js
|
|
@@ -275722,9 +275864,9 @@ import { pipeline } from "node:stream/promises";
|
|
|
275722
275864
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
275723
275865
|
|
|
275724
275866
|
// node_modules/xdg-basedir/index.js
|
|
275725
|
-
import
|
|
275867
|
+
import os17 from "os";
|
|
275726
275868
|
import path38 from "path";
|
|
275727
|
-
var homeDirectory =
|
|
275869
|
+
var homeDirectory = os17.homedir();
|
|
275728
275870
|
var { env } = process;
|
|
275729
275871
|
var xdgData = env.XDG_DATA_HOME || (homeDirectory ? path38.join(homeDirectory, ".local", "share") : void 0);
|
|
275730
275872
|
var xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? path38.join(homeDirectory, ".config") : void 0);
|
|
@@ -275748,8 +275890,8 @@ var REPOSITORY = `microsoft/ripgrep-prebuilt`;
|
|
|
275748
275890
|
var VERSION2 = process.env.RIPGREP_VERSION || "v13.0.0-10";
|
|
275749
275891
|
var BIN_PATH = join10(__dirname5, "../bin");
|
|
275750
275892
|
var getTarget = () => {
|
|
275751
|
-
const arch4 = process.env.npm_config_arch ||
|
|
275752
|
-
const platform10 = process.env.platform ||
|
|
275893
|
+
const arch4 = process.env.npm_config_arch || os18.arch();
|
|
275894
|
+
const platform10 = process.env.platform || os18.platform();
|
|
275753
275895
|
switch (platform10) {
|
|
275754
275896
|
case "darwin":
|
|
275755
275897
|
switch (arch4) {
|
|
@@ -275790,7 +275932,7 @@ var getTarget = () => {
|
|
|
275790
275932
|
var downloadFile = async (url3, outFile) => {
|
|
275791
275933
|
let tmpDir = void 0;
|
|
275792
275934
|
try {
|
|
275793
|
-
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(
|
|
275935
|
+
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(os18.tmpdir(), "download-ripgrep"));
|
|
275794
275936
|
const tmpFile = path39.join(tmpDir, "tmp-file");
|
|
275795
275937
|
await pipeline(source_default2.stream(url3), createWriteStream3(tmpFile));
|
|
275796
275938
|
await mkdir2(dirname6(outFile), { recursive: true });
|
|
@@ -276840,7 +276982,7 @@ var ActivateSkillTool = class _ActivateSkillTool extends BaseDeclarativeTool {
|
|
|
276840
276982
|
// packages/core/src/tools/shell.ts
|
|
276841
276983
|
import fsPromises10 from "node:fs/promises";
|
|
276842
276984
|
import path45 from "node:path";
|
|
276843
|
-
import
|
|
276985
|
+
import os22 from "node:os";
|
|
276844
276986
|
import crypto14 from "node:crypto";
|
|
276845
276987
|
|
|
276846
276988
|
// packages/core/src/utils/summarizer.ts
|
|
@@ -276922,14 +277064,14 @@ var getPty = async () => {
|
|
|
276922
277064
|
// packages/core/src/services/shellExecutionService.ts
|
|
276923
277065
|
import { spawn as cpSpawn } from "node:child_process";
|
|
276924
277066
|
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
276925
|
-
import
|
|
277067
|
+
import os21 from "node:os";
|
|
276926
277068
|
import fs32, { mkdirSync as mkdirSync2 } from "node:fs";
|
|
276927
277069
|
import path44 from "node:path";
|
|
276928
277070
|
|
|
276929
277071
|
// packages/core/src/utils/systemEncoding.ts
|
|
276930
277072
|
var import_chardet = __toESM(require_lib9(), 1);
|
|
276931
277073
|
import { execSync as execSync2 } from "node:child_process";
|
|
276932
|
-
import
|
|
277074
|
+
import os19 from "node:os";
|
|
276933
277075
|
var cachedSystemEncoding = void 0;
|
|
276934
277076
|
function resetEncodingCache() {
|
|
276935
277077
|
cachedSystemEncoding = void 0;
|
|
@@ -276944,7 +277086,7 @@ function getCachedEncodingForBuffer(buffer) {
|
|
|
276944
277086
|
return detectEncodingFromBuffer(buffer) || "utf-8";
|
|
276945
277087
|
}
|
|
276946
277088
|
function getSystemEncoding() {
|
|
276947
|
-
if (
|
|
277089
|
+
if (os19.platform() === "win32") {
|
|
276948
277090
|
try {
|
|
276949
277091
|
const output = execSync2("chcp", { encoding: "utf8" });
|
|
276950
277092
|
const match3 = output.match(/:\s*(\d+)/);
|
|
@@ -277443,11 +277585,11 @@ function convertColorToHex(color, colorMode, defaultColor) {
|
|
|
277443
277585
|
}
|
|
277444
277586
|
|
|
277445
277587
|
// packages/core/src/utils/process-utils.ts
|
|
277446
|
-
import
|
|
277588
|
+
import os20 from "node:os";
|
|
277447
277589
|
var SIGKILL_TIMEOUT_MS = 200;
|
|
277448
277590
|
async function killProcessGroup(options) {
|
|
277449
277591
|
const { pid, escalate = false, isExited = () => false, pty } = options;
|
|
277450
|
-
const isWindows2 =
|
|
277592
|
+
const isWindows2 = os20.platform() === "win32";
|
|
277451
277593
|
if (isWindows2) {
|
|
277452
277594
|
if (pty) {
|
|
277453
277595
|
try {
|
|
@@ -278060,7 +278202,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
278060
278202
|
return { finalBuffer };
|
|
278061
278203
|
};
|
|
278062
278204
|
var cleanup = cleanup2;
|
|
278063
|
-
const isWindows2 =
|
|
278205
|
+
const isWindows2 = os21.platform() === "win32";
|
|
278064
278206
|
const { executable, argsPrefix, shell } = getShellConfiguration();
|
|
278065
278207
|
const guardedCommand = ensurePromptvarsDisabled(commandToExecute, shell);
|
|
278066
278208
|
const spawnArgs = [...argsPrefix, guardedCommand];
|
|
@@ -278248,7 +278390,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
278248
278390
|
}
|
|
278249
278391
|
const finalStrippedOutput = stripAnsi(combinedOutput).trim();
|
|
278250
278392
|
const exitCode = code;
|
|
278251
|
-
const exitSignal = signal ?
|
|
278393
|
+
const exitSignal = signal ? os21.constants.signals[signal] : null;
|
|
278252
278394
|
const resultPayload = {
|
|
278253
278395
|
rawOutput: finalBuffer,
|
|
278254
278396
|
output: finalStrippedOutput,
|
|
@@ -278870,9 +279012,9 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278870
279012
|
returnDisplay: "Command cancelled by user."
|
|
278871
279013
|
};
|
|
278872
279014
|
}
|
|
278873
|
-
const isWindows2 =
|
|
279015
|
+
const isWindows2 = os22.platform() === "win32";
|
|
278874
279016
|
const tempFileName = `shell_pgrep_${crypto14.randomBytes(6).toString("hex")}.tmp`;
|
|
278875
|
-
const tempFilePath = path45.join(
|
|
279017
|
+
const tempFilePath = path45.join(os22.tmpdir(), tempFileName);
|
|
278876
279018
|
const timeoutMs = this.context.config.getShellToolInactivityTimeout();
|
|
278877
279019
|
const timeoutController = new AbortController();
|
|
278878
279020
|
let timeoutTimer;
|
|
@@ -278974,7 +279116,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278974
279116
|
}
|
|
278975
279117
|
const result2 = await resultPromise;
|
|
278976
279118
|
const backgroundPIDs = [];
|
|
278977
|
-
if (
|
|
279119
|
+
if (os22.platform() !== "win32") {
|
|
278978
279120
|
let tempFileExists = false;
|
|
278979
279121
|
try {
|
|
278980
279122
|
await fsPromises10.access(tempFilePath);
|
|
@@ -278984,7 +279126,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
278984
279126
|
}
|
|
278985
279127
|
if (tempFileExists) {
|
|
278986
279128
|
const pgrepContent = await fsPromises10.readFile(tempFilePath, "utf8");
|
|
278987
|
-
const pgrepLines = pgrepContent.split(
|
|
279129
|
+
const pgrepLines = pgrepContent.split(os22.EOL).filter(Boolean);
|
|
278988
279130
|
for (const line of pgrepLines) {
|
|
278989
279131
|
if (!/^\d+$/.test(line)) {
|
|
278990
279132
|
debugLogger.error(`pgrep: ${line}`);
|
|
@@ -312188,7 +312330,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
312188
312330
|
return provider;
|
|
312189
312331
|
}
|
|
312190
312332
|
case "oauth2": {
|
|
312191
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
312333
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-756G3OVY.js");
|
|
312192
312334
|
const provider = new OAuth2AuthProvider(
|
|
312193
312335
|
authConfig,
|
|
312194
312336
|
options.agentName ?? "unknown",
|
|
@@ -318165,14 +318307,14 @@ var import_toml2 = __toESM(require_toml(), 1);
|
|
|
318165
318307
|
// packages/core/src/utils/security.ts
|
|
318166
318308
|
import * as fs46 from "node:fs/promises";
|
|
318167
318309
|
import { constants as constants4 } from "node:fs";
|
|
318168
|
-
import * as
|
|
318310
|
+
import * as os23 from "node:os";
|
|
318169
318311
|
async function isDirectorySecure(dirPath) {
|
|
318170
318312
|
try {
|
|
318171
318313
|
const stats = await fs46.stat(dirPath);
|
|
318172
318314
|
if (!stats.isDirectory()) {
|
|
318173
318315
|
return { secure: false, reason: "Not a directory" };
|
|
318174
318316
|
}
|
|
318175
|
-
if (
|
|
318317
|
+
if (os23.platform() === "win32") {
|
|
318176
318318
|
try {
|
|
318177
318319
|
const escapedPath = dirPath.replace(/'/g, "''");
|
|
318178
318320
|
const script = `
|
|
@@ -329196,13 +329338,13 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
|
|
|
329196
329338
|
};
|
|
329197
329339
|
|
|
329198
329340
|
// packages/core/src/utils/compatibility.ts
|
|
329199
|
-
import
|
|
329341
|
+
import os24 from "node:os";
|
|
329200
329342
|
function isWindows10() {
|
|
329201
|
-
if (
|
|
329343
|
+
if (os24.platform() !== "win32") {
|
|
329202
329344
|
return false;
|
|
329203
329345
|
}
|
|
329204
|
-
const
|
|
329205
|
-
const parts2 =
|
|
329346
|
+
const release3 = os24.release();
|
|
329347
|
+
const parts2 = release3.split(".");
|
|
329206
329348
|
if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
|
|
329207
329349
|
const build = parseInt(parts2[2], 10);
|
|
329208
329350
|
return build < 22e3;
|
|
@@ -329254,7 +329396,7 @@ function getCompatibilityWarnings(options) {
|
|
|
329254
329396
|
darwin: "iTerm2 or Ghostty",
|
|
329255
329397
|
linux: "Ghostty"
|
|
329256
329398
|
};
|
|
329257
|
-
const suggestion = platformTerminals[
|
|
329399
|
+
const suggestion = platformTerminals[os24.platform()];
|
|
329258
329400
|
const suggestedTerminals = suggestion ? ` (e.g., ${suggestion})` : "";
|
|
329259
329401
|
warnings.push({
|
|
329260
329402
|
id: "jetbrains-terminal",
|
|
@@ -329556,6 +329698,8 @@ export {
|
|
|
329556
329698
|
ModelSlashCommandEvent,
|
|
329557
329699
|
ExtensionDisableEvent,
|
|
329558
329700
|
WebFetchFallbackAttemptEvent,
|
|
329701
|
+
OnboardingStartEvent,
|
|
329702
|
+
OnboardingSuccessEvent,
|
|
329559
329703
|
KeychainSchema,
|
|
329560
329704
|
KEYCHAIN_TEST_PREFIX,
|
|
329561
329705
|
SECRET_PREFIX,
|
|
@@ -329789,6 +329933,8 @@ export {
|
|
|
329789
329933
|
logExtensionEnable,
|
|
329790
329934
|
logExtensionDisable,
|
|
329791
329935
|
logWebFetchFallbackAttempt,
|
|
329936
|
+
logOnboardingStart,
|
|
329937
|
+
logOnboardingSuccess,
|
|
329792
329938
|
logBillingEvent,
|
|
329793
329939
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
329794
329940
|
IDE_MAX_OPEN_FILES,
|