@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
|
@@ -9603,7 +9603,7 @@ var require_googleauth = __commonJS({
|
|
|
9603
9603
|
var child_process_1 = __require("child_process");
|
|
9604
9604
|
var fs60 = __require("fs");
|
|
9605
9605
|
var gcpMetadata = require_src4();
|
|
9606
|
-
var
|
|
9606
|
+
var os25 = __require("os");
|
|
9607
9607
|
var path78 = __require("path");
|
|
9608
9608
|
var crypto_1 = require_crypto3();
|
|
9609
9609
|
var transporters_1 = require_transporters();
|
|
@@ -10044,7 +10044,7 @@ var require_googleauth = __commonJS({
|
|
|
10044
10044
|
* @api private
|
|
10045
10045
|
*/
|
|
10046
10046
|
_isWindows() {
|
|
10047
|
-
const sys =
|
|
10047
|
+
const sys = os25.platform();
|
|
10048
10048
|
if (sys && sys.length >= 3) {
|
|
10049
10049
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
10050
10050
|
return true;
|
|
@@ -15981,7 +15981,7 @@ var require_service_config = __commonJS({
|
|
|
15981
15981
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
15982
15982
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
15983
15983
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
15984
|
-
var
|
|
15984
|
+
var os25 = __require("os");
|
|
15985
15985
|
var constants_1 = require_constants2();
|
|
15986
15986
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
15987
15987
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -16280,7 +16280,7 @@ var require_service_config = __commonJS({
|
|
|
16280
16280
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
16281
16281
|
let hostnameMatched = false;
|
|
16282
16282
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
16283
|
-
if (hostname3 ===
|
|
16283
|
+
if (hostname3 === os25.hostname()) {
|
|
16284
16284
|
hostnameMatched = true;
|
|
16285
16285
|
}
|
|
16286
16286
|
}
|
|
@@ -29801,7 +29801,7 @@ var require_subchannel_call = __commonJS({
|
|
|
29801
29801
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
29802
29802
|
exports2.Http2SubchannelCall = void 0;
|
|
29803
29803
|
var http22 = __require("http2");
|
|
29804
|
-
var
|
|
29804
|
+
var os25 = __require("os");
|
|
29805
29805
|
var constants_1 = require_constants2();
|
|
29806
29806
|
var metadata_1 = require_metadata();
|
|
29807
29807
|
var stream_decoder_1 = require_stream_decoder();
|
|
@@ -29809,7 +29809,7 @@ var require_subchannel_call = __commonJS({
|
|
|
29809
29809
|
var constants_2 = require_constants2();
|
|
29810
29810
|
var TRACER_NAME2 = "subchannel_call";
|
|
29811
29811
|
function getSystemErrorName(errno) {
|
|
29812
|
-
for (const [name3, num] of Object.entries(
|
|
29812
|
+
for (const [name3, num] of Object.entries(os25.constants.errno)) {
|
|
29813
29813
|
if (num === errno) {
|
|
29814
29814
|
return name3;
|
|
29815
29815
|
}
|
|
@@ -50056,7 +50056,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
50056
50056
|
exports2.processDetector = void 0;
|
|
50057
50057
|
var api_1 = (init_esm(), __toCommonJS(esm_exports));
|
|
50058
50058
|
var semconv_1 = require_semconv2();
|
|
50059
|
-
var
|
|
50059
|
+
var os25 = __require("os");
|
|
50060
50060
|
var ProcessDetector = class {
|
|
50061
50061
|
detect(_config) {
|
|
50062
50062
|
const attributes = {
|
|
@@ -50076,7 +50076,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
50076
50076
|
attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
50077
50077
|
}
|
|
50078
50078
|
try {
|
|
50079
|
-
const userInfo2 =
|
|
50079
|
+
const userInfo2 = os25.userInfo();
|
|
50080
50080
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
|
|
50081
50081
|
} catch (e2) {
|
|
50082
50082
|
api_1.diag.debug(`error obtaining process owner: ${e2}`);
|
|
@@ -69586,7 +69586,7 @@ var require_package4 = __commonJS({
|
|
|
69586
69586
|
var require_util7 = __commonJS({
|
|
69587
69587
|
"node_modules/systeminformation/lib/util.js"(exports2) {
|
|
69588
69588
|
"use strict";
|
|
69589
|
-
var
|
|
69589
|
+
var os25 = __require("os");
|
|
69590
69590
|
var fs60 = __require("fs");
|
|
69591
69591
|
var path78 = __require("path");
|
|
69592
69592
|
var spawn10 = __require("child_process").spawn;
|
|
@@ -69693,7 +69693,7 @@ var require_util7 = __commonJS({
|
|
|
69693
69693
|
}
|
|
69694
69694
|
function cores() {
|
|
69695
69695
|
if (_cores === 0) {
|
|
69696
|
-
_cores =
|
|
69696
|
+
_cores = os25.cpus().length;
|
|
69697
69697
|
}
|
|
69698
69698
|
return _cores;
|
|
69699
69699
|
}
|
|
@@ -69954,7 +69954,7 @@ var require_util7 = __commonJS({
|
|
|
69954
69954
|
function powerShellRelease() {
|
|
69955
69955
|
try {
|
|
69956
69956
|
if (_psChild) {
|
|
69957
|
-
_psChild.stdin.write("exit" +
|
|
69957
|
+
_psChild.stdin.write("exit" + os25.EOL);
|
|
69958
69958
|
_psChild.stdin.end();
|
|
69959
69959
|
}
|
|
69960
69960
|
} catch {
|
|
@@ -69981,7 +69981,7 @@ var require_util7 = __commonJS({
|
|
|
69981
69981
|
});
|
|
69982
69982
|
try {
|
|
69983
69983
|
if (_psChild && _psChild.pid) {
|
|
69984
|
-
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " +
|
|
69984
|
+
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os25.EOL + cmd + os25.EOL + "echo " + _psCmdSeperator + os25.EOL);
|
|
69985
69985
|
}
|
|
69986
69986
|
} catch {
|
|
69987
69987
|
resolve16("");
|
|
@@ -69993,7 +69993,7 @@ var require_util7 = __commonJS({
|
|
|
69993
69993
|
return new Promise((resolve16) => {
|
|
69994
69994
|
process.nextTick(() => {
|
|
69995
69995
|
try {
|
|
69996
|
-
const osVersion =
|
|
69996
|
+
const osVersion = os25.release().split(".").map(Number);
|
|
69997
69997
|
const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
|
|
69998
69998
|
const child = spawn10(_powerShell, spanOptions, {
|
|
69999
69999
|
stdio: "pipe",
|
|
@@ -70025,8 +70025,8 @@ var require_util7 = __commonJS({
|
|
|
70025
70025
|
});
|
|
70026
70026
|
if (osVersion[0] < 10) {
|
|
70027
70027
|
try {
|
|
70028
|
-
child.stdin.write(_psToUTF8 + cmd +
|
|
70029
|
-
child.stdin.write("exit" +
|
|
70028
|
+
child.stdin.write(_psToUTF8 + cmd + os25.EOL);
|
|
70029
|
+
child.stdin.write("exit" + os25.EOL);
|
|
70030
70030
|
child.stdin.end();
|
|
70031
70031
|
} catch {
|
|
70032
70032
|
child.kill();
|
|
@@ -72174,7 +72174,7 @@ var require_util7 = __commonJS({
|
|
|
72174
72174
|
var require_osinfo = __commonJS({
|
|
72175
72175
|
"node_modules/systeminformation/lib/osinfo.js"(exports2) {
|
|
72176
72176
|
"use strict";
|
|
72177
|
-
var
|
|
72177
|
+
var os25 = __require("os");
|
|
72178
72178
|
var fs60 = __require("fs");
|
|
72179
72179
|
var util2 = require_util7();
|
|
72180
72180
|
var exec3 = __require("child_process").exec;
|
|
@@ -72197,14 +72197,14 @@ var require_osinfo = __commonJS({
|
|
|
72197
72197
|
}
|
|
72198
72198
|
const result2 = {
|
|
72199
72199
|
current: Date.now(),
|
|
72200
|
-
uptime:
|
|
72200
|
+
uptime: os25.uptime(),
|
|
72201
72201
|
timezone: t2.length >= 7 ? t2[5] : "",
|
|
72202
72202
|
timezoneName
|
|
72203
72203
|
};
|
|
72204
72204
|
if (_darwin || _linux) {
|
|
72205
72205
|
try {
|
|
72206
72206
|
const stdout = execSync5("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null", util2.execOptsLinux);
|
|
72207
|
-
const lines = stdout.toString().split(
|
|
72207
|
+
const lines = stdout.toString().split(os25.EOL);
|
|
72208
72208
|
if (lines.length > 3 && !lines[0]) {
|
|
72209
72209
|
lines.shift();
|
|
72210
72210
|
}
|
|
@@ -72214,7 +72214,7 @@ var require_osinfo = __commonJS({
|
|
|
72214
72214
|
}
|
|
72215
72215
|
return {
|
|
72216
72216
|
current: Date.now(),
|
|
72217
|
-
uptime:
|
|
72217
|
+
uptime: os25.uptime(),
|
|
72218
72218
|
timezone: lines[1] ? timezone + lines[1] : timezone,
|
|
72219
72219
|
timezoneName: lines[2] && lines[2].indexOf("/zoneinfo/") > 0 ? lines[2].split("/zoneinfo/")[1] || "" : ""
|
|
72220
72220
|
};
|
|
@@ -72333,11 +72333,11 @@ var require_osinfo = __commonJS({
|
|
|
72333
72333
|
return "";
|
|
72334
72334
|
}
|
|
72335
72335
|
function getFQDN() {
|
|
72336
|
-
let fqdn =
|
|
72336
|
+
let fqdn = os25.hostname;
|
|
72337
72337
|
if (_linux || _darwin) {
|
|
72338
72338
|
try {
|
|
72339
72339
|
const stdout = execSync5("hostname -f 2>/dev/null", util2.execOptsLinux);
|
|
72340
|
-
fqdn = stdout.toString().split(
|
|
72340
|
+
fqdn = stdout.toString().split(os25.EOL)[0];
|
|
72341
72341
|
} catch {
|
|
72342
72342
|
util2.noop();
|
|
72343
72343
|
}
|
|
@@ -72345,7 +72345,7 @@ var require_osinfo = __commonJS({
|
|
|
72345
72345
|
if (_freebsd || _openbsd || _netbsd) {
|
|
72346
72346
|
try {
|
|
72347
72347
|
const stdout = execSync5("hostname 2>/dev/null");
|
|
72348
|
-
fqdn = stdout.toString().split(
|
|
72348
|
+
fqdn = stdout.toString().split(os25.EOL)[0];
|
|
72349
72349
|
} catch {
|
|
72350
72350
|
util2.noop();
|
|
72351
72351
|
}
|
|
@@ -72353,7 +72353,7 @@ var require_osinfo = __commonJS({
|
|
|
72353
72353
|
if (_windows) {
|
|
72354
72354
|
try {
|
|
72355
72355
|
const stdout = execSync5("echo %COMPUTERNAME%.%USERDNSDOMAIN%", util2.execOptsWin);
|
|
72356
|
-
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(
|
|
72356
|
+
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os25.EOL)[0];
|
|
72357
72357
|
} catch {
|
|
72358
72358
|
util2.noop();
|
|
72359
72359
|
}
|
|
@@ -72368,9 +72368,9 @@ var require_osinfo = __commonJS({
|
|
|
72368
72368
|
distro: "unknown",
|
|
72369
72369
|
release: "unknown",
|
|
72370
72370
|
codename: "",
|
|
72371
|
-
kernel:
|
|
72372
|
-
arch:
|
|
72373
|
-
hostname:
|
|
72371
|
+
kernel: os25.release(),
|
|
72372
|
+
arch: os25.arch(),
|
|
72373
|
+
hostname: os25.hostname(),
|
|
72374
72374
|
fqdn: getFQDN(),
|
|
72375
72375
|
codepage: "",
|
|
72376
72376
|
logofile: "",
|
|
@@ -72381,18 +72381,18 @@ var require_osinfo = __commonJS({
|
|
|
72381
72381
|
};
|
|
72382
72382
|
if (_linux) {
|
|
72383
72383
|
exec3("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release", (error40, stdout) => {
|
|
72384
|
-
let
|
|
72384
|
+
let release3 = {};
|
|
72385
72385
|
let lines = stdout.toString().split("\n");
|
|
72386
72386
|
lines.forEach((line) => {
|
|
72387
72387
|
if (line.indexOf("=") !== -1) {
|
|
72388
|
-
|
|
72388
|
+
release3[line.split("=")[0].trim().toUpperCase()] = line.split("=")[1].trim();
|
|
72389
72389
|
}
|
|
72390
72390
|
});
|
|
72391
|
-
result2.distro = (
|
|
72391
|
+
result2.distro = (release3.DISTRIB_ID || release3.NAME || "unknown").replace(/"/g, "");
|
|
72392
72392
|
result2.logofile = getLogoFile(result2.distro);
|
|
72393
|
-
let releaseVersion = (
|
|
72394
|
-
let codename = (
|
|
72395
|
-
const prettyName = (
|
|
72393
|
+
let releaseVersion = (release3.VERSION || "").replace(/"/g, "");
|
|
72394
|
+
let codename = (release3.DISTRIB_CODENAME || release3.VERSION_CODENAME || "").replace(/"/g, "");
|
|
72395
|
+
const prettyName = (release3.PRETTY_NAME || "").replace(/"/g, "");
|
|
72396
72396
|
if (prettyName.indexOf(result2.distro + " ") === 0) {
|
|
72397
72397
|
releaseVersion = prettyName.replace(result2.distro + " ", "").trim();
|
|
72398
72398
|
}
|
|
@@ -72400,10 +72400,10 @@ var require_osinfo = __commonJS({
|
|
|
72400
72400
|
codename = releaseVersion.split("(")[1].replace(/[()]/g, "").trim();
|
|
72401
72401
|
releaseVersion = releaseVersion.split("(")[0].trim();
|
|
72402
72402
|
}
|
|
72403
|
-
result2.release = (releaseVersion ||
|
|
72403
|
+
result2.release = (releaseVersion || release3.DISTRIB_RELEASE || release3.VERSION_ID || "unknown").replace(/"/g, "");
|
|
72404
72404
|
result2.codename = codename;
|
|
72405
72405
|
result2.codepage = util2.getCodepage();
|
|
72406
|
-
result2.build = (
|
|
72406
|
+
result2.build = (release3.BUILD_ID || "").replace(/"/g, "").trim();
|
|
72407
72407
|
isUefiLinux().then((uefi) => {
|
|
72408
72408
|
result2.uefi = uefi;
|
|
72409
72409
|
uuid3().then((data) => {
|
|
@@ -72421,14 +72421,14 @@ var require_osinfo = __commonJS({
|
|
|
72421
72421
|
let lines = stdout.toString().split("\n");
|
|
72422
72422
|
const distro = util2.getValue(lines, "kern.ostype");
|
|
72423
72423
|
const logofile = getLogoFile(distro);
|
|
72424
|
-
const
|
|
72424
|
+
const release3 = util2.getValue(lines, "kern.osrelease").split("-")[0];
|
|
72425
72425
|
const serial = util2.getValue(lines, "kern.uuid");
|
|
72426
72426
|
const bootmethod = util2.getValue(lines, "machdep.bootmethod");
|
|
72427
72427
|
const uefiConf = stdout.toString().indexOf("<type>efi</type>") >= 0;
|
|
72428
72428
|
const uefi = bootmethod ? bootmethod.toLowerCase().indexOf("uefi") >= 0 : uefiConf ? uefiConf : null;
|
|
72429
72429
|
result2.distro = distro || result2.distro;
|
|
72430
72430
|
result2.logofile = logofile || result2.logofile;
|
|
72431
|
-
result2.release =
|
|
72431
|
+
result2.release = release3 || result2.release;
|
|
72432
72432
|
result2.serial = serial || result2.serial;
|
|
72433
72433
|
result2.codename = "";
|
|
72434
72434
|
result2.codepage = util2.getCodepage();
|
|
@@ -72579,7 +72579,7 @@ var require_osinfo = __commonJS({
|
|
|
72579
72579
|
}
|
|
72580
72580
|
function versions(apps2, callback) {
|
|
72581
72581
|
let versionObject = {
|
|
72582
|
-
kernel:
|
|
72582
|
+
kernel: os25.release(),
|
|
72583
72583
|
apache: "",
|
|
72584
72584
|
bash: "",
|
|
72585
72585
|
bun: "",
|
|
@@ -73289,7 +73289,7 @@ var require_osinfo = __commonJS({
|
|
|
73289
73289
|
function getUniqueMacAdresses() {
|
|
73290
73290
|
let macs = [];
|
|
73291
73291
|
try {
|
|
73292
|
-
const ifaces =
|
|
73292
|
+
const ifaces = os25.networkInterfaces();
|
|
73293
73293
|
for (let dev in ifaces) {
|
|
73294
73294
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
73295
73295
|
ifaces[dev].forEach((details) => {
|
|
@@ -73411,7 +73411,7 @@ var require_system = __commonJS({
|
|
|
73411
73411
|
"node_modules/systeminformation/lib/system.js"(exports2) {
|
|
73412
73412
|
"use strict";
|
|
73413
73413
|
var fs60 = __require("fs");
|
|
73414
|
-
var
|
|
73414
|
+
var os25 = __require("os");
|
|
73415
73415
|
var util2 = require_util7();
|
|
73416
73416
|
var { uuid: uuid3 } = require_osinfo();
|
|
73417
73417
|
var exec3 = __require("child_process").exec;
|
|
@@ -73535,8 +73535,8 @@ var require_system = __commonJS({
|
|
|
73535
73535
|
util2.noop();
|
|
73536
73536
|
}
|
|
73537
73537
|
}
|
|
73538
|
-
if (!result2.virtual && (
|
|
73539
|
-
const kernelVersion = parseFloat(
|
|
73538
|
+
if (!result2.virtual && (os25.release().toLowerCase().indexOf("microsoft") >= 0 || os25.release().toLowerCase().endsWith("wsl2"))) {
|
|
73539
|
+
const kernelVersion = parseFloat(os25.release().toLowerCase());
|
|
73540
73540
|
result2.virtual = true;
|
|
73541
73541
|
result2.manufacturer = "Microsoft";
|
|
73542
73542
|
result2.model = "WSL";
|
|
@@ -73946,7 +73946,7 @@ var require_system = __commonJS({
|
|
|
73946
73946
|
result2.model = "Raspberry Pi";
|
|
73947
73947
|
result2.serial = rpi.serial;
|
|
73948
73948
|
result2.version = rpi.type + " - " + rpi.revision;
|
|
73949
|
-
result2.memMax =
|
|
73949
|
+
result2.memMax = os25.totalmem();
|
|
73950
73950
|
result2.memSlots = 0;
|
|
73951
73951
|
}
|
|
73952
73952
|
if (callback) {
|
|
@@ -73972,9 +73972,9 @@ var require_system = __commonJS({
|
|
|
73972
73972
|
}
|
|
73973
73973
|
devices.shift();
|
|
73974
73974
|
result2.memSlots = devices.length;
|
|
73975
|
-
if (
|
|
73975
|
+
if (os25.arch() === "arm64") {
|
|
73976
73976
|
result2.memSlots = 0;
|
|
73977
|
-
result2.memMax =
|
|
73977
|
+
result2.memMax = os25.totalmem();
|
|
73978
73978
|
}
|
|
73979
73979
|
if (callback) {
|
|
73980
73980
|
callback(result2);
|
|
@@ -73991,7 +73991,7 @@ var require_system = __commonJS({
|
|
|
73991
73991
|
if (_windows) {
|
|
73992
73992
|
try {
|
|
73993
73993
|
const workload = [];
|
|
73994
|
-
const win10plus = parseInt(
|
|
73994
|
+
const win10plus = parseInt(os25.release()) >= 10;
|
|
73995
73995
|
const maxCapacityAttribute = win10plus ? "MaxCapacityEx" : "MaxCapacity";
|
|
73996
73996
|
workload.push(util2.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl"));
|
|
73997
73997
|
workload.push(util2.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
|
|
@@ -74187,7 +74187,7 @@ var require_system = __commonJS({
|
|
|
74187
74187
|
var require_cpu = __commonJS({
|
|
74188
74188
|
"node_modules/systeminformation/lib/cpu.js"(exports2) {
|
|
74189
74189
|
"use strict";
|
|
74190
|
-
var
|
|
74190
|
+
var os25 = __require("os");
|
|
74191
74191
|
var exec3 = __require("child_process").exec;
|
|
74192
74192
|
var execSync5 = __require("child_process").execSync;
|
|
74193
74193
|
var fs60 = __require("fs");
|
|
@@ -75050,7 +75050,7 @@ var require_cpu = __commonJS({
|
|
|
75050
75050
|
const countProcessors = util2.getValue(lines, "hw.packages");
|
|
75051
75051
|
const countCores = util2.getValue(lines, "hw.physicalcpu_max");
|
|
75052
75052
|
const countThreads = util2.getValue(lines, "hw.ncpu");
|
|
75053
|
-
if (
|
|
75053
|
+
if (os25.arch() === "arm64") {
|
|
75054
75054
|
result2.socket = "SOC";
|
|
75055
75055
|
try {
|
|
75056
75056
|
const clusters = execSync5("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n");
|
|
@@ -75078,8 +75078,8 @@ var require_cpu = __commonJS({
|
|
|
75078
75078
|
if (_linux) {
|
|
75079
75079
|
let modelline = "";
|
|
75080
75080
|
let lines = [];
|
|
75081
|
-
if (
|
|
75082
|
-
modelline =
|
|
75081
|
+
if (os25.cpus()[0] && os25.cpus()[0].model) {
|
|
75082
|
+
modelline = os25.cpus()[0].model;
|
|
75083
75083
|
}
|
|
75084
75084
|
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) => {
|
|
75085
75085
|
if (!error40) {
|
|
@@ -75168,8 +75168,8 @@ var require_cpu = __commonJS({
|
|
|
75168
75168
|
if (_freebsd || _openbsd || _netbsd) {
|
|
75169
75169
|
let modelline = "";
|
|
75170
75170
|
let lines = [];
|
|
75171
|
-
if (
|
|
75172
|
-
modelline =
|
|
75171
|
+
if (os25.cpus()[0] && os25.cpus()[0].model) {
|
|
75172
|
+
modelline = os25.cpus()[0].model;
|
|
75173
75173
|
}
|
|
75174
75174
|
exec3("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error40, stdout) => {
|
|
75175
75175
|
let cache3 = [];
|
|
@@ -75329,7 +75329,7 @@ var require_cpu = __commonJS({
|
|
|
75329
75329
|
}
|
|
75330
75330
|
exports2.cpu = cpu;
|
|
75331
75331
|
function getCpuCurrentSpeedSync() {
|
|
75332
|
-
const cpus2 =
|
|
75332
|
+
const cpus2 = os25.cpus();
|
|
75333
75333
|
let minFreq = 999999999;
|
|
75334
75334
|
let maxFreq = 0;
|
|
75335
75335
|
let avgFreq = 0;
|
|
@@ -76024,7 +76024,7 @@ var require_cpu = __commonJS({
|
|
|
76024
76024
|
function getLoad() {
|
|
76025
76025
|
return new Promise((resolve16) => {
|
|
76026
76026
|
process.nextTick(() => {
|
|
76027
|
-
const loads =
|
|
76027
|
+
const loads = os25.loadavg().map((x) => {
|
|
76028
76028
|
return x / util2.cores();
|
|
76029
76029
|
});
|
|
76030
76030
|
const avgLoad = parseFloat(Math.max.apply(Math, loads).toFixed(2));
|
|
@@ -76032,7 +76032,7 @@ var require_cpu = __commonJS({
|
|
|
76032
76032
|
const now = Date.now() - _current_cpu.ms;
|
|
76033
76033
|
if (now >= 200) {
|
|
76034
76034
|
_current_cpu.ms = Date.now();
|
|
76035
|
-
const cpus2 =
|
|
76035
|
+
const cpus2 = os25.cpus().map((cpu2) => {
|
|
76036
76036
|
cpu2.times.steal = 0;
|
|
76037
76037
|
cpu2.times.guest = 0;
|
|
76038
76038
|
return cpu2;
|
|
@@ -76226,7 +76226,7 @@ var require_cpu = __commonJS({
|
|
|
76226
76226
|
function getFullLoad() {
|
|
76227
76227
|
return new Promise((resolve16) => {
|
|
76228
76228
|
process.nextTick(() => {
|
|
76229
|
-
const cpus2 =
|
|
76229
|
+
const cpus2 = os25.cpus();
|
|
76230
76230
|
let totalUser = 0;
|
|
76231
76231
|
let totalSystem = 0;
|
|
76232
76232
|
let totalNice = 0;
|
|
@@ -76269,7 +76269,7 @@ var require_cpu = __commonJS({
|
|
|
76269
76269
|
var require_memory = __commonJS({
|
|
76270
76270
|
"node_modules/systeminformation/lib/memory.js"(exports2) {
|
|
76271
76271
|
"use strict";
|
|
76272
|
-
var
|
|
76272
|
+
var os25 = __require("os");
|
|
76273
76273
|
var exec3 = __require("child_process").exec;
|
|
76274
76274
|
var execSync5 = __require("child_process").execSync;
|
|
76275
76275
|
var util2 = require_util7();
|
|
@@ -76315,12 +76315,12 @@ var require_memory = __commonJS({
|
|
|
76315
76315
|
return new Promise((resolve16) => {
|
|
76316
76316
|
process.nextTick(() => {
|
|
76317
76317
|
let result2 = {
|
|
76318
|
-
total:
|
|
76319
|
-
free:
|
|
76320
|
-
used:
|
|
76321
|
-
active:
|
|
76318
|
+
total: os25.totalmem(),
|
|
76319
|
+
free: os25.freemem(),
|
|
76320
|
+
used: os25.totalmem() - os25.freemem(),
|
|
76321
|
+
active: os25.totalmem() - os25.freemem(),
|
|
76322
76322
|
// temporarily (fallback)
|
|
76323
|
-
available:
|
|
76323
|
+
available: os25.freemem(),
|
|
76324
76324
|
// temporarily (fallback)
|
|
76325
76325
|
buffers: 0,
|
|
76326
76326
|
cached: 0,
|
|
@@ -76339,9 +76339,9 @@ var require_memory = __commonJS({
|
|
|
76339
76339
|
if (!error40) {
|
|
76340
76340
|
const lines = stdout.toString().split("\n");
|
|
76341
76341
|
result2.total = parseInt(util2.getValue(lines, "memtotal"), 10);
|
|
76342
|
-
result2.total = result2.total ? result2.total * 1024 :
|
|
76342
|
+
result2.total = result2.total ? result2.total * 1024 : os25.totalmem();
|
|
76343
76343
|
result2.free = parseInt(util2.getValue(lines, "memfree"), 10);
|
|
76344
|
-
result2.free = result2.free ? result2.free * 1024 :
|
|
76344
|
+
result2.free = result2.free ? result2.free * 1024 : os25.freemem();
|
|
76345
76345
|
result2.used = result2.total - result2.free;
|
|
76346
76346
|
result2.buffers = parseInt(util2.getValue(lines, "buffers"), 10);
|
|
76347
76347
|
result2.buffers = result2.buffers ? result2.buffers * 1024 : 0;
|
|
@@ -76563,7 +76563,7 @@ var require_memory = __commonJS({
|
|
|
76563
76563
|
}
|
|
76564
76564
|
if (!result2.length) {
|
|
76565
76565
|
result2.push({
|
|
76566
|
-
size:
|
|
76566
|
+
size: os25.totalmem(),
|
|
76567
76567
|
bank: "",
|
|
76568
76568
|
type: "",
|
|
76569
76569
|
ecc: null,
|
|
@@ -78138,7 +78138,7 @@ var require_filesystem = __commonJS({
|
|
|
78138
78138
|
"use strict";
|
|
78139
78139
|
var util2 = require_util7();
|
|
78140
78140
|
var fs60 = __require("fs");
|
|
78141
|
-
var
|
|
78141
|
+
var os25 = __require("os");
|
|
78142
78142
|
var exec3 = __require("child_process").exec;
|
|
78143
78143
|
var execSync5 = __require("child_process").execSync;
|
|
78144
78144
|
var execPromiseSave = util2.promisifySave(__require("child_process").exec);
|
|
@@ -79332,7 +79332,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
|
|
|
79332
79332
|
}
|
|
79333
79333
|
if (_darwin) {
|
|
79334
79334
|
let cmdFullSmart = "";
|
|
79335
|
-
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(
|
|
79335
|
+
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(os25.release(), 10) > 24 ? "SPUSBHostDataType" : "SPUSBDataType"} `, { maxBuffer: 1024 * 1024 }, (error40, stdout) => {
|
|
79336
79336
|
if (!error40) {
|
|
79337
79337
|
const lines = stdout.toString().split("\n");
|
|
79338
79338
|
const linesSATA = [];
|
|
@@ -79712,7 +79712,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
|
|
|
79712
79712
|
var require_network = __commonJS({
|
|
79713
79713
|
"node_modules/systeminformation/lib/network.js"(exports2) {
|
|
79714
79714
|
"use strict";
|
|
79715
|
-
var
|
|
79715
|
+
var os25 = __require("os");
|
|
79716
79716
|
var exec3 = __require("child_process").exec;
|
|
79717
79717
|
var execSync5 = __require("child_process").execSync;
|
|
79718
79718
|
var fs60 = __require("fs");
|
|
@@ -79736,7 +79736,7 @@ var require_network = __commonJS({
|
|
|
79736
79736
|
let ifacename = "";
|
|
79737
79737
|
let ifacenameFirst = "";
|
|
79738
79738
|
try {
|
|
79739
|
-
const ifaces =
|
|
79739
|
+
const ifaces = os25.networkInterfaces();
|
|
79740
79740
|
let scopeid = 9999;
|
|
79741
79741
|
for (let dev in ifaces) {
|
|
79742
79742
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
@@ -79756,7 +79756,7 @@ var require_network = __commonJS({
|
|
|
79756
79756
|
let defaultIp = "";
|
|
79757
79757
|
const cmd = "netstat -r";
|
|
79758
79758
|
const result2 = execSync5(cmd, util2.execOptsWin);
|
|
79759
|
-
const lines = result2.toString().split(
|
|
79759
|
+
const lines = result2.toString().split(os25.EOL);
|
|
79760
79760
|
lines.forEach((line) => {
|
|
79761
79761
|
line = line.replace(/\s+/g, " ").trim();
|
|
79762
79762
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -80389,7 +80389,7 @@ var require_network = __commonJS({
|
|
|
80389
80389
|
defaultString = "" + defaultString;
|
|
80390
80390
|
return new Promise((resolve16) => {
|
|
80391
80391
|
process.nextTick(() => {
|
|
80392
|
-
const ifaces =
|
|
80392
|
+
const ifaces = os25.networkInterfaces();
|
|
80393
80393
|
let result2 = [];
|
|
80394
80394
|
let nics = [];
|
|
80395
80395
|
let dnsSuffixes = [];
|
|
@@ -81459,7 +81459,7 @@ var require_network = __commonJS({
|
|
|
81459
81459
|
if (_windows) {
|
|
81460
81460
|
try {
|
|
81461
81461
|
exec3("netstat -r", util2.execOptsWin, (error40, stdout) => {
|
|
81462
|
-
const lines = stdout.toString().split(
|
|
81462
|
+
const lines = stdout.toString().split(os25.EOL);
|
|
81463
81463
|
lines.forEach((line) => {
|
|
81464
81464
|
line = line.replace(/\s+/g, " ").trim();
|
|
81465
81465
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -81505,7 +81505,7 @@ var require_network = __commonJS({
|
|
|
81505
81505
|
var require_wifi = __commonJS({
|
|
81506
81506
|
"node_modules/systeminformation/lib/wifi.js"(exports2) {
|
|
81507
81507
|
"use strict";
|
|
81508
|
-
var
|
|
81508
|
+
var os25 = __require("os");
|
|
81509
81509
|
var exec3 = __require("child_process").exec;
|
|
81510
81510
|
var execSync5 = __require("child_process").execSync;
|
|
81511
81511
|
var util2 = require_util7();
|
|
@@ -81727,7 +81727,7 @@ var require_wifi = __commonJS({
|
|
|
81727
81727
|
parts2.shift();
|
|
81728
81728
|
parts2.forEach((part) => {
|
|
81729
81729
|
part = "ACTIVE:" + part;
|
|
81730
|
-
const lines = part.split(
|
|
81730
|
+
const lines = part.split(os25.EOL);
|
|
81731
81731
|
const channel = util2.getValue(lines, "CHAN");
|
|
81732
81732
|
const frequency = util2.getValue(lines, "FREQ").toLowerCase().replace("mhz", "").trim();
|
|
81733
81733
|
const security = util2.getValue(lines, "SECURITY").replace("(", "").replace(")", "");
|
|
@@ -81951,15 +81951,15 @@ var require_wifi = __commonJS({
|
|
|
81951
81951
|
} else if (_windows) {
|
|
81952
81952
|
const cmd = "netsh wlan show networks mode=Bssid";
|
|
81953
81953
|
util2.powerShell(cmd).then((stdout) => {
|
|
81954
|
-
const ssidParts = stdout.toString("utf8").split(
|
|
81954
|
+
const ssidParts = stdout.toString("utf8").split(os25.EOL + os25.EOL + "SSID ");
|
|
81955
81955
|
ssidParts.shift();
|
|
81956
81956
|
ssidParts.forEach((ssidPart) => {
|
|
81957
|
-
const ssidLines = ssidPart.split(
|
|
81957
|
+
const ssidLines = ssidPart.split(os25.EOL);
|
|
81958
81958
|
if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(":") >= 0) {
|
|
81959
81959
|
const bssidsParts = ssidPart.split(" BSSID");
|
|
81960
81960
|
bssidsParts.shift();
|
|
81961
81961
|
bssidsParts.forEach((bssidPart) => {
|
|
81962
|
-
const bssidLines = bssidPart.split(
|
|
81962
|
+
const bssidLines = bssidPart.split(os25.EOL);
|
|
81963
81963
|
const bssidLine = bssidLines[0].split(":");
|
|
81964
81964
|
bssidLine.shift();
|
|
81965
81965
|
const bssid = bssidLine.join(":").trim().toLowerCase();
|
|
@@ -82283,7 +82283,7 @@ var require_wifi = __commonJS({
|
|
|
82283
82283
|
var require_processes = __commonJS({
|
|
82284
82284
|
"node_modules/systeminformation/lib/processes.js"(exports2) {
|
|
82285
82285
|
"use strict";
|
|
82286
|
-
var
|
|
82286
|
+
var os25 = __require("os");
|
|
82287
82287
|
var fs60 = __require("fs");
|
|
82288
82288
|
var path78 = __require("path");
|
|
82289
82289
|
var exec3 = __require("child_process").exec;
|
|
@@ -82934,7 +82934,7 @@ var require_processes = __commonJS({
|
|
|
82934
82934
|
line = line.trim().replace(/ +/g, " ").replace(/,+/g, ".");
|
|
82935
82935
|
const parts2 = line.split(" ");
|
|
82936
82936
|
const command = parts2.slice(9).join(" ");
|
|
82937
|
-
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 /
|
|
82937
|
+
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os25.totalmem()).toFixed(1));
|
|
82938
82938
|
const started = parseElapsed(parts2[5]);
|
|
82939
82939
|
result2.push({
|
|
82940
82940
|
pid: parseInt(parts2[0]),
|
|
@@ -83137,7 +83137,7 @@ var require_processes = __commonJS({
|
|
|
83137
83137
|
cpu: 0,
|
|
83138
83138
|
cpuu: 0,
|
|
83139
83139
|
cpus: 0,
|
|
83140
|
-
mem: memw /
|
|
83140
|
+
mem: memw / os25.totalmem() * 100,
|
|
83141
83141
|
priority: element.Priority | null,
|
|
83142
83142
|
memVsz: element.PageFileUsage || null,
|
|
83143
83143
|
memRss: Math.floor((element.WorkingSetSize || 0) / 1024),
|
|
@@ -83291,7 +83291,7 @@ var require_processes = __commonJS({
|
|
|
83291
83291
|
result2.forEach((item) => {
|
|
83292
83292
|
if (item.proc.toLowerCase() === pname.toLowerCase()) {
|
|
83293
83293
|
item.pids.push(pid);
|
|
83294
|
-
item.mem += mem /
|
|
83294
|
+
item.mem += mem / os25.totalmem() * 100;
|
|
83295
83295
|
processFound = true;
|
|
83296
83296
|
}
|
|
83297
83297
|
});
|
|
@@ -83301,7 +83301,7 @@ var require_processes = __commonJS({
|
|
|
83301
83301
|
pid,
|
|
83302
83302
|
pids: [pid],
|
|
83303
83303
|
cpu: 0,
|
|
83304
|
-
mem: mem /
|
|
83304
|
+
mem: mem / os25.totalmem() * 100
|
|
83305
83305
|
});
|
|
83306
83306
|
}
|
|
83307
83307
|
}
|
|
@@ -85042,7 +85042,7 @@ var require_docker = __commonJS({
|
|
|
85042
85042
|
var require_virtualbox = __commonJS({
|
|
85043
85043
|
"node_modules/systeminformation/lib/virtualbox.js"(exports2) {
|
|
85044
85044
|
"use strict";
|
|
85045
|
-
var
|
|
85045
|
+
var os25 = __require("os");
|
|
85046
85046
|
var exec3 = __require("child_process").exec;
|
|
85047
85047
|
var util2 = require_util7();
|
|
85048
85048
|
function vboxInfo(callback) {
|
|
@@ -85051,10 +85051,10 @@ var require_virtualbox = __commonJS({
|
|
|
85051
85051
|
process.nextTick(() => {
|
|
85052
85052
|
try {
|
|
85053
85053
|
exec3(util2.getVboxmanage() + " list vms --long", (error40, stdout) => {
|
|
85054
|
-
let parts2 = (
|
|
85054
|
+
let parts2 = (os25.EOL + stdout.toString()).split(os25.EOL + "Name:");
|
|
85055
85055
|
parts2.shift();
|
|
85056
85056
|
parts2.forEach((part) => {
|
|
85057
|
-
const lines = ("Name:" + part).split(
|
|
85057
|
+
const lines = ("Name:" + part).split(os25.EOL);
|
|
85058
85058
|
const state = util2.getValue(lines, "State");
|
|
85059
85059
|
const running = state.startsWith("running");
|
|
85060
85060
|
const runningSinceString = running ? state.replace("running (since ", "").replace(")", "").trim() : "";
|
|
@@ -107551,7 +107551,7 @@ var require_grpc = __commonJS({
|
|
|
107551
107551
|
var fs60 = __require("fs");
|
|
107552
107552
|
var google_auth_library_1 = require_src6();
|
|
107553
107553
|
var grpc3 = require_src11();
|
|
107554
|
-
var
|
|
107554
|
+
var os25 = __require("os");
|
|
107555
107555
|
var path_1 = __require("path");
|
|
107556
107556
|
var path78 = __require("path");
|
|
107557
107557
|
var protobuf = require_protobufjs();
|
|
@@ -107856,7 +107856,7 @@ var require_grpc = __commonJS({
|
|
|
107856
107856
|
if ((opts === null || opts === void 0 ? void 0 : opts.cert) && (opts === null || opts === void 0 ? void 0 : opts.key)) {
|
|
107857
107857
|
return [opts.cert, opts.key];
|
|
107858
107858
|
}
|
|
107859
|
-
const metadataPath = (0, path_1.join)(
|
|
107859
|
+
const metadataPath = (0, path_1.join)(os25.homedir(), ".secureConnect", "context_aware_metadata.json");
|
|
107860
107860
|
const metadata2 = JSON.parse(await readFileAsync(metadataPath));
|
|
107861
107861
|
if (!metadata2.cert_provider_command) {
|
|
107862
107862
|
throw Error("no cert_provider_command found");
|
|
@@ -173210,8 +173210,8 @@ var require_semver2 = __commonJS({
|
|
|
173210
173210
|
}
|
|
173211
173211
|
// preminor will bump the version up to the next minor release, and immediately
|
|
173212
173212
|
// down to pre-release. premajor and prepatch work the same way.
|
|
173213
|
-
inc(
|
|
173214
|
-
if (
|
|
173213
|
+
inc(release3, identifier, identifierBase) {
|
|
173214
|
+
if (release3.startsWith("pre")) {
|
|
173215
173215
|
if (!identifier && identifierBase === false) {
|
|
173216
173216
|
throw new Error("invalid increment argument: identifier is empty");
|
|
173217
173217
|
}
|
|
@@ -173222,7 +173222,7 @@ var require_semver2 = __commonJS({
|
|
|
173222
173222
|
}
|
|
173223
173223
|
}
|
|
173224
173224
|
}
|
|
173225
|
-
switch (
|
|
173225
|
+
switch (release3) {
|
|
173226
173226
|
case "premajor":
|
|
173227
173227
|
this.prerelease.length = 0;
|
|
173228
173228
|
this.patch = 0;
|
|
@@ -173313,7 +173313,7 @@ var require_semver2 = __commonJS({
|
|
|
173313
173313
|
break;
|
|
173314
173314
|
}
|
|
173315
173315
|
default:
|
|
173316
|
-
throw new Error(`invalid increment argument: ${
|
|
173316
|
+
throw new Error(`invalid increment argument: ${release3}`);
|
|
173317
173317
|
}
|
|
173318
173318
|
this.raw = this.format();
|
|
173319
173319
|
if (this.build.length) {
|
|
@@ -194669,7 +194669,7 @@ var require_service_config2 = __commonJS({
|
|
|
194669
194669
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
194670
194670
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
194671
194671
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
194672
|
-
var
|
|
194672
|
+
var os25 = __require("os");
|
|
194673
194673
|
var constants_1 = require_constants5();
|
|
194674
194674
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
194675
194675
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -194968,7 +194968,7 @@ var require_service_config2 = __commonJS({
|
|
|
194968
194968
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
194969
194969
|
let hostnameMatched = false;
|
|
194970
194970
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
194971
|
-
if (hostname3 ===
|
|
194971
|
+
if (hostname3 === os25.hostname()) {
|
|
194972
194972
|
hostnameMatched = true;
|
|
194973
194973
|
}
|
|
194974
194974
|
}
|
|
@@ -199398,7 +199398,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
199398
199398
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
199399
199399
|
exports2.Http2SubchannelCall = void 0;
|
|
199400
199400
|
var http22 = __require("http2");
|
|
199401
|
-
var
|
|
199401
|
+
var os25 = __require("os");
|
|
199402
199402
|
var constants_1 = require_constants5();
|
|
199403
199403
|
var metadata_1 = require_metadata4();
|
|
199404
199404
|
var stream_decoder_1 = require_stream_decoder2();
|
|
@@ -199406,7 +199406,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
199406
199406
|
var constants_2 = require_constants5();
|
|
199407
199407
|
var TRACER_NAME2 = "subchannel_call";
|
|
199408
199408
|
function getSystemErrorName(errno) {
|
|
199409
|
-
for (const [name3, num] of Object.entries(
|
|
199409
|
+
for (const [name3, num] of Object.entries(os25.constants.errno)) {
|
|
199410
199410
|
if (num === errno) {
|
|
199411
199411
|
return name3;
|
|
199412
199412
|
}
|
|
@@ -212750,6 +212750,9 @@ import * as path66 from "node:path";
|
|
|
212750
212750
|
import { inspect as inspect4 } from "node:util";
|
|
212751
212751
|
import process24 from "node:process";
|
|
212752
212752
|
|
|
212753
|
+
// packages/core/dist/src/core/contentGenerator.js
|
|
212754
|
+
import * as os15 from "node:os";
|
|
212755
|
+
|
|
212753
212756
|
// packages/core/dist/src/code_assist/oauth2.js
|
|
212754
212757
|
var import_google_auth_library2 = __toESM(require_src6(), 1);
|
|
212755
212758
|
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;
|
|
@@ -214098,6 +214117,19 @@ function recordLinesChanged(config2, lines, changeType, attributes) {
|
|
|
214098
214117
|
...attributes ?? {}
|
|
214099
214118
|
});
|
|
214100
214119
|
}
|
|
214120
|
+
function recordOnboardingStart(config2) {
|
|
214121
|
+
if (!onboardingStartCounter || !isMetricsInitialized)
|
|
214122
|
+
return;
|
|
214123
|
+
onboardingStartCounter.add(1, baseMetricDefinition.getCommonAttributes(config2));
|
|
214124
|
+
}
|
|
214125
|
+
function recordOnboardingSuccess(config2, userTier) {
|
|
214126
|
+
if (!onboardingSuccessCounter || !isMetricsInitialized)
|
|
214127
|
+
return;
|
|
214128
|
+
onboardingSuccessCounter.add(1, {
|
|
214129
|
+
...baseMetricDefinition.getCommonAttributes(config2),
|
|
214130
|
+
...userTier && { user_tier: userTier }
|
|
214131
|
+
});
|
|
214132
|
+
}
|
|
214101
214133
|
function recordFlickerFrame(config2) {
|
|
214102
214134
|
if (!flickerFrameCounter || !isMetricsInitialized)
|
|
214103
214135
|
return;
|
|
@@ -216573,6 +216605,47 @@ var KeychainAvailabilityEvent = class {
|
|
|
216573
216605
|
return `Keychain availability: ${this.available}`;
|
|
216574
216606
|
}
|
|
216575
216607
|
};
|
|
216608
|
+
var EVENT_ONBOARDING_START2 = "gemini_cli.onboarding.start";
|
|
216609
|
+
var OnboardingStartEvent = class {
|
|
216610
|
+
"event.name";
|
|
216611
|
+
"event.timestamp";
|
|
216612
|
+
constructor() {
|
|
216613
|
+
this["event.name"] = "onboarding_start";
|
|
216614
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
216615
|
+
}
|
|
216616
|
+
toOpenTelemetryAttributes(config2) {
|
|
216617
|
+
return {
|
|
216618
|
+
...getCommonAttributes(config2),
|
|
216619
|
+
"event.name": EVENT_ONBOARDING_START2,
|
|
216620
|
+
"event.timestamp": this["event.timestamp"]
|
|
216621
|
+
};
|
|
216622
|
+
}
|
|
216623
|
+
toLogBody() {
|
|
216624
|
+
return "Onboarding started.";
|
|
216625
|
+
}
|
|
216626
|
+
};
|
|
216627
|
+
var EVENT_ONBOARDING_SUCCESS2 = "gemini_cli.onboarding.success";
|
|
216628
|
+
var OnboardingSuccessEvent = class {
|
|
216629
|
+
"event.name";
|
|
216630
|
+
"event.timestamp";
|
|
216631
|
+
userTier;
|
|
216632
|
+
constructor(userTier) {
|
|
216633
|
+
this["event.name"] = "onboarding_success";
|
|
216634
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
216635
|
+
this.userTier = userTier;
|
|
216636
|
+
}
|
|
216637
|
+
toOpenTelemetryAttributes(config2) {
|
|
216638
|
+
return {
|
|
216639
|
+
...getCommonAttributes(config2),
|
|
216640
|
+
"event.name": EVENT_ONBOARDING_SUCCESS2,
|
|
216641
|
+
"event.timestamp": this["event.timestamp"],
|
|
216642
|
+
user_tier: this.userTier ?? ""
|
|
216643
|
+
};
|
|
216644
|
+
}
|
|
216645
|
+
toLogBody() {
|
|
216646
|
+
return `Onboarding succeeded.${this.userTier ? ` Tier: ${this.userTier}` : ""}`;
|
|
216647
|
+
}
|
|
216648
|
+
};
|
|
216576
216649
|
var EVENT_TOKEN_STORAGE_INITIALIZATION = "gemini_cli.token_storage.initialization";
|
|
216577
216650
|
var TokenStorageInitializationEvent = class {
|
|
216578
216651
|
"event.name";
|
|
@@ -218152,6 +218225,8 @@ var EventMetadataKey;
|
|
|
218152
218225
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_SELECTED_OPTION"] = 188] = "GEMINI_CLI_BILLING_SELECTED_OPTION";
|
|
218153
218226
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_CREDIT_BALANCE"] = 189] = "GEMINI_CLI_BILLING_CREDIT_BALANCE";
|
|
218154
218227
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_PURCHASE_SOURCE"] = 190] = "GEMINI_CLI_BILLING_PURCHASE_SOURCE";
|
|
218228
|
+
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_ONBOARDING_START"] = 192] = "GEMINI_CLI_ONBOARDING_START";
|
|
218229
|
+
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_ONBOARDING_USER_TIER"] = 193] = "GEMINI_CLI_ONBOARDING_USER_TIER";
|
|
218155
218230
|
})(EventMetadataKey || (EventMetadataKey = {}));
|
|
218156
218231
|
|
|
218157
218232
|
// node_modules/mnemonist/index.mjs
|
|
@@ -218180,8 +218255,8 @@ var Float64Vector = import_vector.default.Float64Vector;
|
|
|
218180
218255
|
var PointerVector = import_vector.default.PointerVector;
|
|
218181
218256
|
|
|
218182
218257
|
// packages/core/dist/src/generated/git-commit.js
|
|
218183
|
-
var GIT_COMMIT_INFO = "
|
|
218184
|
-
var CLI_VERSION = "0.35.0-preview.
|
|
218258
|
+
var GIT_COMMIT_INFO = "596a736a9";
|
|
218259
|
+
var CLI_VERSION = "0.35.0-preview.4";
|
|
218185
218260
|
|
|
218186
218261
|
// packages/core/dist/src/ide/detect-ide.js
|
|
218187
218262
|
var IDE_DEFINITIONS = {
|
|
@@ -218353,6 +218428,8 @@ var EventNames;
|
|
|
218353
218428
|
EventNames2["TOOL_OUTPUT_MASKING"] = "tool_output_masking";
|
|
218354
218429
|
EventNames2["KEYCHAIN_AVAILABILITY"] = "keychain_availability";
|
|
218355
218430
|
EventNames2["TOKEN_STORAGE_INITIALIZATION"] = "token_storage_initialization";
|
|
218431
|
+
EventNames2["ONBOARDING_START"] = "onboarding_start";
|
|
218432
|
+
EventNames2["ONBOARDING_SUCCESS"] = "onboarding_success";
|
|
218356
218433
|
EventNames2["CONSECA_POLICY_GENERATION"] = "conseca_policy_generation";
|
|
218357
218434
|
EventNames2["CONSECA_VERDICT"] = "conseca_verdict";
|
|
218358
218435
|
EventNames2["STARTUP_STATS"] = "startup_stats";
|
|
@@ -219642,6 +219719,27 @@ var ClearcutLogger = class _ClearcutLogger {
|
|
|
219642
219719
|
this.enqueueLogEvent(this.createLogEvent(EventNames.TOKEN_STORAGE_INITIALIZATION, data));
|
|
219643
219720
|
this.flushIfNeeded();
|
|
219644
219721
|
}
|
|
219722
|
+
logOnboardingStartEvent(_event) {
|
|
219723
|
+
const data = [
|
|
219724
|
+
{
|
|
219725
|
+
gemini_cli_key: EventMetadataKey.GEMINI_CLI_ONBOARDING_START,
|
|
219726
|
+
value: "true"
|
|
219727
|
+
}
|
|
219728
|
+
];
|
|
219729
|
+
this.enqueueLogEvent(this.createLogEvent(EventNames.ONBOARDING_START, data));
|
|
219730
|
+
this.flushIfNeeded();
|
|
219731
|
+
}
|
|
219732
|
+
logOnboardingSuccessEvent(event) {
|
|
219733
|
+
const data = [];
|
|
219734
|
+
if (event.userTier) {
|
|
219735
|
+
data.push({
|
|
219736
|
+
gemini_cli_key: EventMetadataKey.GEMINI_CLI_ONBOARDING_USER_TIER,
|
|
219737
|
+
value: event.userTier
|
|
219738
|
+
});
|
|
219739
|
+
}
|
|
219740
|
+
this.enqueueLogEvent(this.createLogEvent(EventNames.ONBOARDING_SUCCESS, data));
|
|
219741
|
+
this.flushIfNeeded();
|
|
219742
|
+
}
|
|
219645
219743
|
logStartupStatsEvent(event) {
|
|
219646
219744
|
const data = [
|
|
219647
219745
|
{
|
|
@@ -225986,11 +226084,7 @@ function normalizeCommandName(raw) {
|
|
|
225986
226084
|
return raw.slice(1, -1);
|
|
225987
226085
|
}
|
|
225988
226086
|
}
|
|
225989
|
-
|
|
225990
|
-
if (!trimmed2) {
|
|
225991
|
-
return trimmed2;
|
|
225992
|
-
}
|
|
225993
|
-
return trimmed2.split(/[\\/]/).pop() ?? trimmed2;
|
|
226087
|
+
return raw.trim();
|
|
225994
226088
|
}
|
|
225995
226089
|
function extractNameFromNode(node) {
|
|
225996
226090
|
switch (node.type) {
|
|
@@ -230307,9 +230401,9 @@ async function initializeTelemetry(config2, credentials3) {
|
|
|
230307
230401
|
if (config2.getDebugMode()) {
|
|
230308
230402
|
debugLogger.log("OpenTelemetry SDK started successfully.");
|
|
230309
230403
|
}
|
|
230310
|
-
telemetryInitialized = true;
|
|
230311
230404
|
activeTelemetryEmail = credentials3?.client_email;
|
|
230312
230405
|
initializeMetrics(config2);
|
|
230406
|
+
telemetryInitialized = true;
|
|
230313
230407
|
void flushTelemetryBuffer();
|
|
230314
230408
|
} catch (error40) {
|
|
230315
230409
|
debugLogger.error("Error starting OpenTelemetry SDK:", error40);
|
|
@@ -230966,6 +231060,30 @@ function logTokenStorageInitialization(config2, event) {
|
|
|
230966
231060
|
recordTokenStorageInitialization(config2, event);
|
|
230967
231061
|
});
|
|
230968
231062
|
}
|
|
231063
|
+
function logOnboardingStart(config2, event) {
|
|
231064
|
+
ClearcutLogger.getInstance(config2)?.logOnboardingStartEvent(event);
|
|
231065
|
+
bufferTelemetryEvent(() => {
|
|
231066
|
+
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
231067
|
+
const logRecord = {
|
|
231068
|
+
body: event.toLogBody(),
|
|
231069
|
+
attributes: event.toOpenTelemetryAttributes(config2)
|
|
231070
|
+
};
|
|
231071
|
+
logger3.emit(logRecord);
|
|
231072
|
+
recordOnboardingStart(config2);
|
|
231073
|
+
});
|
|
231074
|
+
}
|
|
231075
|
+
function logOnboardingSuccess(config2, event) {
|
|
231076
|
+
ClearcutLogger.getInstance(config2)?.logOnboardingSuccessEvent(event);
|
|
231077
|
+
bufferTelemetryEvent(() => {
|
|
231078
|
+
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
231079
|
+
const logRecord = {
|
|
231080
|
+
body: event.toLogBody(),
|
|
231081
|
+
attributes: event.toOpenTelemetryAttributes(config2)
|
|
231082
|
+
};
|
|
231083
|
+
logger3.emit(logRecord);
|
|
231084
|
+
recordOnboardingSuccess(config2, event.userTier);
|
|
231085
|
+
});
|
|
231086
|
+
}
|
|
230969
231087
|
function logBillingEvent(config2, event) {
|
|
230970
231088
|
bufferTelemetryEvent(() => {
|
|
230971
231089
|
const logger3 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
@@ -248016,7 +248134,7 @@ var IdeClient = class _IdeClient {
|
|
|
248016
248134
|
* content if accepted.
|
|
248017
248135
|
*/
|
|
248018
248136
|
async openDiff(filePath, newContent) {
|
|
248019
|
-
const
|
|
248137
|
+
const release3 = await this.acquireMutex();
|
|
248020
248138
|
const promise2 = new Promise((resolve16, reject) => {
|
|
248021
248139
|
if (!this.client) {
|
|
248022
248140
|
return reject(new Error("IDE client is not connected."));
|
|
@@ -248045,7 +248163,7 @@ var IdeClient = class _IdeClient {
|
|
|
248045
248163
|
reject(err2);
|
|
248046
248164
|
});
|
|
248047
248165
|
});
|
|
248048
|
-
promise2.finally(
|
|
248166
|
+
promise2.finally(release3);
|
|
248049
248167
|
return promise2;
|
|
248050
248168
|
}
|
|
248051
248169
|
/**
|
|
@@ -248066,13 +248184,13 @@ var IdeClient = class _IdeClient {
|
|
|
248066
248184
|
* release the lock.
|
|
248067
248185
|
*/
|
|
248068
248186
|
acquireMutex() {
|
|
248069
|
-
let
|
|
248187
|
+
let release3;
|
|
248070
248188
|
const newMutex = new Promise((resolve16) => {
|
|
248071
|
-
|
|
248189
|
+
release3 = resolve16;
|
|
248072
248190
|
});
|
|
248073
248191
|
const oldMutex = this.diffMutex;
|
|
248074
248192
|
this.diffMutex = newMutex;
|
|
248075
|
-
return oldMutex.then(() =>
|
|
248193
|
+
return oldMutex.then(() => release3);
|
|
248076
248194
|
}
|
|
248077
248195
|
async closeDiff(filePath, options) {
|
|
248078
248196
|
try {
|
|
@@ -251277,7 +251395,7 @@ function getVersion() {
|
|
|
251277
251395
|
}
|
|
251278
251396
|
versionPromise = (async () => {
|
|
251279
251397
|
const pkgJson = await getPackageJson(__dirname3);
|
|
251280
|
-
return "0.35.0-preview.
|
|
251398
|
+
return "0.35.0-preview.4";
|
|
251281
251399
|
})();
|
|
251282
251400
|
return versionPromise;
|
|
251283
251401
|
}
|
|
@@ -251728,22 +251846,23 @@ function resetUserDataCacheForTesting() {
|
|
|
251728
251846
|
storage: "weakmap"
|
|
251729
251847
|
});
|
|
251730
251848
|
}
|
|
251731
|
-
async function setupUser(client,
|
|
251849
|
+
async function setupUser(client, config2, httpOptions = {}) {
|
|
251732
251850
|
const projectId = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
|
|
251733
251851
|
const projectCache = userDataCache.getOrCreate(client, () => createCache({
|
|
251734
251852
|
storage: "map",
|
|
251735
251853
|
defaultTtl: 3e4
|
|
251736
251854
|
// 30 seconds
|
|
251737
251855
|
}));
|
|
251738
|
-
return projectCache.getOrCreate(projectId, () => _doSetupUser(client, projectId,
|
|
251856
|
+
return projectCache.getOrCreate(projectId, () => _doSetupUser(client, projectId, config2, httpOptions));
|
|
251739
251857
|
}
|
|
251740
|
-
async function _doSetupUser(client, projectId,
|
|
251858
|
+
async function _doSetupUser(client, projectId, config2, httpOptions = {}) {
|
|
251741
251859
|
const caServer = new CodeAssistServer(client, projectId, httpOptions, "", void 0, void 0);
|
|
251742
251860
|
const coreClientMetadata = {
|
|
251743
251861
|
ideType: "IDE_UNSPECIFIED",
|
|
251744
251862
|
platform: "PLATFORM_UNSPECIFIED",
|
|
251745
251863
|
pluginType: "GEMINI"
|
|
251746
251864
|
};
|
|
251865
|
+
const validationHandler = config2.getValidationHandler();
|
|
251747
251866
|
let loadRes;
|
|
251748
251867
|
while (true) {
|
|
251749
251868
|
loadRes = await caServer.loadCodeAssist({
|
|
@@ -251780,7 +251899,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
251780
251899
|
projectId,
|
|
251781
251900
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
251782
251901
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
251783
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
251902
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
251903
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
251784
251904
|
};
|
|
251785
251905
|
}
|
|
251786
251906
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -251789,7 +251909,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
251789
251909
|
projectId: loadRes.cloudaicompanionProject,
|
|
251790
251910
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
251791
251911
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
251792
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
251912
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
251913
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
251793
251914
|
};
|
|
251794
251915
|
}
|
|
251795
251916
|
const tier = getOnboardTier(loadRes);
|
|
@@ -251813,6 +251934,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
251813
251934
|
}
|
|
251814
251935
|
};
|
|
251815
251936
|
}
|
|
251937
|
+
logOnboardingStart(config2, new OnboardingStartEvent());
|
|
251816
251938
|
let lroRes = await caServer.onboardUser(onboardReq);
|
|
251817
251939
|
if (!lroRes.done && lroRes.name) {
|
|
251818
251940
|
const operationName = lroRes.name;
|
|
@@ -251821,12 +251943,15 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
251821
251943
|
lroRes = await caServer.getOperation(operationName);
|
|
251822
251944
|
}
|
|
251823
251945
|
}
|
|
251946
|
+
const userTier = tier.id ?? UserTierId.STANDARD;
|
|
251947
|
+
logOnboardingSuccess(config2, new OnboardingSuccessEvent(userTier));
|
|
251824
251948
|
if (!lroRes.response?.cloudaicompanionProject?.id) {
|
|
251825
251949
|
if (projectId) {
|
|
251826
251950
|
return {
|
|
251827
251951
|
projectId,
|
|
251828
251952
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
251829
|
-
userTierName: tier.name
|
|
251953
|
+
userTierName: tier.name,
|
|
251954
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
251830
251955
|
};
|
|
251831
251956
|
}
|
|
251832
251957
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -251834,7 +251959,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
251834
251959
|
return {
|
|
251835
251960
|
projectId: lroRes.response.cloudaicompanionProject.id,
|
|
251836
251961
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
251837
|
-
userTierName: tier.name
|
|
251962
|
+
userTierName: tier.name,
|
|
251963
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
251838
251964
|
};
|
|
251839
251965
|
}
|
|
251840
251966
|
function throwIneligibleOrProjectIdError(res) {
|
|
@@ -252251,7 +252377,7 @@ var LoggingContentGenerator = class {
|
|
|
252251
252377
|
async function createCodeAssistContentGenerator(httpOptions, authType, config2, sessionId2) {
|
|
252252
252378
|
if (authType === AuthType.LOGIN_WITH_GOOGLE || authType === AuthType.COMPUTE_ADC) {
|
|
252253
252379
|
const authClient = await getOauthClient(authType, config2);
|
|
252254
|
-
const userData = await setupUser(authClient, config2
|
|
252380
|
+
const userData = await setupUser(authClient, config2, httpOptions);
|
|
252255
252381
|
return new CodeAssistServer(authClient, userData.projectId, httpOptions, sessionId2, userData.userTier, userData.userTierName, userData.paidTier, config2);
|
|
252256
252382
|
}
|
|
252257
252383
|
throw new Error(`Unsupported authType: ${authType}`);
|
|
@@ -252405,7 +252531,7 @@ function determineSurface2() {
|
|
|
252405
252531
|
if (ide.name !== "vscode") {
|
|
252406
252532
|
return ide.name;
|
|
252407
252533
|
}
|
|
252408
|
-
if (process.env["TERM_PROGRAM"] === "vscode") {
|
|
252534
|
+
if (process.env["TERM_PROGRAM"] === "vscode" || process.env["VSCODE_PID"]) {
|
|
252409
252535
|
return ide.name;
|
|
252410
252536
|
}
|
|
252411
252537
|
if (process.env["GITHUB_SHA"]) {
|
|
@@ -252551,15 +252677,34 @@ async function createContentGenerator(config2, gcConfig, sessionId2) {
|
|
|
252551
252677
|
const model = resolveModel(gcConfig.getModel(), config2.authType === AuthType.USE_GEMINI || config2.authType === AuthType.USE_VERTEX_AI || (await gcConfig.getGemini31Launched?.() ?? false));
|
|
252552
252678
|
const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
|
|
252553
252679
|
const clientName = gcConfig.getClientName();
|
|
252554
|
-
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
252555
252680
|
const surface = determineSurface2();
|
|
252556
|
-
|
|
252681
|
+
let userAgent;
|
|
252682
|
+
if (clientName === "acp-vscode" || surface === "vscode") {
|
|
252683
|
+
const osTypeMap = {
|
|
252684
|
+
darwin: "macOS",
|
|
252685
|
+
win32: "Windows",
|
|
252686
|
+
linux: "Linux"
|
|
252687
|
+
};
|
|
252688
|
+
const osType = osTypeMap[process.platform] || process.platform;
|
|
252689
|
+
const osVersion = os15.release();
|
|
252690
|
+
const arch4 = process.arch;
|
|
252691
|
+
const vscodeVersion = process.env["TERM_PROGRAM_VERSION"] || "unknown";
|
|
252692
|
+
let hostPath = `VSCode/${vscodeVersion}`;
|
|
252693
|
+
if (isCloudShell()) {
|
|
252694
|
+
const cloudShellVersion = process.env["CLOUD_SHELL_VERSION"] || "unknown";
|
|
252695
|
+
hostPath += ` > CloudShell/${cloudShellVersion}`;
|
|
252696
|
+
}
|
|
252697
|
+
userAgent = `CloudCodeVSCode/${version4} (aidev_client; os_type=${osType}; os_version=${osVersion}; arch=${arch4}; host_path=${hostPath}; proxy_client=geminicli)`;
|
|
252698
|
+
} else {
|
|
252699
|
+
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
252700
|
+
userAgent = `${userAgentPrefix}/${version4}/${model} (${process.platform}; ${process.arch}; ${surface})`;
|
|
252701
|
+
}
|
|
252557
252702
|
const customHeadersMap = parseCustomHeaders(customHeadersEnv);
|
|
252558
252703
|
const apiKeyAuthMechanism = process.env["GEMINI_API_KEY_AUTH_MECHANISM"] || "x-goog-api-key";
|
|
252559
252704
|
const apiVersionEnv = process.env["GOOGLE_GENAI_API_VERSION"];
|
|
252560
252705
|
const baseHeaders = {
|
|
252561
|
-
|
|
252562
|
-
|
|
252706
|
+
"User-Agent": userAgent,
|
|
252707
|
+
...customHeadersMap
|
|
252563
252708
|
};
|
|
252564
252709
|
if (apiKeyAuthMechanism === "bearer" && (config2.authType === AuthType.USE_GEMINI || config2.authType === AuthType.USE_VERTEX_AI) && config2.apiKey) {
|
|
252565
252710
|
baseHeaders["Authorization"] = `Bearer ${config2.apiKey}`;
|
|
@@ -271050,7 +271195,7 @@ import {
|
|
|
271050
271195
|
lookup as dnsLookup
|
|
271051
271196
|
} from "node:dns";
|
|
271052
271197
|
import { promisify as promisify11 } from "node:util";
|
|
271053
|
-
import
|
|
271198
|
+
import os16 from "node:os";
|
|
271054
271199
|
var { Resolver: AsyncResolver } = dnsPromises;
|
|
271055
271200
|
var kCacheableLookupCreateConnection = Symbol("cacheableLookupCreateConnection");
|
|
271056
271201
|
var kCacheableLookupInstance = Symbol("cacheableLookupInstance");
|
|
@@ -271073,7 +271218,7 @@ var map4to6 = (entries2) => {
|
|
|
271073
271218
|
var getIfaceInfo = () => {
|
|
271074
271219
|
let has4 = false;
|
|
271075
271220
|
let has6 = false;
|
|
271076
|
-
for (const device of Object.values(
|
|
271221
|
+
for (const device of Object.values(os16.networkInterfaces())) {
|
|
271077
271222
|
for (const iface of device) {
|
|
271078
271223
|
if (iface.internal) {
|
|
271079
271224
|
continue;
|
|
@@ -274251,7 +274396,7 @@ var got = create_default(defaults2);
|
|
|
274251
274396
|
var source_default2 = got;
|
|
274252
274397
|
|
|
274253
274398
|
// node_modules/@joshua.litt/get-ripgrep/dist/downloadRipGrep.js
|
|
274254
|
-
import * as
|
|
274399
|
+
import * as os18 from "node:os";
|
|
274255
274400
|
import { dirname as dirname6, join as join10 } from "node:path";
|
|
274256
274401
|
|
|
274257
274402
|
// node_modules/@joshua.litt/get-ripgrep/node_modules/path-exists/index.js
|
|
@@ -274270,9 +274415,9 @@ import { pipeline } from "node:stream/promises";
|
|
|
274270
274415
|
import { fileURLToPath as fileURLToPath10 } from "node:url";
|
|
274271
274416
|
|
|
274272
274417
|
// node_modules/xdg-basedir/index.js
|
|
274273
|
-
import
|
|
274418
|
+
import os17 from "os";
|
|
274274
274419
|
import path38 from "path";
|
|
274275
|
-
var homeDirectory =
|
|
274420
|
+
var homeDirectory = os17.homedir();
|
|
274276
274421
|
var { env } = process;
|
|
274277
274422
|
var xdgData = env.XDG_DATA_HOME || (homeDirectory ? path38.join(homeDirectory, ".local", "share") : void 0);
|
|
274278
274423
|
var xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? path38.join(homeDirectory, ".config") : void 0);
|
|
@@ -274296,8 +274441,8 @@ var REPOSITORY = `microsoft/ripgrep-prebuilt`;
|
|
|
274296
274441
|
var VERSION2 = process.env.RIPGREP_VERSION || "v13.0.0-10";
|
|
274297
274442
|
var BIN_PATH = join10(__dirname5, "../bin");
|
|
274298
274443
|
var getTarget = () => {
|
|
274299
|
-
const arch4 = process.env.npm_config_arch ||
|
|
274300
|
-
const platform10 = process.env.platform ||
|
|
274444
|
+
const arch4 = process.env.npm_config_arch || os18.arch();
|
|
274445
|
+
const platform10 = process.env.platform || os18.platform();
|
|
274301
274446
|
switch (platform10) {
|
|
274302
274447
|
case "darwin":
|
|
274303
274448
|
switch (arch4) {
|
|
@@ -274338,7 +274483,7 @@ var getTarget = () => {
|
|
|
274338
274483
|
var downloadFile = async (url3, outFile) => {
|
|
274339
274484
|
let tmpDir = void 0;
|
|
274340
274485
|
try {
|
|
274341
|
-
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(
|
|
274486
|
+
tmpDir = await import_fs_extra.default.mkdtemp(path39.join(os18.tmpdir(), "download-ripgrep"));
|
|
274342
274487
|
const tmpFile = path39.join(tmpDir, "tmp-file");
|
|
274343
274488
|
await pipeline(source_default2.stream(url3), createWriteStream3(tmpFile));
|
|
274344
274489
|
await mkdir2(dirname6(outFile), { recursive: true });
|
|
@@ -275252,7 +275397,7 @@ var ActivateSkillTool = class _ActivateSkillTool extends BaseDeclarativeTool {
|
|
|
275252
275397
|
// packages/core/dist/src/tools/shell.js
|
|
275253
275398
|
import fsPromises10 from "node:fs/promises";
|
|
275254
275399
|
import path45 from "node:path";
|
|
275255
|
-
import
|
|
275400
|
+
import os22 from "node:os";
|
|
275256
275401
|
import crypto14 from "node:crypto";
|
|
275257
275402
|
|
|
275258
275403
|
// packages/core/dist/src/utils/summarizer.js
|
|
@@ -275326,14 +275471,14 @@ var getPty = async () => {
|
|
|
275326
275471
|
// packages/core/dist/src/services/shellExecutionService.js
|
|
275327
275472
|
import { spawn as cpSpawn } from "node:child_process";
|
|
275328
275473
|
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
275329
|
-
import
|
|
275474
|
+
import os21 from "node:os";
|
|
275330
275475
|
import fs32, { mkdirSync as mkdirSync2 } from "node:fs";
|
|
275331
275476
|
import path44 from "node:path";
|
|
275332
275477
|
|
|
275333
275478
|
// packages/core/dist/src/utils/systemEncoding.js
|
|
275334
275479
|
var import_chardet = __toESM(require_lib9(), 1);
|
|
275335
275480
|
import { execSync as execSync2 } from "node:child_process";
|
|
275336
|
-
import
|
|
275481
|
+
import os19 from "node:os";
|
|
275337
275482
|
var cachedSystemEncoding = void 0;
|
|
275338
275483
|
function resetEncodingCache() {
|
|
275339
275484
|
cachedSystemEncoding = void 0;
|
|
@@ -275348,7 +275493,7 @@ function getCachedEncodingForBuffer(buffer) {
|
|
|
275348
275493
|
return detectEncodingFromBuffer(buffer) || "utf-8";
|
|
275349
275494
|
}
|
|
275350
275495
|
function getSystemEncoding() {
|
|
275351
|
-
if (
|
|
275496
|
+
if (os19.platform() === "win32") {
|
|
275352
275497
|
try {
|
|
275353
275498
|
const output = execSync2("chcp", { encoding: "utf8" });
|
|
275354
275499
|
const match3 = output.match(/:\s*(\d+)/);
|
|
@@ -275851,11 +275996,11 @@ function convertColorToHex(color, colorMode, defaultColor) {
|
|
|
275851
275996
|
}
|
|
275852
275997
|
|
|
275853
275998
|
// packages/core/dist/src/utils/process-utils.js
|
|
275854
|
-
import
|
|
275999
|
+
import os20 from "node:os";
|
|
275855
276000
|
var SIGKILL_TIMEOUT_MS = 200;
|
|
275856
276001
|
async function killProcessGroup(options) {
|
|
275857
276002
|
const { pid, escalate = false, isExited = () => false, pty } = options;
|
|
275858
|
-
const isWindows2 =
|
|
276003
|
+
const isWindows2 = os20.platform() === "win32";
|
|
275859
276004
|
if (isWindows2) {
|
|
275860
276005
|
if (pty) {
|
|
275861
276006
|
try {
|
|
@@ -276442,7 +276587,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
276442
276587
|
return { finalBuffer };
|
|
276443
276588
|
};
|
|
276444
276589
|
var cleanup = cleanup2;
|
|
276445
|
-
const isWindows2 =
|
|
276590
|
+
const isWindows2 = os21.platform() === "win32";
|
|
276446
276591
|
const { executable, argsPrefix, shell } = getShellConfiguration();
|
|
276447
276592
|
const guardedCommand = ensurePromptvarsDisabled(commandToExecute, shell);
|
|
276448
276593
|
const spawnArgs = [...argsPrefix, guardedCommand];
|
|
@@ -276605,7 +276750,7 @@ var ShellExecutionService = class _ShellExecutionService {
|
|
|
276605
276750
|
}
|
|
276606
276751
|
const finalStrippedOutput = stripAnsi(combinedOutput).trim();
|
|
276607
276752
|
const exitCode = code;
|
|
276608
|
-
const exitSignal = signal ?
|
|
276753
|
+
const exitSignal = signal ? os21.constants.signals[signal] : null;
|
|
276609
276754
|
const resultPayload = {
|
|
276610
276755
|
rawOutput: finalBuffer,
|
|
276611
276756
|
output: finalStrippedOutput,
|
|
@@ -277182,9 +277327,9 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
277182
277327
|
returnDisplay: "Command cancelled by user."
|
|
277183
277328
|
};
|
|
277184
277329
|
}
|
|
277185
|
-
const isWindows2 =
|
|
277330
|
+
const isWindows2 = os22.platform() === "win32";
|
|
277186
277331
|
const tempFileName = `shell_pgrep_${crypto14.randomBytes(6).toString("hex")}.tmp`;
|
|
277187
|
-
const tempFilePath = path45.join(
|
|
277332
|
+
const tempFilePath = path45.join(os22.tmpdir(), tempFileName);
|
|
277188
277333
|
const timeoutMs = this.context.config.getShellToolInactivityTimeout();
|
|
277189
277334
|
const timeoutController = new AbortController();
|
|
277190
277335
|
let timeoutTimer;
|
|
@@ -277280,7 +277425,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
277280
277425
|
}
|
|
277281
277426
|
const result2 = await resultPromise;
|
|
277282
277427
|
const backgroundPIDs = [];
|
|
277283
|
-
if (
|
|
277428
|
+
if (os22.platform() !== "win32") {
|
|
277284
277429
|
let tempFileExists = false;
|
|
277285
277430
|
try {
|
|
277286
277431
|
await fsPromises10.access(tempFilePath);
|
|
@@ -277290,7 +277435,7 @@ var ShellToolInvocation = class extends BaseToolInvocation {
|
|
|
277290
277435
|
}
|
|
277291
277436
|
if (tempFileExists) {
|
|
277292
277437
|
const pgrepContent = await fsPromises10.readFile(tempFilePath, "utf8");
|
|
277293
|
-
const pgrepLines = pgrepContent.split(
|
|
277438
|
+
const pgrepLines = pgrepContent.split(os22.EOL).filter(Boolean);
|
|
277294
277439
|
for (const line of pgrepLines) {
|
|
277295
277440
|
if (!/^\d+$/.test(line)) {
|
|
277296
277441
|
debugLogger.error(`pgrep: ${line}`);
|
|
@@ -309295,7 +309440,7 @@ var A2AAuthProviderFactory = class _A2AAuthProviderFactory {
|
|
|
309295
309440
|
return provider;
|
|
309296
309441
|
}
|
|
309297
309442
|
case "oauth2": {
|
|
309298
|
-
const { OAuth2AuthProvider } = await import("./oauth2-provider-
|
|
309443
|
+
const { OAuth2AuthProvider } = await import("./oauth2-provider-XHYKUX3S.js");
|
|
309299
309444
|
const provider = new OAuth2AuthProvider(authConfig, options.agentName ?? "unknown", agentCard, options.agentCardUrl);
|
|
309300
309445
|
await provider.initialize();
|
|
309301
309446
|
return provider;
|
|
@@ -314599,14 +314744,14 @@ var import_toml2 = __toESM(require_toml(), 1);
|
|
|
314599
314744
|
// packages/core/dist/src/utils/security.js
|
|
314600
314745
|
import * as fs46 from "node:fs/promises";
|
|
314601
314746
|
import { constants as constants4 } from "node:fs";
|
|
314602
|
-
import * as
|
|
314747
|
+
import * as os23 from "node:os";
|
|
314603
314748
|
async function isDirectorySecure(dirPath) {
|
|
314604
314749
|
try {
|
|
314605
314750
|
const stats = await fs46.stat(dirPath);
|
|
314606
314751
|
if (!stats.isDirectory()) {
|
|
314607
314752
|
return { secure: false, reason: "Not a directory" };
|
|
314608
314753
|
}
|
|
314609
|
-
if (
|
|
314754
|
+
if (os23.platform() === "win32") {
|
|
314610
314755
|
try {
|
|
314611
314756
|
const escapedPath = dirPath.replace(/'/g, "''");
|
|
314612
314757
|
const script = `
|
|
@@ -324554,13 +324699,13 @@ var ReadManyFilesTool = class _ReadManyFilesTool extends BaseDeclarativeTool {
|
|
|
324554
324699
|
};
|
|
324555
324700
|
|
|
324556
324701
|
// packages/core/dist/src/utils/compatibility.js
|
|
324557
|
-
import
|
|
324702
|
+
import os24 from "node:os";
|
|
324558
324703
|
function isWindows10() {
|
|
324559
|
-
if (
|
|
324704
|
+
if (os24.platform() !== "win32") {
|
|
324560
324705
|
return false;
|
|
324561
324706
|
}
|
|
324562
|
-
const
|
|
324563
|
-
const parts2 =
|
|
324707
|
+
const release3 = os24.release();
|
|
324708
|
+
const parts2 = release3.split(".");
|
|
324564
324709
|
if (parts2.length >= 3 && parts2[0] === "10" && parts2[1] === "0") {
|
|
324565
324710
|
const build = parseInt(parts2[2], 10);
|
|
324566
324711
|
return build < 22e3;
|
|
@@ -324612,7 +324757,7 @@ function getCompatibilityWarnings(options) {
|
|
|
324612
324757
|
darwin: "iTerm2 or Ghostty",
|
|
324613
324758
|
linux: "Ghostty"
|
|
324614
324759
|
};
|
|
324615
|
-
const suggestion = platformTerminals[
|
|
324760
|
+
const suggestion = platformTerminals[os24.platform()];
|
|
324616
324761
|
const suggestedTerminals = suggestion ? ` (e.g., ${suggestion})` : "";
|
|
324617
324762
|
warnings.push({
|
|
324618
324763
|
id: "jetbrains-terminal",
|
|
@@ -324897,6 +325042,8 @@ export {
|
|
|
324897
325042
|
ModelSlashCommandEvent,
|
|
324898
325043
|
ExtensionDisableEvent,
|
|
324899
325044
|
WebFetchFallbackAttemptEvent,
|
|
325045
|
+
OnboardingStartEvent,
|
|
325046
|
+
OnboardingSuccessEvent,
|
|
324900
325047
|
KeychainSchema,
|
|
324901
325048
|
KEYCHAIN_TEST_PREFIX,
|
|
324902
325049
|
SECRET_PREFIX,
|
|
@@ -325130,6 +325277,8 @@ export {
|
|
|
325130
325277
|
logExtensionEnable,
|
|
325131
325278
|
logExtensionDisable,
|
|
325132
325279
|
logWebFetchFallbackAttempt,
|
|
325280
|
+
logOnboardingStart,
|
|
325281
|
+
logOnboardingSuccess,
|
|
325133
325282
|
logBillingEvent,
|
|
325134
325283
|
GEMINI_CLI_COMPANION_EXTENSION_NAME,
|
|
325135
325284
|
IDE_MAX_OPEN_FILES,
|