@google/gemini-cli-a2a-server 0.35.0-preview.3 → 0.35.0-preview.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a-server.mjs +336 -173
- package/dist/src/config/config.js +1 -0
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +17 -0
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/settings.d.ts +3 -0
- package/dist/src/config/settings.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/a2a-server.mjs
CHANGED
|
@@ -155,7 +155,7 @@ var require_has_flag = __commonJS({
|
|
|
155
155
|
var require_supports_colors = __commonJS({
|
|
156
156
|
"node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
|
|
157
157
|
"use strict";
|
|
158
|
-
var
|
|
158
|
+
var os28 = __require("os");
|
|
159
159
|
var hasFlag = require_has_flag();
|
|
160
160
|
var env2 = process.env;
|
|
161
161
|
var forceColor = void 0;
|
|
@@ -193,7 +193,7 @@ var require_supports_colors = __commonJS({
|
|
|
193
193
|
}
|
|
194
194
|
var min = forceColor ? 1 : 0;
|
|
195
195
|
if (process.platform === "win32") {
|
|
196
|
-
var osRelease =
|
|
196
|
+
var osRelease = os28.release().split(".");
|
|
197
197
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
198
198
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
199
199
|
}
|
|
@@ -5439,7 +5439,7 @@ var require_winston_transport = __commonJS({
|
|
|
5439
5439
|
var require_console = __commonJS({
|
|
5440
5440
|
"node_modules/winston/lib/winston/transports/console.js"(exports2, module2) {
|
|
5441
5441
|
"use strict";
|
|
5442
|
-
var
|
|
5442
|
+
var os28 = __require("os");
|
|
5443
5443
|
var { LEVEL, MESSAGE } = require_triple_beam();
|
|
5444
5444
|
var TransportStream = require_winston_transport();
|
|
5445
5445
|
module2.exports = class Console extends TransportStream {
|
|
@@ -5453,7 +5453,7 @@ var require_console = __commonJS({
|
|
|
5453
5453
|
this.name = options.name || "console";
|
|
5454
5454
|
this.stderrLevels = this._stringArrayToSet(options.stderrLevels);
|
|
5455
5455
|
this.consoleWarnLevels = this._stringArrayToSet(options.consoleWarnLevels);
|
|
5456
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
5456
|
+
this.eol = typeof options.eol === "string" ? options.eol : os28.EOL;
|
|
5457
5457
|
this.forceConsole = options.forceConsole || false;
|
|
5458
5458
|
this._consoleLog = console.log.bind(console);
|
|
5459
5459
|
this._consoleWarn = console.warn.bind(console);
|
|
@@ -8310,7 +8310,7 @@ var require_file = __commonJS({
|
|
|
8310
8310
|
var { Stream: Stream4, PassThrough: PassThrough6 } = require_readable();
|
|
8311
8311
|
var TransportStream = require_winston_transport();
|
|
8312
8312
|
var debug2 = require_node2()("winston:file");
|
|
8313
|
-
var
|
|
8313
|
+
var os28 = __require("os");
|
|
8314
8314
|
var tailFile = require_tail_file();
|
|
8315
8315
|
module2.exports = class File extends TransportStream {
|
|
8316
8316
|
/**
|
|
@@ -8348,7 +8348,7 @@ var require_file = __commonJS({
|
|
|
8348
8348
|
this.rotationFormat = options.rotationFormat || false;
|
|
8349
8349
|
this.zippedArchive = options.zippedArchive || false;
|
|
8350
8350
|
this.maxFiles = options.maxFiles || null;
|
|
8351
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
8351
|
+
this.eol = typeof options.eol === "string" ? options.eol : os28.EOL;
|
|
8352
8352
|
this.tailable = options.tailable || false;
|
|
8353
8353
|
this.lazy = options.lazy || false;
|
|
8354
8354
|
this._size = 0;
|
|
@@ -9129,7 +9129,7 @@ var require_stream2 = __commonJS({
|
|
|
9129
9129
|
"use strict";
|
|
9130
9130
|
var isStream4 = require_is_stream();
|
|
9131
9131
|
var { MESSAGE } = require_triple_beam();
|
|
9132
|
-
var
|
|
9132
|
+
var os28 = __require("os");
|
|
9133
9133
|
var TransportStream = require_winston_transport();
|
|
9134
9134
|
module2.exports = class Stream extends TransportStream {
|
|
9135
9135
|
/**
|
|
@@ -9145,7 +9145,7 @@ var require_stream2 = __commonJS({
|
|
|
9145
9145
|
this._stream = options.stream;
|
|
9146
9146
|
this._stream.setMaxListeners(Infinity);
|
|
9147
9147
|
this.isObjectMode = options.stream._writableState.objectMode;
|
|
9148
|
-
this.eol = typeof options.eol === "string" ? options.eol :
|
|
9148
|
+
this.eol = typeof options.eol === "string" ? options.eol : os28.EOL;
|
|
9149
9149
|
}
|
|
9150
9150
|
/**
|
|
9151
9151
|
* Core logging method exposed to Winston.
|
|
@@ -9528,7 +9528,7 @@ var require_exception_stream = __commonJS({
|
|
|
9528
9528
|
var require_exception_handler = __commonJS({
|
|
9529
9529
|
"node_modules/winston/lib/winston/exception-handler.js"(exports2, module2) {
|
|
9530
9530
|
"use strict";
|
|
9531
|
-
var
|
|
9531
|
+
var os28 = __require("os");
|
|
9532
9532
|
var asyncForEach = require_forEach();
|
|
9533
9533
|
var debug2 = require_node2()("winston:exception");
|
|
9534
9534
|
var once10 = require_one_time();
|
|
@@ -9623,8 +9623,8 @@ var require_exception_handler = __commonJS({
|
|
|
9623
9623
|
*/
|
|
9624
9624
|
getOsInfo() {
|
|
9625
9625
|
return {
|
|
9626
|
-
loadavg:
|
|
9627
|
-
uptime:
|
|
9626
|
+
loadavg: os28.loadavg(),
|
|
9627
|
+
uptime: os28.uptime()
|
|
9628
9628
|
};
|
|
9629
9629
|
}
|
|
9630
9630
|
/**
|
|
@@ -9766,7 +9766,7 @@ var require_rejection_stream = __commonJS({
|
|
|
9766
9766
|
var require_rejection_handler = __commonJS({
|
|
9767
9767
|
"node_modules/winston/lib/winston/rejection-handler.js"(exports2, module2) {
|
|
9768
9768
|
"use strict";
|
|
9769
|
-
var
|
|
9769
|
+
var os28 = __require("os");
|
|
9770
9770
|
var asyncForEach = require_forEach();
|
|
9771
9771
|
var debug2 = require_node2()("winston:rejection");
|
|
9772
9772
|
var once10 = require_one_time();
|
|
@@ -9863,8 +9863,8 @@ var require_rejection_handler = __commonJS({
|
|
|
9863
9863
|
*/
|
|
9864
9864
|
getOsInfo() {
|
|
9865
9865
|
return {
|
|
9866
|
-
loadavg:
|
|
9867
|
-
uptime:
|
|
9866
|
+
loadavg: os28.loadavg(),
|
|
9867
|
+
uptime: os28.uptime()
|
|
9868
9868
|
};
|
|
9869
9869
|
}
|
|
9870
9870
|
/**
|
|
@@ -11132,7 +11132,7 @@ var require_has_flag2 = __commonJS({
|
|
|
11132
11132
|
var require_supports_color = __commonJS({
|
|
11133
11133
|
"node_modules/supports-color/index.js"(exports2, module2) {
|
|
11134
11134
|
"use strict";
|
|
11135
|
-
var
|
|
11135
|
+
var os28 = __require("os");
|
|
11136
11136
|
var hasFlag = require_has_flag2();
|
|
11137
11137
|
var env2 = process.env;
|
|
11138
11138
|
var forceColor;
|
|
@@ -11170,7 +11170,7 @@ var require_supports_color = __commonJS({
|
|
|
11170
11170
|
}
|
|
11171
11171
|
const min = forceColor ? 1 : 0;
|
|
11172
11172
|
if (process.platform === "win32") {
|
|
11173
|
-
const osRelease =
|
|
11173
|
+
const osRelease = os28.release().split(".");
|
|
11174
11174
|
if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
11175
11175
|
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
11176
11176
|
}
|
|
@@ -50446,7 +50446,7 @@ var require_googleauth = __commonJS({
|
|
|
50446
50446
|
var child_process_1 = __require("child_process");
|
|
50447
50447
|
var fs70 = __require("fs");
|
|
50448
50448
|
var gcpMetadata = require_src4();
|
|
50449
|
-
var
|
|
50449
|
+
var os28 = __require("os");
|
|
50450
50450
|
var path85 = __require("path");
|
|
50451
50451
|
var crypto_1 = require_crypto3();
|
|
50452
50452
|
var transporters_1 = require_transporters();
|
|
@@ -50887,7 +50887,7 @@ var require_googleauth = __commonJS({
|
|
|
50887
50887
|
* @api private
|
|
50888
50888
|
*/
|
|
50889
50889
|
_isWindows() {
|
|
50890
|
-
const sys =
|
|
50890
|
+
const sys = os28.platform();
|
|
50891
50891
|
if (sys && sys.length >= 3) {
|
|
50892
50892
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
50893
50893
|
return true;
|
|
@@ -69430,7 +69430,7 @@ var require_util4 = __commonJS({
|
|
|
69430
69430
|
exports2.isValidFile = isValidFile;
|
|
69431
69431
|
exports2.getWellKnownCertificateConfigFileLocation = getWellKnownCertificateConfigFileLocation;
|
|
69432
69432
|
var fs70 = __require("fs");
|
|
69433
|
-
var
|
|
69433
|
+
var os28 = __require("os");
|
|
69434
69434
|
var path85 = __require("path");
|
|
69435
69435
|
var WELL_KNOWN_CERTIFICATE_CONFIG_FILE = "certificate_config.json";
|
|
69436
69436
|
var CLOUDSDK_CONFIG_DIRECTORY = "gcloud";
|
|
@@ -69528,7 +69528,7 @@ var require_util4 = __commonJS({
|
|
|
69528
69528
|
return path85.join(configDir, WELL_KNOWN_CERTIFICATE_CONFIG_FILE);
|
|
69529
69529
|
}
|
|
69530
69530
|
function _isWindows() {
|
|
69531
|
-
return
|
|
69531
|
+
return os28.platform().startsWith("win");
|
|
69532
69532
|
}
|
|
69533
69533
|
}
|
|
69534
69534
|
});
|
|
@@ -74300,7 +74300,7 @@ var require_googleauth2 = __commonJS({
|
|
|
74300
74300
|
var fs70 = __require("fs");
|
|
74301
74301
|
var gaxios_1 = require_src12();
|
|
74302
74302
|
var gcpMetadata = require_src14();
|
|
74303
|
-
var
|
|
74303
|
+
var os28 = __require("os");
|
|
74304
74304
|
var path85 = __require("path");
|
|
74305
74305
|
var crypto_1 = require_crypto6();
|
|
74306
74306
|
var computeclient_1 = require_computeclient2();
|
|
@@ -74803,7 +74803,7 @@ var require_googleauth2 = __commonJS({
|
|
|
74803
74803
|
* @api private
|
|
74804
74804
|
*/
|
|
74805
74805
|
_isWindows() {
|
|
74806
|
-
const sys =
|
|
74806
|
+
const sys = os28.platform();
|
|
74807
74807
|
if (sys && sys.length >= 3) {
|
|
74808
74808
|
if (sys.substring(0, 3).toLowerCase() === "win") {
|
|
74809
74809
|
return true;
|
|
@@ -95777,12 +95777,12 @@ var require_proper_lockfile = __commonJS({
|
|
|
95777
95777
|
var lockfile = require_lockfile();
|
|
95778
95778
|
var { toPromise, toSync, toSyncOptions } = require_adapter();
|
|
95779
95779
|
async function lock2(file, options) {
|
|
95780
|
-
const
|
|
95781
|
-
return toPromise(
|
|
95780
|
+
const release3 = await toPromise(lockfile.lock)(file, options);
|
|
95781
|
+
return toPromise(release3);
|
|
95782
95782
|
}
|
|
95783
95783
|
function lockSync(file, options) {
|
|
95784
|
-
const
|
|
95785
|
-
return toSync(
|
|
95784
|
+
const release3 = toSync(lockfile.lock)(file, toSyncOptions(options));
|
|
95785
|
+
return toSync(release3);
|
|
95786
95786
|
}
|
|
95787
95787
|
function unlock(file, options) {
|
|
95788
95788
|
return toPromise(lockfile.unlock)(file, options);
|
|
@@ -95939,7 +95939,7 @@ var init_projectRegistry = __esm({
|
|
|
95939
95939
|
if (!fs13.existsSync(this.registryPath)) {
|
|
95940
95940
|
await this.save({ projects: {} });
|
|
95941
95941
|
}
|
|
95942
|
-
const
|
|
95942
|
+
const release3 = await (0, import_proper_lockfile.lock)(this.registryPath, {
|
|
95943
95943
|
retries: {
|
|
95944
95944
|
retries: Math.floor(LOCK_TIMEOUT_MS / LOCK_RETRY_DELAY_MS),
|
|
95945
95945
|
minTimeout: LOCK_RETRY_DELAY_MS
|
|
@@ -95964,7 +95964,7 @@ var init_projectRegistry = __esm({
|
|
|
95964
95964
|
await this.save(currentData);
|
|
95965
95965
|
return shortId;
|
|
95966
95966
|
} finally {
|
|
95967
|
-
await
|
|
95967
|
+
await release3();
|
|
95968
95968
|
}
|
|
95969
95969
|
}
|
|
95970
95970
|
async verifySlugOwnership(slug, projectPath) {
|
|
@@ -112977,6 +112977,19 @@ function recordLinesChanged(config3, lines, changeType, attributes) {
|
|
|
112977
112977
|
...attributes ?? {}
|
|
112978
112978
|
});
|
|
112979
112979
|
}
|
|
112980
|
+
function recordOnboardingStart(config3) {
|
|
112981
|
+
if (!onboardingStartCounter || !isMetricsInitialized)
|
|
112982
|
+
return;
|
|
112983
|
+
onboardingStartCounter.add(1, baseMetricDefinition.getCommonAttributes(config3));
|
|
112984
|
+
}
|
|
112985
|
+
function recordOnboardingSuccess(config3, userTier) {
|
|
112986
|
+
if (!onboardingSuccessCounter || !isMetricsInitialized)
|
|
112987
|
+
return;
|
|
112988
|
+
onboardingSuccessCounter.add(1, {
|
|
112989
|
+
...baseMetricDefinition.getCommonAttributes(config3),
|
|
112990
|
+
...userTier && { user_tier: userTier }
|
|
112991
|
+
});
|
|
112992
|
+
}
|
|
112980
112993
|
function recordPlanExecution(config3, attributes) {
|
|
112981
112994
|
if (!planExecutionCounter || !isMetricsInitialized)
|
|
112982
112995
|
return;
|
|
@@ -113200,7 +113213,7 @@ function recordTokenStorageInitialization(config3, event) {
|
|
|
113200
113213
|
forced: event.forced
|
|
113201
113214
|
});
|
|
113202
113215
|
}
|
|
113203
|
-
var EVENT_CHAT_COMPRESSION, TOOL_CALL_COUNT, TOOL_CALL_LATENCY, API_REQUEST_COUNT, API_REQUEST_LATENCY, TOKEN_USAGE, SESSION_COUNT, FILE_OPERATION_COUNT, LINES_CHANGED, INVALID_CHUNK_COUNT, CONTENT_RETRY_COUNT, CONTENT_RETRY_FAILURE_COUNT, NETWORK_RETRY_COUNT, MODEL_ROUTING_LATENCY, MODEL_ROUTING_FAILURE_COUNT, MODEL_SLASH_COMMAND_CALL_COUNT, EVENT_HOOK_CALL_COUNT, EVENT_HOOK_CALL_LATENCY, KEYCHAIN_AVAILABILITY_COUNT, TOKEN_STORAGE_TYPE_COUNT, OVERAGE_OPTION_COUNT, CREDIT_PURCHASE_COUNT, AGENT_RUN_COUNT, AGENT_DURATION_MS, AGENT_TURNS, AGENT_RECOVERY_ATTEMPT_COUNT, AGENT_RECOVERY_ATTEMPT_DURATION, GEN_AI_CLIENT_TOKEN_USAGE, GEN_AI_CLIENT_OPERATION_DURATION, STARTUP_TIME, MEMORY_USAGE, CPU_USAGE, TOOL_QUEUE_DEPTH, TOOL_EXECUTION_BREAKDOWN, TOKEN_EFFICIENCY, API_REQUEST_BREAKDOWN, PERFORMANCE_SCORE, REGRESSION_DETECTION, REGRESSION_PERCENTAGE_CHANGE, BASELINE_COMPARISON, FLICKER_FRAME_COUNT, SLOW_RENDER_LATENCY, EXIT_FAIL_COUNT, PLAN_EXECUTION_COUNT, baseMetricDefinition, COUNTER_DEFINITIONS, HISTOGRAM_DEFINITIONS, PERFORMANCE_COUNTER_DEFINITIONS, PERFORMANCE_HISTOGRAM_DEFINITIONS, FileOperation, PerformanceMetricType, MemoryMetricType, ToolExecutionPhase, ApiRequestPhase, GenAiOperationName, GenAiProviderName, GenAiTokenType, cliMeter, toolCallCounter, toolCallLatencyHistogram, apiRequestCounter, apiRequestLatencyHistogram, tokenUsageCounter, sessionCounter, fileOperationCounter, linesChangedCounter, chatCompressionCounter, invalidChunkCounter, contentRetryCounter, contentRetryFailureCounter, networkRetryCounter, modelRoutingLatencyHistogram, modelRoutingFailureCounter, modelSlashCommandCallCounter, agentRunCounter, agentDurationHistogram, agentTurnsHistogram, agentRecoveryAttemptCounter, agentRecoveryAttemptDurationHistogram, flickerFrameCounter, exitFailCounter, planExecutionCounter, slowRenderHistogram, hookCallCounter, hookCallLatencyHistogram, keychainAvailabilityCounter, tokenStorageTypeCounter, overageOptionCounter, creditPurchaseCounter, genAiClientTokenUsageHistogram, genAiClientOperationDurationHistogram, startupTimeHistogram, memoryUsageGauge, cpuUsageGauge, toolQueueDepthGauge, toolExecutionBreakdownHistogram, tokenEfficiencyHistogram, apiRequestBreakdownHistogram, performanceScoreGauge, regressionDetectionCounter, regressionPercentageChangeHistogram, baselineComparisonHistogram, isMetricsInitialized, isPerformanceMonitoringEnabled;
|
|
113216
|
+
var EVENT_CHAT_COMPRESSION, TOOL_CALL_COUNT, TOOL_CALL_LATENCY, API_REQUEST_COUNT, API_REQUEST_LATENCY, TOKEN_USAGE, SESSION_COUNT, FILE_OPERATION_COUNT, LINES_CHANGED, INVALID_CHUNK_COUNT, CONTENT_RETRY_COUNT, CONTENT_RETRY_FAILURE_COUNT, NETWORK_RETRY_COUNT, MODEL_ROUTING_LATENCY, MODEL_ROUTING_FAILURE_COUNT, MODEL_SLASH_COMMAND_CALL_COUNT, EVENT_HOOK_CALL_COUNT, EVENT_HOOK_CALL_LATENCY, KEYCHAIN_AVAILABILITY_COUNT, TOKEN_STORAGE_TYPE_COUNT, OVERAGE_OPTION_COUNT, CREDIT_PURCHASE_COUNT, EVENT_ONBOARDING_START, EVENT_ONBOARDING_SUCCESS, AGENT_RUN_COUNT, AGENT_DURATION_MS, AGENT_TURNS, AGENT_RECOVERY_ATTEMPT_COUNT, AGENT_RECOVERY_ATTEMPT_DURATION, GEN_AI_CLIENT_TOKEN_USAGE, GEN_AI_CLIENT_OPERATION_DURATION, STARTUP_TIME, MEMORY_USAGE, CPU_USAGE, TOOL_QUEUE_DEPTH, TOOL_EXECUTION_BREAKDOWN, TOKEN_EFFICIENCY, API_REQUEST_BREAKDOWN, PERFORMANCE_SCORE, REGRESSION_DETECTION, REGRESSION_PERCENTAGE_CHANGE, BASELINE_COMPARISON, FLICKER_FRAME_COUNT, SLOW_RENDER_LATENCY, EXIT_FAIL_COUNT, PLAN_EXECUTION_COUNT, baseMetricDefinition, COUNTER_DEFINITIONS, HISTOGRAM_DEFINITIONS, PERFORMANCE_COUNTER_DEFINITIONS, PERFORMANCE_HISTOGRAM_DEFINITIONS, FileOperation, PerformanceMetricType, MemoryMetricType, ToolExecutionPhase, ApiRequestPhase, GenAiOperationName, GenAiProviderName, GenAiTokenType, cliMeter, toolCallCounter, toolCallLatencyHistogram, apiRequestCounter, apiRequestLatencyHistogram, tokenUsageCounter, sessionCounter, fileOperationCounter, linesChangedCounter, chatCompressionCounter, invalidChunkCounter, contentRetryCounter, contentRetryFailureCounter, networkRetryCounter, modelRoutingLatencyHistogram, modelRoutingFailureCounter, modelSlashCommandCallCounter, agentRunCounter, agentDurationHistogram, agentTurnsHistogram, agentRecoveryAttemptCounter, agentRecoveryAttemptDurationHistogram, flickerFrameCounter, exitFailCounter, planExecutionCounter, slowRenderHistogram, hookCallCounter, hookCallLatencyHistogram, keychainAvailabilityCounter, tokenStorageTypeCounter, overageOptionCounter, creditPurchaseCounter, onboardingStartCounter, onboardingSuccessCounter, genAiClientTokenUsageHistogram, genAiClientOperationDurationHistogram, startupTimeHistogram, memoryUsageGauge, cpuUsageGauge, toolQueueDepthGauge, toolExecutionBreakdownHistogram, tokenEfficiencyHistogram, apiRequestBreakdownHistogram, performanceScoreGauge, regressionDetectionCounter, regressionPercentageChangeHistogram, baselineComparisonHistogram, isMetricsInitialized, isPerformanceMonitoringEnabled;
|
|
113204
113217
|
var init_metrics2 = __esm({
|
|
113205
113218
|
"packages/core/dist/src/telemetry/metrics.js"() {
|
|
113206
113219
|
"use strict";
|
|
@@ -113231,6 +113244,8 @@ var init_metrics2 = __esm({
|
|
|
113231
113244
|
TOKEN_STORAGE_TYPE_COUNT = "gemini_cli.token_storage.type.count";
|
|
113232
113245
|
OVERAGE_OPTION_COUNT = "gemini_cli.overage_option.count";
|
|
113233
113246
|
CREDIT_PURCHASE_COUNT = "gemini_cli.credit_purchase.count";
|
|
113247
|
+
EVENT_ONBOARDING_START = "gemini_cli.onboarding.start";
|
|
113248
|
+
EVENT_ONBOARDING_SUCCESS = "gemini_cli.onboarding.success";
|
|
113234
113249
|
AGENT_RUN_COUNT = "gemini_cli.agent.run.count";
|
|
113235
113250
|
AGENT_DURATION_MS = "gemini_cli.agent.duration";
|
|
113236
113251
|
AGENT_TURNS = "gemini_cli.agent.turns";
|
|
@@ -113411,6 +113426,18 @@ var init_metrics2 = __esm({
|
|
|
113411
113426
|
assign: (c4) => creditPurchaseCounter = c4,
|
|
113412
113427
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
113413
113428
|
attributes: {}
|
|
113429
|
+
},
|
|
113430
|
+
[EVENT_ONBOARDING_START]: {
|
|
113431
|
+
description: "Counts onboarding started",
|
|
113432
|
+
valueType: ValueType.INT,
|
|
113433
|
+
assign: (c4) => onboardingStartCounter = c4,
|
|
113434
|
+
attributes: {}
|
|
113435
|
+
},
|
|
113436
|
+
[EVENT_ONBOARDING_SUCCESS]: {
|
|
113437
|
+
description: "Counts onboarding succeeded",
|
|
113438
|
+
valueType: ValueType.INT,
|
|
113439
|
+
assign: (c4) => onboardingSuccessCounter = c4,
|
|
113440
|
+
attributes: {}
|
|
113414
113441
|
}
|
|
113415
113442
|
};
|
|
113416
113443
|
HISTOGRAM_DEFINITIONS = {
|
|
@@ -116169,7 +116196,7 @@ function makeChatCompressionEvent({ tokens_before, tokens_after }) {
|
|
|
116169
116196
|
}
|
|
116170
116197
|
};
|
|
116171
116198
|
}
|
|
116172
|
-
var EVENT_TOOL_CALL, ToolCallEvent, EVENT_API_REQUEST, ApiRequestEvent, EVENT_API_ERROR, ApiErrorEvent, EVENT_API_RESPONSE, EVENT_GEN_AI_OPERATION_DETAILS, ApiResponseEvent, EVENT_FLASH_FALLBACK, FlashFallbackEvent, EVENT_RIPGREP_FALLBACK, RipgrepFallbackEvent, LoopType, LoopDetectedEvent, LoopDetectionDisabledEvent, EVENT_NEXT_SPEAKER_CHECK, NextSpeakerCheckEvent, EVENT_CONSECA_POLICY_GENERATION, ConsecaPolicyGenerationEvent, EVENT_CONSECA_VERDICT, ConsecaVerdictEvent, SlashCommandStatus, EVENT_CHAT_COMPRESSION2, EVENT_MALFORMED_JSON_RESPONSE, MalformedJsonResponseEvent, IdeConnectionType, EVENT_FILE_OPERATION, FileOperationEvent, EVENT_INVALID_CHUNK, InvalidChunkEvent, EVENT_CONTENT_RETRY, ContentRetryEvent, EVENT_CONTENT_RETRY_FAILURE, EVENT_NETWORK_RETRY_ATTEMPT, NetworkRetryAttemptEvent, ContentRetryFailureEvent, EVENT_MODEL_ROUTING, ModelRoutingEvent, EVENT_TOOL_OUTPUT_TRUNCATED, ToolOutputTruncatedEvent, EVENT_TOOL_OUTPUT_MASKING, ToolOutputMaskingEvent, EVENT_LLM_LOOP_CHECK, LlmLoopCheckEvent, EVENT_EDIT_STRATEGY, EditStrategyEvent, EVENT_EDIT_CORRECTION, EditCorrectionEvent, EVENT_STARTUP_STATS, StartupStatsEvent, BaseAgentEvent, EVENT_AGENT_START, AgentStartEvent, EVENT_AGENT_FINISH, AgentFinishEvent, EVENT_AGENT_RECOVERY_ATTEMPT, RecoveryAttemptEvent, EVENT_WEB_FETCH_FALLBACK_ATTEMPT, WebFetchFallbackAttemptEvent, EVENT_HOOK_CALL, EVENT_APPROVAL_MODE_SWITCH, ApprovalModeSwitchEvent, EVENT_APPROVAL_MODE_DURATION, ApprovalModeDurationEvent, EVENT_PLAN_EXECUTION, PlanExecutionEvent, HookCallEvent, EVENT_KEYCHAIN_AVAILABILITY, KeychainAvailabilityEvent, EVENT_TOKEN_STORAGE_INITIALIZATION, TokenStorageInitializationEvent;
|
|
116199
|
+
var EVENT_TOOL_CALL, ToolCallEvent, EVENT_API_REQUEST, ApiRequestEvent, EVENT_API_ERROR, ApiErrorEvent, EVENT_API_RESPONSE, EVENT_GEN_AI_OPERATION_DETAILS, ApiResponseEvent, EVENT_FLASH_FALLBACK, FlashFallbackEvent, EVENT_RIPGREP_FALLBACK, RipgrepFallbackEvent, LoopType, LoopDetectedEvent, LoopDetectionDisabledEvent, EVENT_NEXT_SPEAKER_CHECK, NextSpeakerCheckEvent, EVENT_CONSECA_POLICY_GENERATION, ConsecaPolicyGenerationEvent, EVENT_CONSECA_VERDICT, ConsecaVerdictEvent, SlashCommandStatus, EVENT_CHAT_COMPRESSION2, EVENT_MALFORMED_JSON_RESPONSE, MalformedJsonResponseEvent, IdeConnectionType, EVENT_FILE_OPERATION, FileOperationEvent, EVENT_INVALID_CHUNK, InvalidChunkEvent, EVENT_CONTENT_RETRY, ContentRetryEvent, EVENT_CONTENT_RETRY_FAILURE, EVENT_NETWORK_RETRY_ATTEMPT, NetworkRetryAttemptEvent, ContentRetryFailureEvent, EVENT_MODEL_ROUTING, ModelRoutingEvent, EVENT_TOOL_OUTPUT_TRUNCATED, ToolOutputTruncatedEvent, EVENT_TOOL_OUTPUT_MASKING, ToolOutputMaskingEvent, EVENT_LLM_LOOP_CHECK, LlmLoopCheckEvent, EVENT_EDIT_STRATEGY, EditStrategyEvent, EVENT_EDIT_CORRECTION, EditCorrectionEvent, EVENT_STARTUP_STATS, StartupStatsEvent, BaseAgentEvent, EVENT_AGENT_START, AgentStartEvent, EVENT_AGENT_FINISH, AgentFinishEvent, EVENT_AGENT_RECOVERY_ATTEMPT, RecoveryAttemptEvent, EVENT_WEB_FETCH_FALLBACK_ATTEMPT, WebFetchFallbackAttemptEvent, EVENT_HOOK_CALL, EVENT_APPROVAL_MODE_SWITCH, ApprovalModeSwitchEvent, EVENT_APPROVAL_MODE_DURATION, ApprovalModeDurationEvent, EVENT_PLAN_EXECUTION, PlanExecutionEvent, HookCallEvent, EVENT_KEYCHAIN_AVAILABILITY, KeychainAvailabilityEvent, EVENT_ONBOARDING_START2, OnboardingStartEvent, EVENT_ONBOARDING_SUCCESS2, OnboardingSuccessEvent, EVENT_TOKEN_STORAGE_INITIALIZATION, TokenStorageInitializationEvent;
|
|
116173
116200
|
var init_types6 = __esm({
|
|
116174
116201
|
"packages/core/dist/src/telemetry/types.js"() {
|
|
116175
116202
|
"use strict";
|
|
@@ -117438,6 +117465,47 @@ var init_types6 = __esm({
|
|
|
117438
117465
|
return `Keychain availability: ${this.available}`;
|
|
117439
117466
|
}
|
|
117440
117467
|
};
|
|
117468
|
+
EVENT_ONBOARDING_START2 = "gemini_cli.onboarding.start";
|
|
117469
|
+
OnboardingStartEvent = class {
|
|
117470
|
+
"event.name";
|
|
117471
|
+
"event.timestamp";
|
|
117472
|
+
constructor() {
|
|
117473
|
+
this["event.name"] = "onboarding_start";
|
|
117474
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
117475
|
+
}
|
|
117476
|
+
toOpenTelemetryAttributes(config3) {
|
|
117477
|
+
return {
|
|
117478
|
+
...getCommonAttributes(config3),
|
|
117479
|
+
"event.name": EVENT_ONBOARDING_START2,
|
|
117480
|
+
"event.timestamp": this["event.timestamp"]
|
|
117481
|
+
};
|
|
117482
|
+
}
|
|
117483
|
+
toLogBody() {
|
|
117484
|
+
return "Onboarding started.";
|
|
117485
|
+
}
|
|
117486
|
+
};
|
|
117487
|
+
EVENT_ONBOARDING_SUCCESS2 = "gemini_cli.onboarding.success";
|
|
117488
|
+
OnboardingSuccessEvent = class {
|
|
117489
|
+
"event.name";
|
|
117490
|
+
"event.timestamp";
|
|
117491
|
+
userTier;
|
|
117492
|
+
constructor(userTier) {
|
|
117493
|
+
this["event.name"] = "onboarding_success";
|
|
117494
|
+
this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
|
|
117495
|
+
this.userTier = userTier;
|
|
117496
|
+
}
|
|
117497
|
+
toOpenTelemetryAttributes(config3) {
|
|
117498
|
+
return {
|
|
117499
|
+
...getCommonAttributes(config3),
|
|
117500
|
+
"event.name": EVENT_ONBOARDING_SUCCESS2,
|
|
117501
|
+
"event.timestamp": this["event.timestamp"],
|
|
117502
|
+
user_tier: this.userTier ?? ""
|
|
117503
|
+
};
|
|
117504
|
+
}
|
|
117505
|
+
toLogBody() {
|
|
117506
|
+
return `Onboarding succeeded.${this.userTier ? ` Tier: ${this.userTier}` : ""}`;
|
|
117507
|
+
}
|
|
117508
|
+
};
|
|
117441
117509
|
EVENT_TOKEN_STORAGE_INITIALIZATION = "gemini_cli.token_storage.initialization";
|
|
117442
117510
|
TokenStorageInitializationEvent = class {
|
|
117443
117511
|
"event.name";
|
|
@@ -122188,7 +122256,7 @@ var require_service_config = __commonJS({
|
|
|
122188
122256
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
122189
122257
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
122190
122258
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
122191
|
-
var
|
|
122259
|
+
var os28 = __require("os");
|
|
122192
122260
|
var constants_1 = require_constants3();
|
|
122193
122261
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
122194
122262
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -122487,7 +122555,7 @@ var require_service_config = __commonJS({
|
|
|
122487
122555
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
122488
122556
|
let hostnameMatched = false;
|
|
122489
122557
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
122490
|
-
if (hostname3 ===
|
|
122558
|
+
if (hostname3 === os28.hostname()) {
|
|
122491
122559
|
hostnameMatched = true;
|
|
122492
122560
|
}
|
|
122493
122561
|
}
|
|
@@ -136008,7 +136076,7 @@ var require_subchannel_call = __commonJS({
|
|
|
136008
136076
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
136009
136077
|
exports2.Http2SubchannelCall = void 0;
|
|
136010
136078
|
var http22 = __require("http2");
|
|
136011
|
-
var
|
|
136079
|
+
var os28 = __require("os");
|
|
136012
136080
|
var constants_1 = require_constants3();
|
|
136013
136081
|
var metadata_1 = require_metadata4();
|
|
136014
136082
|
var stream_decoder_1 = require_stream_decoder();
|
|
@@ -136016,7 +136084,7 @@ var require_subchannel_call = __commonJS({
|
|
|
136016
136084
|
var constants_2 = require_constants3();
|
|
136017
136085
|
var TRACER_NAME2 = "subchannel_call";
|
|
136018
136086
|
function getSystemErrorName(errno) {
|
|
136019
|
-
for (const [name3, num] of Object.entries(
|
|
136087
|
+
for (const [name3, num] of Object.entries(os28.constants.errno)) {
|
|
136020
136088
|
if (num === errno) {
|
|
136021
136089
|
return name3;
|
|
136022
136090
|
}
|
|
@@ -156400,7 +156468,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
156400
156468
|
exports2.processDetector = void 0;
|
|
156401
156469
|
var api_1 = (init_esm(), __toCommonJS(esm_exports2));
|
|
156402
156470
|
var semconv_1 = require_semconv2();
|
|
156403
|
-
var
|
|
156471
|
+
var os28 = __require("os");
|
|
156404
156472
|
var ProcessDetector = class {
|
|
156405
156473
|
detect(_config) {
|
|
156406
156474
|
const attributes = {
|
|
@@ -156420,7 +156488,7 @@ var require_ProcessDetector = __commonJS({
|
|
|
156420
156488
|
attributes[semconv_1.ATTR_PROCESS_COMMAND] = process.argv[1];
|
|
156421
156489
|
}
|
|
156422
156490
|
try {
|
|
156423
|
-
const userInfo2 =
|
|
156491
|
+
const userInfo2 = os28.userInfo();
|
|
156424
156492
|
attributes[semconv_1.ATTR_PROCESS_OWNER] = userInfo2.username;
|
|
156425
156493
|
} catch (e3) {
|
|
156426
156494
|
api_1.diag.debug(`error obtaining process owner: ${e3}`);
|
|
@@ -175930,7 +175998,7 @@ var require_package8 = __commonJS({
|
|
|
175930
175998
|
var require_util11 = __commonJS({
|
|
175931
175999
|
"node_modules/systeminformation/lib/util.js"(exports2) {
|
|
175932
176000
|
"use strict";
|
|
175933
|
-
var
|
|
176001
|
+
var os28 = __require("os");
|
|
175934
176002
|
var fs70 = __require("fs");
|
|
175935
176003
|
var path85 = __require("path");
|
|
175936
176004
|
var spawn10 = __require("child_process").spawn;
|
|
@@ -176037,7 +176105,7 @@ var require_util11 = __commonJS({
|
|
|
176037
176105
|
}
|
|
176038
176106
|
function cores() {
|
|
176039
176107
|
if (_cores === 0) {
|
|
176040
|
-
_cores =
|
|
176108
|
+
_cores = os28.cpus().length;
|
|
176041
176109
|
}
|
|
176042
176110
|
return _cores;
|
|
176043
176111
|
}
|
|
@@ -176298,7 +176366,7 @@ var require_util11 = __commonJS({
|
|
|
176298
176366
|
function powerShellRelease() {
|
|
176299
176367
|
try {
|
|
176300
176368
|
if (_psChild) {
|
|
176301
|
-
_psChild.stdin.write("exit" +
|
|
176369
|
+
_psChild.stdin.write("exit" + os28.EOL);
|
|
176302
176370
|
_psChild.stdin.end();
|
|
176303
176371
|
}
|
|
176304
176372
|
} catch {
|
|
@@ -176325,7 +176393,7 @@ var require_util11 = __commonJS({
|
|
|
176325
176393
|
});
|
|
176326
176394
|
try {
|
|
176327
176395
|
if (_psChild && _psChild.pid) {
|
|
176328
|
-
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " +
|
|
176396
|
+
_psChild.stdin.write(_psToUTF8 + "echo " + _psCmdStart + id + _psIdSeperator + "; " + os28.EOL + cmd + os28.EOL + "echo " + _psCmdSeperator + os28.EOL);
|
|
176329
176397
|
}
|
|
176330
176398
|
} catch {
|
|
176331
176399
|
resolve21("");
|
|
@@ -176337,7 +176405,7 @@ var require_util11 = __commonJS({
|
|
|
176337
176405
|
return new Promise((resolve21) => {
|
|
176338
176406
|
process.nextTick(() => {
|
|
176339
176407
|
try {
|
|
176340
|
-
const osVersion =
|
|
176408
|
+
const osVersion = os28.release().split(".").map(Number);
|
|
176341
176409
|
const spanOptions = osVersion[0] < 10 ? ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-NoExit", "-ExecutionPolicy", "Unrestricted", "-Command", "-"] : ["-NoProfile", "-NoLogo", "-InputFormat", "Text", "-ExecutionPolicy", "Unrestricted", "-Command", _psToUTF8 + cmd];
|
|
176342
176410
|
const child = spawn10(_powerShell, spanOptions, {
|
|
176343
176411
|
stdio: "pipe",
|
|
@@ -176369,8 +176437,8 @@ var require_util11 = __commonJS({
|
|
|
176369
176437
|
});
|
|
176370
176438
|
if (osVersion[0] < 10) {
|
|
176371
176439
|
try {
|
|
176372
|
-
child.stdin.write(_psToUTF8 + cmd +
|
|
176373
|
-
child.stdin.write("exit" +
|
|
176440
|
+
child.stdin.write(_psToUTF8 + cmd + os28.EOL);
|
|
176441
|
+
child.stdin.write("exit" + os28.EOL);
|
|
176374
176442
|
child.stdin.end();
|
|
176375
176443
|
} catch {
|
|
176376
176444
|
child.kill();
|
|
@@ -178518,7 +178586,7 @@ var require_util11 = __commonJS({
|
|
|
178518
178586
|
var require_osinfo = __commonJS({
|
|
178519
178587
|
"node_modules/systeminformation/lib/osinfo.js"(exports2) {
|
|
178520
178588
|
"use strict";
|
|
178521
|
-
var
|
|
178589
|
+
var os28 = __require("os");
|
|
178522
178590
|
var fs70 = __require("fs");
|
|
178523
178591
|
var util5 = require_util11();
|
|
178524
178592
|
var exec3 = __require("child_process").exec;
|
|
@@ -178541,14 +178609,14 @@ var require_osinfo = __commonJS({
|
|
|
178541
178609
|
}
|
|
178542
178610
|
const result2 = {
|
|
178543
178611
|
current: Date.now(),
|
|
178544
|
-
uptime:
|
|
178612
|
+
uptime: os28.uptime(),
|
|
178545
178613
|
timezone: t3.length >= 7 ? t3[5] : "",
|
|
178546
178614
|
timezoneName
|
|
178547
178615
|
};
|
|
178548
178616
|
if (_darwin || _linux) {
|
|
178549
178617
|
try {
|
|
178550
178618
|
const stdout = execSync4("date +%Z && date +%z && ls -l /etc/localtime 2>/dev/null", util5.execOptsLinux);
|
|
178551
|
-
const lines = stdout.toString().split(
|
|
178619
|
+
const lines = stdout.toString().split(os28.EOL);
|
|
178552
178620
|
if (lines.length > 3 && !lines[0]) {
|
|
178553
178621
|
lines.shift();
|
|
178554
178622
|
}
|
|
@@ -178558,7 +178626,7 @@ var require_osinfo = __commonJS({
|
|
|
178558
178626
|
}
|
|
178559
178627
|
return {
|
|
178560
178628
|
current: Date.now(),
|
|
178561
|
-
uptime:
|
|
178629
|
+
uptime: os28.uptime(),
|
|
178562
178630
|
timezone: lines[1] ? timezone + lines[1] : timezone,
|
|
178563
178631
|
timezoneName: lines[2] && lines[2].indexOf("/zoneinfo/") > 0 ? lines[2].split("/zoneinfo/")[1] || "" : ""
|
|
178564
178632
|
};
|
|
@@ -178677,11 +178745,11 @@ var require_osinfo = __commonJS({
|
|
|
178677
178745
|
return "";
|
|
178678
178746
|
}
|
|
178679
178747
|
function getFQDN() {
|
|
178680
|
-
let fqdn =
|
|
178748
|
+
let fqdn = os28.hostname;
|
|
178681
178749
|
if (_linux || _darwin) {
|
|
178682
178750
|
try {
|
|
178683
178751
|
const stdout = execSync4("hostname -f 2>/dev/null", util5.execOptsLinux);
|
|
178684
|
-
fqdn = stdout.toString().split(
|
|
178752
|
+
fqdn = stdout.toString().split(os28.EOL)[0];
|
|
178685
178753
|
} catch {
|
|
178686
178754
|
util5.noop();
|
|
178687
178755
|
}
|
|
@@ -178689,7 +178757,7 @@ var require_osinfo = __commonJS({
|
|
|
178689
178757
|
if (_freebsd || _openbsd || _netbsd) {
|
|
178690
178758
|
try {
|
|
178691
178759
|
const stdout = execSync4("hostname 2>/dev/null");
|
|
178692
|
-
fqdn = stdout.toString().split(
|
|
178760
|
+
fqdn = stdout.toString().split(os28.EOL)[0];
|
|
178693
178761
|
} catch {
|
|
178694
178762
|
util5.noop();
|
|
178695
178763
|
}
|
|
@@ -178697,7 +178765,7 @@ var require_osinfo = __commonJS({
|
|
|
178697
178765
|
if (_windows) {
|
|
178698
178766
|
try {
|
|
178699
178767
|
const stdout = execSync4("echo %COMPUTERNAME%.%USERDNSDOMAIN%", util5.execOptsWin);
|
|
178700
|
-
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(
|
|
178768
|
+
fqdn = stdout.toString().replace(".%USERDNSDOMAIN%", "").split(os28.EOL)[0];
|
|
178701
178769
|
} catch {
|
|
178702
178770
|
util5.noop();
|
|
178703
178771
|
}
|
|
@@ -178712,9 +178780,9 @@ var require_osinfo = __commonJS({
|
|
|
178712
178780
|
distro: "unknown",
|
|
178713
178781
|
release: "unknown",
|
|
178714
178782
|
codename: "",
|
|
178715
|
-
kernel:
|
|
178716
|
-
arch:
|
|
178717
|
-
hostname:
|
|
178783
|
+
kernel: os28.release(),
|
|
178784
|
+
arch: os28.arch(),
|
|
178785
|
+
hostname: os28.hostname(),
|
|
178718
178786
|
fqdn: getFQDN(),
|
|
178719
178787
|
codepage: "",
|
|
178720
178788
|
logofile: "",
|
|
@@ -178725,18 +178793,18 @@ var require_osinfo = __commonJS({
|
|
|
178725
178793
|
};
|
|
178726
178794
|
if (_linux) {
|
|
178727
178795
|
exec3("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release", (error2, stdout) => {
|
|
178728
|
-
let
|
|
178796
|
+
let release3 = {};
|
|
178729
178797
|
let lines = stdout.toString().split("\n");
|
|
178730
178798
|
lines.forEach((line) => {
|
|
178731
178799
|
if (line.indexOf("=") !== -1) {
|
|
178732
|
-
|
|
178800
|
+
release3[line.split("=")[0].trim().toUpperCase()] = line.split("=")[1].trim();
|
|
178733
178801
|
}
|
|
178734
178802
|
});
|
|
178735
|
-
result2.distro = (
|
|
178803
|
+
result2.distro = (release3.DISTRIB_ID || release3.NAME || "unknown").replace(/"/g, "");
|
|
178736
178804
|
result2.logofile = getLogoFile(result2.distro);
|
|
178737
|
-
let releaseVersion = (
|
|
178738
|
-
let codename = (
|
|
178739
|
-
const prettyName = (
|
|
178805
|
+
let releaseVersion = (release3.VERSION || "").replace(/"/g, "");
|
|
178806
|
+
let codename = (release3.DISTRIB_CODENAME || release3.VERSION_CODENAME || "").replace(/"/g, "");
|
|
178807
|
+
const prettyName = (release3.PRETTY_NAME || "").replace(/"/g, "");
|
|
178740
178808
|
if (prettyName.indexOf(result2.distro + " ") === 0) {
|
|
178741
178809
|
releaseVersion = prettyName.replace(result2.distro + " ", "").trim();
|
|
178742
178810
|
}
|
|
@@ -178744,10 +178812,10 @@ var require_osinfo = __commonJS({
|
|
|
178744
178812
|
codename = releaseVersion.split("(")[1].replace(/[()]/g, "").trim();
|
|
178745
178813
|
releaseVersion = releaseVersion.split("(")[0].trim();
|
|
178746
178814
|
}
|
|
178747
|
-
result2.release = (releaseVersion ||
|
|
178815
|
+
result2.release = (releaseVersion || release3.DISTRIB_RELEASE || release3.VERSION_ID || "unknown").replace(/"/g, "");
|
|
178748
178816
|
result2.codename = codename;
|
|
178749
178817
|
result2.codepage = util5.getCodepage();
|
|
178750
|
-
result2.build = (
|
|
178818
|
+
result2.build = (release3.BUILD_ID || "").replace(/"/g, "").trim();
|
|
178751
178819
|
isUefiLinux().then((uefi) => {
|
|
178752
178820
|
result2.uefi = uefi;
|
|
178753
178821
|
uuid2().then((data) => {
|
|
@@ -178765,14 +178833,14 @@ var require_osinfo = __commonJS({
|
|
|
178765
178833
|
let lines = stdout.toString().split("\n");
|
|
178766
178834
|
const distro = util5.getValue(lines, "kern.ostype");
|
|
178767
178835
|
const logofile = getLogoFile(distro);
|
|
178768
|
-
const
|
|
178836
|
+
const release3 = util5.getValue(lines, "kern.osrelease").split("-")[0];
|
|
178769
178837
|
const serial = util5.getValue(lines, "kern.uuid");
|
|
178770
178838
|
const bootmethod = util5.getValue(lines, "machdep.bootmethod");
|
|
178771
178839
|
const uefiConf = stdout.toString().indexOf("<type>efi</type>") >= 0;
|
|
178772
178840
|
const uefi = bootmethod ? bootmethod.toLowerCase().indexOf("uefi") >= 0 : uefiConf ? uefiConf : null;
|
|
178773
178841
|
result2.distro = distro || result2.distro;
|
|
178774
178842
|
result2.logofile = logofile || result2.logofile;
|
|
178775
|
-
result2.release =
|
|
178843
|
+
result2.release = release3 || result2.release;
|
|
178776
178844
|
result2.serial = serial || result2.serial;
|
|
178777
178845
|
result2.codename = "";
|
|
178778
178846
|
result2.codepage = util5.getCodepage();
|
|
@@ -178923,7 +178991,7 @@ var require_osinfo = __commonJS({
|
|
|
178923
178991
|
}
|
|
178924
178992
|
function versions(apps2, callback) {
|
|
178925
178993
|
let versionObject = {
|
|
178926
|
-
kernel:
|
|
178994
|
+
kernel: os28.release(),
|
|
178927
178995
|
apache: "",
|
|
178928
178996
|
bash: "",
|
|
178929
178997
|
bun: "",
|
|
@@ -179633,7 +179701,7 @@ var require_osinfo = __commonJS({
|
|
|
179633
179701
|
function getUniqueMacAdresses() {
|
|
179634
179702
|
let macs = [];
|
|
179635
179703
|
try {
|
|
179636
|
-
const ifaces =
|
|
179704
|
+
const ifaces = os28.networkInterfaces();
|
|
179637
179705
|
for (let dev in ifaces) {
|
|
179638
179706
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
179639
179707
|
ifaces[dev].forEach((details) => {
|
|
@@ -179755,7 +179823,7 @@ var require_system = __commonJS({
|
|
|
179755
179823
|
"node_modules/systeminformation/lib/system.js"(exports2) {
|
|
179756
179824
|
"use strict";
|
|
179757
179825
|
var fs70 = __require("fs");
|
|
179758
|
-
var
|
|
179826
|
+
var os28 = __require("os");
|
|
179759
179827
|
var util5 = require_util11();
|
|
179760
179828
|
var { uuid: uuid2 } = require_osinfo();
|
|
179761
179829
|
var exec3 = __require("child_process").exec;
|
|
@@ -179879,8 +179947,8 @@ var require_system = __commonJS({
|
|
|
179879
179947
|
util5.noop();
|
|
179880
179948
|
}
|
|
179881
179949
|
}
|
|
179882
|
-
if (!result2.virtual && (
|
|
179883
|
-
const kernelVersion = parseFloat(
|
|
179950
|
+
if (!result2.virtual && (os28.release().toLowerCase().indexOf("microsoft") >= 0 || os28.release().toLowerCase().endsWith("wsl2"))) {
|
|
179951
|
+
const kernelVersion = parseFloat(os28.release().toLowerCase());
|
|
179884
179952
|
result2.virtual = true;
|
|
179885
179953
|
result2.manufacturer = "Microsoft";
|
|
179886
179954
|
result2.model = "WSL";
|
|
@@ -180290,7 +180358,7 @@ var require_system = __commonJS({
|
|
|
180290
180358
|
result2.model = "Raspberry Pi";
|
|
180291
180359
|
result2.serial = rpi.serial;
|
|
180292
180360
|
result2.version = rpi.type + " - " + rpi.revision;
|
|
180293
|
-
result2.memMax =
|
|
180361
|
+
result2.memMax = os28.totalmem();
|
|
180294
180362
|
result2.memSlots = 0;
|
|
180295
180363
|
}
|
|
180296
180364
|
if (callback) {
|
|
@@ -180316,9 +180384,9 @@ var require_system = __commonJS({
|
|
|
180316
180384
|
}
|
|
180317
180385
|
devices.shift();
|
|
180318
180386
|
result2.memSlots = devices.length;
|
|
180319
|
-
if (
|
|
180387
|
+
if (os28.arch() === "arm64") {
|
|
180320
180388
|
result2.memSlots = 0;
|
|
180321
|
-
result2.memMax =
|
|
180389
|
+
result2.memMax = os28.totalmem();
|
|
180322
180390
|
}
|
|
180323
180391
|
if (callback) {
|
|
180324
180392
|
callback(result2);
|
|
@@ -180335,7 +180403,7 @@ var require_system = __commonJS({
|
|
|
180335
180403
|
if (_windows) {
|
|
180336
180404
|
try {
|
|
180337
180405
|
const workload = [];
|
|
180338
|
-
const win10plus = parseInt(
|
|
180406
|
+
const win10plus = parseInt(os28.release()) >= 10;
|
|
180339
180407
|
const maxCapacityAttribute = win10plus ? "MaxCapacityEx" : "MaxCapacity";
|
|
180340
180408
|
workload.push(util5.powerShell("Get-CimInstance Win32_baseboard | select Model,Manufacturer,Product,Version,SerialNumber,PartNumber,SKU | fl"));
|
|
180341
180409
|
workload.push(util5.powerShell(`Get-CimInstance Win32_physicalmemoryarray | select ${maxCapacityAttribute}, MemoryDevices | fl`));
|
|
@@ -180531,7 +180599,7 @@ var require_system = __commonJS({
|
|
|
180531
180599
|
var require_cpu = __commonJS({
|
|
180532
180600
|
"node_modules/systeminformation/lib/cpu.js"(exports2) {
|
|
180533
180601
|
"use strict";
|
|
180534
|
-
var
|
|
180602
|
+
var os28 = __require("os");
|
|
180535
180603
|
var exec3 = __require("child_process").exec;
|
|
180536
180604
|
var execSync4 = __require("child_process").execSync;
|
|
180537
180605
|
var fs70 = __require("fs");
|
|
@@ -181394,7 +181462,7 @@ var require_cpu = __commonJS({
|
|
|
181394
181462
|
const countProcessors = util5.getValue(lines, "hw.packages");
|
|
181395
181463
|
const countCores = util5.getValue(lines, "hw.physicalcpu_max");
|
|
181396
181464
|
const countThreads = util5.getValue(lines, "hw.ncpu");
|
|
181397
|
-
if (
|
|
181465
|
+
if (os28.arch() === "arm64") {
|
|
181398
181466
|
result2.socket = "SOC";
|
|
181399
181467
|
try {
|
|
181400
181468
|
const clusters = execSync4("ioreg -c IOPlatformDevice -d 3 -r | grep cluster-type").toString().split("\n");
|
|
@@ -181422,8 +181490,8 @@ var require_cpu = __commonJS({
|
|
|
181422
181490
|
if (_linux) {
|
|
181423
181491
|
let modelline = "";
|
|
181424
181492
|
let lines = [];
|
|
181425
|
-
if (
|
|
181426
|
-
modelline =
|
|
181493
|
+
if (os28.cpus()[0] && os28.cpus()[0].model) {
|
|
181494
|
+
modelline = os28.cpus()[0].model;
|
|
181427
181495
|
}
|
|
181428
181496
|
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', (error2, stdout) => {
|
|
181429
181497
|
if (!error2) {
|
|
@@ -181512,8 +181580,8 @@ var require_cpu = __commonJS({
|
|
|
181512
181580
|
if (_freebsd || _openbsd || _netbsd) {
|
|
181513
181581
|
let modelline = "";
|
|
181514
181582
|
let lines = [];
|
|
181515
|
-
if (
|
|
181516
|
-
modelline =
|
|
181583
|
+
if (os28.cpus()[0] && os28.cpus()[0].model) {
|
|
181584
|
+
modelline = os28.cpus()[0].model;
|
|
181517
181585
|
}
|
|
181518
181586
|
exec3("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error2, stdout) => {
|
|
181519
181587
|
let cache3 = [];
|
|
@@ -181673,7 +181741,7 @@ var require_cpu = __commonJS({
|
|
|
181673
181741
|
}
|
|
181674
181742
|
exports2.cpu = cpu;
|
|
181675
181743
|
function getCpuCurrentSpeedSync() {
|
|
181676
|
-
const cpus2 =
|
|
181744
|
+
const cpus2 = os28.cpus();
|
|
181677
181745
|
let minFreq = 999999999;
|
|
181678
181746
|
let maxFreq = 0;
|
|
181679
181747
|
let avgFreq = 0;
|
|
@@ -182368,7 +182436,7 @@ var require_cpu = __commonJS({
|
|
|
182368
182436
|
function getLoad() {
|
|
182369
182437
|
return new Promise((resolve21) => {
|
|
182370
182438
|
process.nextTick(() => {
|
|
182371
|
-
const loads =
|
|
182439
|
+
const loads = os28.loadavg().map((x2) => {
|
|
182372
182440
|
return x2 / util5.cores();
|
|
182373
182441
|
});
|
|
182374
182442
|
const avgLoad = parseFloat(Math.max.apply(Math, loads).toFixed(2));
|
|
@@ -182376,7 +182444,7 @@ var require_cpu = __commonJS({
|
|
|
182376
182444
|
const now = Date.now() - _current_cpu.ms;
|
|
182377
182445
|
if (now >= 200) {
|
|
182378
182446
|
_current_cpu.ms = Date.now();
|
|
182379
|
-
const cpus2 =
|
|
182447
|
+
const cpus2 = os28.cpus().map((cpu2) => {
|
|
182380
182448
|
cpu2.times.steal = 0;
|
|
182381
182449
|
cpu2.times.guest = 0;
|
|
182382
182450
|
return cpu2;
|
|
@@ -182570,7 +182638,7 @@ var require_cpu = __commonJS({
|
|
|
182570
182638
|
function getFullLoad() {
|
|
182571
182639
|
return new Promise((resolve21) => {
|
|
182572
182640
|
process.nextTick(() => {
|
|
182573
|
-
const cpus2 =
|
|
182641
|
+
const cpus2 = os28.cpus();
|
|
182574
182642
|
let totalUser = 0;
|
|
182575
182643
|
let totalSystem = 0;
|
|
182576
182644
|
let totalNice = 0;
|
|
@@ -182613,7 +182681,7 @@ var require_cpu = __commonJS({
|
|
|
182613
182681
|
var require_memory = __commonJS({
|
|
182614
182682
|
"node_modules/systeminformation/lib/memory.js"(exports2) {
|
|
182615
182683
|
"use strict";
|
|
182616
|
-
var
|
|
182684
|
+
var os28 = __require("os");
|
|
182617
182685
|
var exec3 = __require("child_process").exec;
|
|
182618
182686
|
var execSync4 = __require("child_process").execSync;
|
|
182619
182687
|
var util5 = require_util11();
|
|
@@ -182659,12 +182727,12 @@ var require_memory = __commonJS({
|
|
|
182659
182727
|
return new Promise((resolve21) => {
|
|
182660
182728
|
process.nextTick(() => {
|
|
182661
182729
|
let result2 = {
|
|
182662
|
-
total:
|
|
182663
|
-
free:
|
|
182664
|
-
used:
|
|
182665
|
-
active:
|
|
182730
|
+
total: os28.totalmem(),
|
|
182731
|
+
free: os28.freemem(),
|
|
182732
|
+
used: os28.totalmem() - os28.freemem(),
|
|
182733
|
+
active: os28.totalmem() - os28.freemem(),
|
|
182666
182734
|
// temporarily (fallback)
|
|
182667
|
-
available:
|
|
182735
|
+
available: os28.freemem(),
|
|
182668
182736
|
// temporarily (fallback)
|
|
182669
182737
|
buffers: 0,
|
|
182670
182738
|
cached: 0,
|
|
@@ -182683,9 +182751,9 @@ var require_memory = __commonJS({
|
|
|
182683
182751
|
if (!error2) {
|
|
182684
182752
|
const lines = stdout.toString().split("\n");
|
|
182685
182753
|
result2.total = parseInt(util5.getValue(lines, "memtotal"), 10);
|
|
182686
|
-
result2.total = result2.total ? result2.total * 1024 :
|
|
182754
|
+
result2.total = result2.total ? result2.total * 1024 : os28.totalmem();
|
|
182687
182755
|
result2.free = parseInt(util5.getValue(lines, "memfree"), 10);
|
|
182688
|
-
result2.free = result2.free ? result2.free * 1024 :
|
|
182756
|
+
result2.free = result2.free ? result2.free * 1024 : os28.freemem();
|
|
182689
182757
|
result2.used = result2.total - result2.free;
|
|
182690
182758
|
result2.buffers = parseInt(util5.getValue(lines, "buffers"), 10);
|
|
182691
182759
|
result2.buffers = result2.buffers ? result2.buffers * 1024 : 0;
|
|
@@ -182907,7 +182975,7 @@ var require_memory = __commonJS({
|
|
|
182907
182975
|
}
|
|
182908
182976
|
if (!result2.length) {
|
|
182909
182977
|
result2.push({
|
|
182910
|
-
size:
|
|
182978
|
+
size: os28.totalmem(),
|
|
182911
182979
|
bank: "",
|
|
182912
182980
|
type: "",
|
|
182913
182981
|
ecc: null,
|
|
@@ -184482,7 +184550,7 @@ var require_filesystem = __commonJS({
|
|
|
184482
184550
|
"use strict";
|
|
184483
184551
|
var util5 = require_util11();
|
|
184484
184552
|
var fs70 = __require("fs");
|
|
184485
|
-
var
|
|
184553
|
+
var os28 = __require("os");
|
|
184486
184554
|
var exec3 = __require("child_process").exec;
|
|
184487
184555
|
var execSync4 = __require("child_process").execSync;
|
|
184488
184556
|
var execPromiseSave = util5.promisifySave(__require("child_process").exec);
|
|
@@ -185676,7 +185744,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
|
|
|
185676
185744
|
}
|
|
185677
185745
|
if (_darwin) {
|
|
185678
185746
|
let cmdFullSmart = "";
|
|
185679
|
-
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(
|
|
185747
|
+
exec3(`system_profiler SPSerialATADataType SPNVMeDataType ${parseInt(os28.release(), 10) > 24 ? "SPUSBHostDataType" : "SPUSBDataType"} `, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
|
|
185680
185748
|
if (!error2) {
|
|
185681
185749
|
const lines = stdout.toString().split("\n");
|
|
185682
185750
|
const linesSATA = [];
|
|
@@ -186056,7 +186124,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
|
|
|
186056
186124
|
var require_network = __commonJS({
|
|
186057
186125
|
"node_modules/systeminformation/lib/network.js"(exports2) {
|
|
186058
186126
|
"use strict";
|
|
186059
|
-
var
|
|
186127
|
+
var os28 = __require("os");
|
|
186060
186128
|
var exec3 = __require("child_process").exec;
|
|
186061
186129
|
var execSync4 = __require("child_process").execSync;
|
|
186062
186130
|
var fs70 = __require("fs");
|
|
@@ -186080,7 +186148,7 @@ var require_network = __commonJS({
|
|
|
186080
186148
|
let ifacename = "";
|
|
186081
186149
|
let ifacenameFirst = "";
|
|
186082
186150
|
try {
|
|
186083
|
-
const ifaces =
|
|
186151
|
+
const ifaces = os28.networkInterfaces();
|
|
186084
186152
|
let scopeid = 9999;
|
|
186085
186153
|
for (let dev in ifaces) {
|
|
186086
186154
|
if ({}.hasOwnProperty.call(ifaces, dev)) {
|
|
@@ -186100,7 +186168,7 @@ var require_network = __commonJS({
|
|
|
186100
186168
|
let defaultIp = "";
|
|
186101
186169
|
const cmd = "netstat -r";
|
|
186102
186170
|
const result2 = execSync4(cmd, util5.execOptsWin);
|
|
186103
|
-
const lines = result2.toString().split(
|
|
186171
|
+
const lines = result2.toString().split(os28.EOL);
|
|
186104
186172
|
lines.forEach((line) => {
|
|
186105
186173
|
line = line.replace(/\s+/g, " ").trim();
|
|
186106
186174
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -186733,7 +186801,7 @@ var require_network = __commonJS({
|
|
|
186733
186801
|
defaultString = "" + defaultString;
|
|
186734
186802
|
return new Promise((resolve21) => {
|
|
186735
186803
|
process.nextTick(() => {
|
|
186736
|
-
const ifaces =
|
|
186804
|
+
const ifaces = os28.networkInterfaces();
|
|
186737
186805
|
let result2 = [];
|
|
186738
186806
|
let nics = [];
|
|
186739
186807
|
let dnsSuffixes = [];
|
|
@@ -187803,7 +187871,7 @@ var require_network = __commonJS({
|
|
|
187803
187871
|
if (_windows) {
|
|
187804
187872
|
try {
|
|
187805
187873
|
exec3("netstat -r", util5.execOptsWin, (error2, stdout) => {
|
|
187806
|
-
const lines = stdout.toString().split(
|
|
187874
|
+
const lines = stdout.toString().split(os28.EOL);
|
|
187807
187875
|
lines.forEach((line) => {
|
|
187808
187876
|
line = line.replace(/\s+/g, " ").trim();
|
|
187809
187877
|
if (line.indexOf("0.0.0.0 0.0.0.0") > -1 && !/[a-zA-Z]/.test(line)) {
|
|
@@ -187849,7 +187917,7 @@ var require_network = __commonJS({
|
|
|
187849
187917
|
var require_wifi = __commonJS({
|
|
187850
187918
|
"node_modules/systeminformation/lib/wifi.js"(exports2) {
|
|
187851
187919
|
"use strict";
|
|
187852
|
-
var
|
|
187920
|
+
var os28 = __require("os");
|
|
187853
187921
|
var exec3 = __require("child_process").exec;
|
|
187854
187922
|
var execSync4 = __require("child_process").execSync;
|
|
187855
187923
|
var util5 = require_util11();
|
|
@@ -188071,7 +188139,7 @@ var require_wifi = __commonJS({
|
|
|
188071
188139
|
parts2.shift();
|
|
188072
188140
|
parts2.forEach((part) => {
|
|
188073
188141
|
part = "ACTIVE:" + part;
|
|
188074
|
-
const lines = part.split(
|
|
188142
|
+
const lines = part.split(os28.EOL);
|
|
188075
188143
|
const channel = util5.getValue(lines, "CHAN");
|
|
188076
188144
|
const frequency = util5.getValue(lines, "FREQ").toLowerCase().replace("mhz", "").trim();
|
|
188077
188145
|
const security = util5.getValue(lines, "SECURITY").replace("(", "").replace(")", "");
|
|
@@ -188295,15 +188363,15 @@ var require_wifi = __commonJS({
|
|
|
188295
188363
|
} else if (_windows) {
|
|
188296
188364
|
const cmd = "netsh wlan show networks mode=Bssid";
|
|
188297
188365
|
util5.powerShell(cmd).then((stdout) => {
|
|
188298
|
-
const ssidParts = stdout.toString("utf8").split(
|
|
188366
|
+
const ssidParts = stdout.toString("utf8").split(os28.EOL + os28.EOL + "SSID ");
|
|
188299
188367
|
ssidParts.shift();
|
|
188300
188368
|
ssidParts.forEach((ssidPart) => {
|
|
188301
|
-
const ssidLines = ssidPart.split(
|
|
188369
|
+
const ssidLines = ssidPart.split(os28.EOL);
|
|
188302
188370
|
if (ssidLines && ssidLines.length >= 8 && ssidLines[0].indexOf(":") >= 0) {
|
|
188303
188371
|
const bssidsParts = ssidPart.split(" BSSID");
|
|
188304
188372
|
bssidsParts.shift();
|
|
188305
188373
|
bssidsParts.forEach((bssidPart) => {
|
|
188306
|
-
const bssidLines = bssidPart.split(
|
|
188374
|
+
const bssidLines = bssidPart.split(os28.EOL);
|
|
188307
188375
|
const bssidLine = bssidLines[0].split(":");
|
|
188308
188376
|
bssidLine.shift();
|
|
188309
188377
|
const bssid = bssidLine.join(":").trim().toLowerCase();
|
|
@@ -188627,7 +188695,7 @@ var require_wifi = __commonJS({
|
|
|
188627
188695
|
var require_processes = __commonJS({
|
|
188628
188696
|
"node_modules/systeminformation/lib/processes.js"(exports2) {
|
|
188629
188697
|
"use strict";
|
|
188630
|
-
var
|
|
188698
|
+
var os28 = __require("os");
|
|
188631
188699
|
var fs70 = __require("fs");
|
|
188632
188700
|
var path85 = __require("path");
|
|
188633
188701
|
var exec3 = __require("child_process").exec;
|
|
@@ -189278,7 +189346,7 @@ var require_processes = __commonJS({
|
|
|
189278
189346
|
line = line.trim().replace(/ +/g, " ").replace(/,+/g, ".");
|
|
189279
189347
|
const parts2 = line.split(" ");
|
|
189280
189348
|
const command = parts2.slice(9).join(" ");
|
|
189281
|
-
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 /
|
|
189349
|
+
const pmem = parseFloat((1 * parseInt(parts2[3]) * 1024 / os28.totalmem()).toFixed(1));
|
|
189282
189350
|
const started = parseElapsed(parts2[5]);
|
|
189283
189351
|
result2.push({
|
|
189284
189352
|
pid: parseInt(parts2[0]),
|
|
@@ -189481,7 +189549,7 @@ var require_processes = __commonJS({
|
|
|
189481
189549
|
cpu: 0,
|
|
189482
189550
|
cpuu: 0,
|
|
189483
189551
|
cpus: 0,
|
|
189484
|
-
mem: memw /
|
|
189552
|
+
mem: memw / os28.totalmem() * 100,
|
|
189485
189553
|
priority: element.Priority | null,
|
|
189486
189554
|
memVsz: element.PageFileUsage || null,
|
|
189487
189555
|
memRss: Math.floor((element.WorkingSetSize || 0) / 1024),
|
|
@@ -189635,7 +189703,7 @@ var require_processes = __commonJS({
|
|
|
189635
189703
|
result2.forEach((item) => {
|
|
189636
189704
|
if (item.proc.toLowerCase() === pname.toLowerCase()) {
|
|
189637
189705
|
item.pids.push(pid);
|
|
189638
|
-
item.mem += mem /
|
|
189706
|
+
item.mem += mem / os28.totalmem() * 100;
|
|
189639
189707
|
processFound = true;
|
|
189640
189708
|
}
|
|
189641
189709
|
});
|
|
@@ -189645,7 +189713,7 @@ var require_processes = __commonJS({
|
|
|
189645
189713
|
pid,
|
|
189646
189714
|
pids: [pid],
|
|
189647
189715
|
cpu: 0,
|
|
189648
|
-
mem: mem /
|
|
189716
|
+
mem: mem / os28.totalmem() * 100
|
|
189649
189717
|
});
|
|
189650
189718
|
}
|
|
189651
189719
|
}
|
|
@@ -191386,7 +191454,7 @@ var require_docker = __commonJS({
|
|
|
191386
191454
|
var require_virtualbox = __commonJS({
|
|
191387
191455
|
"node_modules/systeminformation/lib/virtualbox.js"(exports2) {
|
|
191388
191456
|
"use strict";
|
|
191389
|
-
var
|
|
191457
|
+
var os28 = __require("os");
|
|
191390
191458
|
var exec3 = __require("child_process").exec;
|
|
191391
191459
|
var util5 = require_util11();
|
|
191392
191460
|
function vboxInfo(callback) {
|
|
@@ -191395,10 +191463,10 @@ var require_virtualbox = __commonJS({
|
|
|
191395
191463
|
process.nextTick(() => {
|
|
191396
191464
|
try {
|
|
191397
191465
|
exec3(util5.getVboxmanage() + " list vms --long", (error2, stdout) => {
|
|
191398
|
-
let parts2 = (
|
|
191466
|
+
let parts2 = (os28.EOL + stdout.toString()).split(os28.EOL + "Name:");
|
|
191399
191467
|
parts2.shift();
|
|
191400
191468
|
parts2.forEach((part) => {
|
|
191401
|
-
const lines = ("Name:" + part).split(
|
|
191469
|
+
const lines = ("Name:" + part).split(os28.EOL);
|
|
191402
191470
|
const state = util5.getValue(lines, "State");
|
|
191403
191471
|
const running = state.startsWith("running");
|
|
191404
191472
|
const runningSinceString = running ? state.replace("running (since ", "").replace(")", "").trim() : "";
|
|
@@ -194173,6 +194241,8 @@ var init_event_metadata_key = __esm({
|
|
|
194173
194241
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_SELECTED_OPTION"] = 188] = "GEMINI_CLI_BILLING_SELECTED_OPTION";
|
|
194174
194242
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_CREDIT_BALANCE"] = 189] = "GEMINI_CLI_BILLING_CREDIT_BALANCE";
|
|
194175
194243
|
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_BILLING_PURCHASE_SOURCE"] = 190] = "GEMINI_CLI_BILLING_PURCHASE_SOURCE";
|
|
194244
|
+
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_ONBOARDING_START"] = 192] = "GEMINI_CLI_ONBOARDING_START";
|
|
194245
|
+
EventMetadataKey2[EventMetadataKey2["GEMINI_CLI_ONBOARDING_USER_TIER"] = 193] = "GEMINI_CLI_ONBOARDING_USER_TIER";
|
|
194176
194246
|
})(EventMetadataKey || (EventMetadataKey = {}));
|
|
194177
194247
|
}
|
|
194178
194248
|
});
|
|
@@ -198865,8 +198935,8 @@ var GIT_COMMIT_INFO, CLI_VERSION;
|
|
|
198865
198935
|
var init_git_commit = __esm({
|
|
198866
198936
|
"packages/core/dist/src/generated/git-commit.js"() {
|
|
198867
198937
|
"use strict";
|
|
198868
|
-
GIT_COMMIT_INFO = "
|
|
198869
|
-
CLI_VERSION = "0.35.0-preview.
|
|
198938
|
+
GIT_COMMIT_INFO = "e88b56bbc";
|
|
198939
|
+
CLI_VERSION = "0.35.0-preview.5";
|
|
198870
198940
|
}
|
|
198871
198941
|
});
|
|
198872
198942
|
|
|
@@ -199113,6 +199183,8 @@ var init_clearcut_logger = __esm({
|
|
|
199113
199183
|
EventNames2["TOOL_OUTPUT_MASKING"] = "tool_output_masking";
|
|
199114
199184
|
EventNames2["KEYCHAIN_AVAILABILITY"] = "keychain_availability";
|
|
199115
199185
|
EventNames2["TOKEN_STORAGE_INITIALIZATION"] = "token_storage_initialization";
|
|
199186
|
+
EventNames2["ONBOARDING_START"] = "onboarding_start";
|
|
199187
|
+
EventNames2["ONBOARDING_SUCCESS"] = "onboarding_success";
|
|
199116
199188
|
EventNames2["CONSECA_POLICY_GENERATION"] = "conseca_policy_generation";
|
|
199117
199189
|
EventNames2["CONSECA_VERDICT"] = "conseca_verdict";
|
|
199118
199190
|
EventNames2["STARTUP_STATS"] = "startup_stats";
|
|
@@ -200351,6 +200423,27 @@ var init_clearcut_logger = __esm({
|
|
|
200351
200423
|
this.enqueueLogEvent(this.createLogEvent(EventNames.TOKEN_STORAGE_INITIALIZATION, data));
|
|
200352
200424
|
this.flushIfNeeded();
|
|
200353
200425
|
}
|
|
200426
|
+
logOnboardingStartEvent(_event) {
|
|
200427
|
+
const data = [
|
|
200428
|
+
{
|
|
200429
|
+
gemini_cli_key: EventMetadataKey.GEMINI_CLI_ONBOARDING_START,
|
|
200430
|
+
value: "true"
|
|
200431
|
+
}
|
|
200432
|
+
];
|
|
200433
|
+
this.enqueueLogEvent(this.createLogEvent(EventNames.ONBOARDING_START, data));
|
|
200434
|
+
this.flushIfNeeded();
|
|
200435
|
+
}
|
|
200436
|
+
logOnboardingSuccessEvent(event) {
|
|
200437
|
+
const data = [];
|
|
200438
|
+
if (event.userTier) {
|
|
200439
|
+
data.push({
|
|
200440
|
+
gemini_cli_key: EventMetadataKey.GEMINI_CLI_ONBOARDING_USER_TIER,
|
|
200441
|
+
value: event.userTier
|
|
200442
|
+
});
|
|
200443
|
+
}
|
|
200444
|
+
this.enqueueLogEvent(this.createLogEvent(EventNames.ONBOARDING_SUCCESS, data));
|
|
200445
|
+
this.flushIfNeeded();
|
|
200446
|
+
}
|
|
200354
200447
|
logStartupStatsEvent(event) {
|
|
200355
200448
|
const data = [
|
|
200356
200449
|
{
|
|
@@ -211295,7 +211388,7 @@ var require_grpc = __commonJS({
|
|
|
211295
211388
|
var fs70 = __require("fs");
|
|
211296
211389
|
var google_auth_library_1 = require_src6();
|
|
211297
211390
|
var grpc3 = require_src21();
|
|
211298
|
-
var
|
|
211391
|
+
var os28 = __require("os");
|
|
211299
211392
|
var path_1 = __require("path");
|
|
211300
211393
|
var path85 = __require("path");
|
|
211301
211394
|
var protobuf = require_protobufjs();
|
|
@@ -211600,7 +211693,7 @@ var require_grpc = __commonJS({
|
|
|
211600
211693
|
if ((opts === null || opts === void 0 ? void 0 : opts.cert) && (opts === null || opts === void 0 ? void 0 : opts.key)) {
|
|
211601
211694
|
return [opts.cert, opts.key];
|
|
211602
211695
|
}
|
|
211603
|
-
const metadataPath = (0, path_1.join)(
|
|
211696
|
+
const metadataPath = (0, path_1.join)(os28.homedir(), ".secureConnect", "context_aware_metadata.json");
|
|
211604
211697
|
const metadata2 = JSON.parse(await readFileAsync(metadataPath));
|
|
211605
211698
|
if (!metadata2.cert_provider_command) {
|
|
211606
211699
|
throw Error("no cert_provider_command found");
|
|
@@ -279463,9 +279556,9 @@ async function initializeTelemetry(config3, credentials3) {
|
|
|
279463
279556
|
if (config3.getDebugMode()) {
|
|
279464
279557
|
debugLogger.log("OpenTelemetry SDK started successfully.");
|
|
279465
279558
|
}
|
|
279466
|
-
telemetryInitialized = true;
|
|
279467
279559
|
activeTelemetryEmail = credentials3?.client_email;
|
|
279468
279560
|
initializeMetrics(config3);
|
|
279561
|
+
telemetryInitialized = true;
|
|
279469
279562
|
void flushTelemetryBuffer();
|
|
279470
279563
|
} catch (error2) {
|
|
279471
279564
|
debugLogger.error("Error starting OpenTelemetry SDK:", error2);
|
|
@@ -280018,6 +280111,30 @@ function logTokenStorageInitialization(config3, event) {
|
|
|
280018
280111
|
recordTokenStorageInitialization(config3, event);
|
|
280019
280112
|
});
|
|
280020
280113
|
}
|
|
280114
|
+
function logOnboardingStart(config3, event) {
|
|
280115
|
+
ClearcutLogger.getInstance(config3)?.logOnboardingStartEvent(event);
|
|
280116
|
+
bufferTelemetryEvent(() => {
|
|
280117
|
+
const logger7 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
280118
|
+
const logRecord = {
|
|
280119
|
+
body: event.toLogBody(),
|
|
280120
|
+
attributes: event.toOpenTelemetryAttributes(config3)
|
|
280121
|
+
};
|
|
280122
|
+
logger7.emit(logRecord);
|
|
280123
|
+
recordOnboardingStart(config3);
|
|
280124
|
+
});
|
|
280125
|
+
}
|
|
280126
|
+
function logOnboardingSuccess(config3, event) {
|
|
280127
|
+
ClearcutLogger.getInstance(config3)?.logOnboardingSuccessEvent(event);
|
|
280128
|
+
bufferTelemetryEvent(() => {
|
|
280129
|
+
const logger7 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
280130
|
+
const logRecord = {
|
|
280131
|
+
body: event.toLogBody(),
|
|
280132
|
+
attributes: event.toOpenTelemetryAttributes(config3)
|
|
280133
|
+
};
|
|
280134
|
+
logger7.emit(logRecord);
|
|
280135
|
+
recordOnboardingSuccess(config3, event.userTier);
|
|
280136
|
+
});
|
|
280137
|
+
}
|
|
280021
280138
|
function logBillingEvent(config3, event) {
|
|
280022
280139
|
bufferTelemetryEvent(() => {
|
|
280023
280140
|
const logger7 = import_api_logs2.logs.getLogger(SERVICE_NAME);
|
|
@@ -320151,7 +320268,7 @@ var init_ide_client = __esm({
|
|
|
320151
320268
|
* content if accepted.
|
|
320152
320269
|
*/
|
|
320153
320270
|
async openDiff(filePath, newContent) {
|
|
320154
|
-
const
|
|
320271
|
+
const release3 = await this.acquireMutex();
|
|
320155
320272
|
const promise = new Promise((resolve21, reject) => {
|
|
320156
320273
|
if (!this.client) {
|
|
320157
320274
|
return reject(new Error("IDE client is not connected."));
|
|
@@ -320180,7 +320297,7 @@ var init_ide_client = __esm({
|
|
|
320180
320297
|
reject(err2);
|
|
320181
320298
|
});
|
|
320182
320299
|
});
|
|
320183
|
-
promise.finally(
|
|
320300
|
+
promise.finally(release3);
|
|
320184
320301
|
return promise;
|
|
320185
320302
|
}
|
|
320186
320303
|
/**
|
|
@@ -320201,13 +320318,13 @@ var init_ide_client = __esm({
|
|
|
320201
320318
|
* release the lock.
|
|
320202
320319
|
*/
|
|
320203
320320
|
acquireMutex() {
|
|
320204
|
-
let
|
|
320321
|
+
let release3;
|
|
320205
320322
|
const newMutex = new Promise((resolve21) => {
|
|
320206
|
-
|
|
320323
|
+
release3 = resolve21;
|
|
320207
320324
|
});
|
|
320208
320325
|
const oldMutex = this.diffMutex;
|
|
320209
320326
|
this.diffMutex = newMutex;
|
|
320210
|
-
return oldMutex.then(() =>
|
|
320327
|
+
return oldMutex.then(() => release3);
|
|
320211
320328
|
}
|
|
320212
320329
|
async closeDiff(filePath, options) {
|
|
320213
320330
|
try {
|
|
@@ -324260,8 +324377,8 @@ var require_semver2 = __commonJS({
|
|
|
324260
324377
|
}
|
|
324261
324378
|
// preminor will bump the version up to the next minor release, and immediately
|
|
324262
324379
|
// down to pre-release. premajor and prepatch work the same way.
|
|
324263
|
-
inc(
|
|
324264
|
-
if (
|
|
324380
|
+
inc(release3, identifier, identifierBase) {
|
|
324381
|
+
if (release3.startsWith("pre")) {
|
|
324265
324382
|
if (!identifier && identifierBase === false) {
|
|
324266
324383
|
throw new Error("invalid increment argument: identifier is empty");
|
|
324267
324384
|
}
|
|
@@ -324272,7 +324389,7 @@ var require_semver2 = __commonJS({
|
|
|
324272
324389
|
}
|
|
324273
324390
|
}
|
|
324274
324391
|
}
|
|
324275
|
-
switch (
|
|
324392
|
+
switch (release3) {
|
|
324276
324393
|
case "premajor":
|
|
324277
324394
|
this.prerelease.length = 0;
|
|
324278
324395
|
this.patch = 0;
|
|
@@ -324363,7 +324480,7 @@ var require_semver2 = __commonJS({
|
|
|
324363
324480
|
break;
|
|
324364
324481
|
}
|
|
324365
324482
|
default:
|
|
324366
|
-
throw new Error(`invalid increment argument: ${
|
|
324483
|
+
throw new Error(`invalid increment argument: ${release3}`);
|
|
324367
324484
|
}
|
|
324368
324485
|
this.raw = this.format();
|
|
324369
324486
|
if (this.build.length) {
|
|
@@ -328386,7 +328503,7 @@ function getVersion() {
|
|
|
328386
328503
|
}
|
|
328387
328504
|
versionPromise = (async () => {
|
|
328388
328505
|
const pkgJson = await getPackageJson(__dirname3);
|
|
328389
|
-
return "0.35.0-preview.
|
|
328506
|
+
return "0.35.0-preview.5";
|
|
328390
328507
|
})();
|
|
328391
328508
|
return versionPromise;
|
|
328392
328509
|
}
|
|
@@ -328849,22 +328966,23 @@ var init_cache = __esm({
|
|
|
328849
328966
|
});
|
|
328850
328967
|
|
|
328851
328968
|
// packages/core/dist/src/code_assist/setup.js
|
|
328852
|
-
async function setupUser(client,
|
|
328969
|
+
async function setupUser(client, config3, httpOptions = {}) {
|
|
328853
328970
|
const projectId = process.env["GOOGLE_CLOUD_PROJECT"] || process.env["GOOGLE_CLOUD_PROJECT_ID"] || void 0;
|
|
328854
328971
|
const projectCache = userDataCache.getOrCreate(client, () => createCache({
|
|
328855
328972
|
storage: "map",
|
|
328856
328973
|
defaultTtl: 3e4
|
|
328857
328974
|
// 30 seconds
|
|
328858
328975
|
}));
|
|
328859
|
-
return projectCache.getOrCreate(projectId, () => _doSetupUser(client, projectId,
|
|
328976
|
+
return projectCache.getOrCreate(projectId, () => _doSetupUser(client, projectId, config3, httpOptions));
|
|
328860
328977
|
}
|
|
328861
|
-
async function _doSetupUser(client, projectId,
|
|
328978
|
+
async function _doSetupUser(client, projectId, config3, httpOptions = {}) {
|
|
328862
328979
|
const caServer = new CodeAssistServer(client, projectId, httpOptions, "", void 0, void 0);
|
|
328863
328980
|
const coreClientMetadata = {
|
|
328864
328981
|
ideType: "IDE_UNSPECIFIED",
|
|
328865
328982
|
platform: "PLATFORM_UNSPECIFIED",
|
|
328866
328983
|
pluginType: "GEMINI"
|
|
328867
328984
|
};
|
|
328985
|
+
const validationHandler = config3.getValidationHandler();
|
|
328868
328986
|
let loadRes;
|
|
328869
328987
|
while (true) {
|
|
328870
328988
|
loadRes = await caServer.loadCodeAssist({
|
|
@@ -328901,7 +329019,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
328901
329019
|
projectId,
|
|
328902
329020
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
328903
329021
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
328904
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
329022
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
329023
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
328905
329024
|
};
|
|
328906
329025
|
}
|
|
328907
329026
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -328910,7 +329029,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
328910
329029
|
projectId: loadRes.cloudaicompanionProject,
|
|
328911
329030
|
userTier: loadRes.paidTier?.id ?? loadRes.currentTier.id ?? UserTierId.STANDARD,
|
|
328912
329031
|
userTierName: loadRes.paidTier?.name ?? loadRes.currentTier.name,
|
|
328913
|
-
paidTier: loadRes.paidTier ?? void 0
|
|
329032
|
+
paidTier: loadRes.paidTier ?? void 0,
|
|
329033
|
+
hasOnboardedPreviously: loadRes.currentTier.hasOnboardedPreviously ?? true
|
|
328914
329034
|
};
|
|
328915
329035
|
}
|
|
328916
329036
|
const tier = getOnboardTier(loadRes);
|
|
@@ -328934,6 +329054,7 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
328934
329054
|
}
|
|
328935
329055
|
};
|
|
328936
329056
|
}
|
|
329057
|
+
logOnboardingStart(config3, new OnboardingStartEvent());
|
|
328937
329058
|
let lroRes = await caServer.onboardUser(onboardReq);
|
|
328938
329059
|
if (!lroRes.done && lroRes.name) {
|
|
328939
329060
|
const operationName = lroRes.name;
|
|
@@ -328942,12 +329063,15 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
328942
329063
|
lroRes = await caServer.getOperation(operationName);
|
|
328943
329064
|
}
|
|
328944
329065
|
}
|
|
329066
|
+
const userTier = tier.id ?? UserTierId.STANDARD;
|
|
329067
|
+
logOnboardingSuccess(config3, new OnboardingSuccessEvent(userTier));
|
|
328945
329068
|
if (!lroRes.response?.cloudaicompanionProject?.id) {
|
|
328946
329069
|
if (projectId) {
|
|
328947
329070
|
return {
|
|
328948
329071
|
projectId,
|
|
328949
329072
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
328950
|
-
userTierName: tier.name
|
|
329073
|
+
userTierName: tier.name,
|
|
329074
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
328951
329075
|
};
|
|
328952
329076
|
}
|
|
328953
329077
|
throwIneligibleOrProjectIdError(loadRes);
|
|
@@ -328955,7 +329079,8 @@ async function _doSetupUser(client, projectId, validationHandler, httpOptions =
|
|
|
328955
329079
|
return {
|
|
328956
329080
|
projectId: lroRes.response.cloudaicompanionProject.id,
|
|
328957
329081
|
userTier: tier.id ?? UserTierId.STANDARD,
|
|
328958
|
-
userTierName: tier.name
|
|
329082
|
+
userTierName: tier.name,
|
|
329083
|
+
hasOnboardedPreviously: tier.hasOnboardedPreviously ?? false
|
|
328959
329084
|
};
|
|
328960
329085
|
}
|
|
328961
329086
|
function throwIneligibleOrProjectIdError(res) {
|
|
@@ -328999,6 +329124,7 @@ var init_setup = __esm({
|
|
|
328999
329124
|
init_googleQuotaErrors();
|
|
329000
329125
|
init_debugLogger();
|
|
329001
329126
|
init_cache();
|
|
329127
|
+
init_telemetry();
|
|
329002
329128
|
ProjectIdRequiredError = class extends Error {
|
|
329003
329129
|
constructor() {
|
|
329004
329130
|
super("This account requires setting the GOOGLE_CLOUD_PROJECT or GOOGLE_CLOUD_PROJECT_ID env var. See https://goo.gle/gemini-cli-auth-docs#workspace-gca");
|
|
@@ -329435,7 +329561,7 @@ var init_loggingContentGenerator = __esm({
|
|
|
329435
329561
|
async function createCodeAssistContentGenerator(httpOptions, authType, config3, sessionId2) {
|
|
329436
329562
|
if (authType === AuthType2.LOGIN_WITH_GOOGLE || authType === AuthType2.COMPUTE_ADC) {
|
|
329437
329563
|
const authClient = await getOauthClient(authType, config3);
|
|
329438
|
-
const userData = await setupUser(authClient, config3
|
|
329564
|
+
const userData = await setupUser(authClient, config3, httpOptions);
|
|
329439
329565
|
return new CodeAssistServer(authClient, userData.projectId, httpOptions, sessionId2, userData.userTier, userData.userTierName, userData.paidTier, config3);
|
|
329440
329566
|
}
|
|
329441
329567
|
throw new Error(`Unsupported authType: ${authType}`);
|
|
@@ -329589,7 +329715,7 @@ function determineSurface2() {
|
|
|
329589
329715
|
if (ide.name !== "vscode") {
|
|
329590
329716
|
return ide.name;
|
|
329591
329717
|
}
|
|
329592
|
-
if (process.env["TERM_PROGRAM"] === "vscode") {
|
|
329718
|
+
if (process.env["TERM_PROGRAM"] === "vscode" || process.env["VSCODE_PID"]) {
|
|
329593
329719
|
return ide.name;
|
|
329594
329720
|
}
|
|
329595
329721
|
if (process.env["GITHUB_SHA"]) {
|
|
@@ -329690,6 +329816,7 @@ var init_recordingContentGenerator = __esm({
|
|
|
329690
329816
|
});
|
|
329691
329817
|
|
|
329692
329818
|
// packages/core/dist/src/core/contentGenerator.js
|
|
329819
|
+
import * as os20 from "node:os";
|
|
329693
329820
|
async function createContentGeneratorConfig(config3, authType, apiKey, baseUrl, customHeaders) {
|
|
329694
329821
|
const geminiApiKey = apiKey || process.env["GEMINI_API_KEY"] || await loadApiKey() || void 0;
|
|
329695
329822
|
const googleApiKey = process.env["GOOGLE_API_KEY"] || void 0;
|
|
@@ -329726,15 +329853,34 @@ async function createContentGenerator(config3, gcConfig, sessionId2) {
|
|
|
329726
329853
|
const model = resolveModel(gcConfig.getModel(), config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI || (await gcConfig.getGemini31Launched?.() ?? false));
|
|
329727
329854
|
const customHeadersEnv = process.env["GEMINI_CLI_CUSTOM_HEADERS"] || void 0;
|
|
329728
329855
|
const clientName = gcConfig.getClientName();
|
|
329729
|
-
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
329730
329856
|
const surface = determineSurface2();
|
|
329731
|
-
|
|
329857
|
+
let userAgent;
|
|
329858
|
+
if (clientName === "acp-vscode" || surface === "vscode") {
|
|
329859
|
+
const osTypeMap = {
|
|
329860
|
+
darwin: "macOS",
|
|
329861
|
+
win32: "Windows",
|
|
329862
|
+
linux: "Linux"
|
|
329863
|
+
};
|
|
329864
|
+
const osType = osTypeMap[process.platform] || process.platform;
|
|
329865
|
+
const osVersion = os20.release();
|
|
329866
|
+
const arch4 = process.arch;
|
|
329867
|
+
const vscodeVersion = process.env["TERM_PROGRAM_VERSION"] || "unknown";
|
|
329868
|
+
let hostPath = `VSCode/${vscodeVersion}`;
|
|
329869
|
+
if (isCloudShell()) {
|
|
329870
|
+
const cloudShellVersion = process.env["CLOUD_SHELL_VERSION"] || "unknown";
|
|
329871
|
+
hostPath += ` > CloudShell/${cloudShellVersion}`;
|
|
329872
|
+
}
|
|
329873
|
+
userAgent = `CloudCodeVSCode/${version4} (aidev_client; os_type=${osType}; os_version=${osVersion}; arch=${arch4}; host_path=${hostPath}; proxy_client=geminicli)`;
|
|
329874
|
+
} else {
|
|
329875
|
+
const userAgentPrefix = clientName ? `GeminiCLI-${clientName}` : "GeminiCLI";
|
|
329876
|
+
userAgent = `${userAgentPrefix}/${version4}/${model} (${process.platform}; ${process.arch}; ${surface})`;
|
|
329877
|
+
}
|
|
329732
329878
|
const customHeadersMap = parseCustomHeaders(customHeadersEnv);
|
|
329733
329879
|
const apiKeyAuthMechanism = process.env["GEMINI_API_KEY_AUTH_MECHANISM"] || "x-goog-api-key";
|
|
329734
329880
|
const apiVersionEnv = process.env["GOOGLE_GENAI_API_VERSION"];
|
|
329735
329881
|
const baseHeaders = {
|
|
329736
|
-
|
|
329737
|
-
|
|
329882
|
+
"User-Agent": userAgent,
|
|
329883
|
+
...customHeadersMap
|
|
329738
329884
|
};
|
|
329739
329885
|
if (apiKeyAuthMechanism === "bearer" && (config3.authType === AuthType2.USE_GEMINI || config3.authType === AuthType2.USE_VERTEX_AI) && config3.apiKey) {
|
|
329740
329886
|
baseHeaders["Authorization"] = `Bearer ${config3.apiKey}`;
|
|
@@ -329802,6 +329948,7 @@ var init_contentGenerator = __esm({
|
|
|
329802
329948
|
"use strict";
|
|
329803
329949
|
init_node();
|
|
329804
329950
|
init_codeAssist();
|
|
329951
|
+
init_detect_ide();
|
|
329805
329952
|
init_apiKeyCredentialStorage();
|
|
329806
329953
|
init_loggingContentGenerator();
|
|
329807
329954
|
init_installationManager();
|
|
@@ -352509,7 +352656,7 @@ import {
|
|
|
352509
352656
|
lookup as dnsLookup
|
|
352510
352657
|
} from "node:dns";
|
|
352511
352658
|
import { promisify as promisify13 } from "node:util";
|
|
352512
|
-
import
|
|
352659
|
+
import os21 from "node:os";
|
|
352513
352660
|
var AsyncResolver, kCacheableLookupCreateConnection, kCacheableLookupInstance, kExpires, supportsALL, verifyAgent, map4to6, getIfaceInfo, isIterable2, ignoreNoResultErrors, ttl, all, all4, all6, CacheableLookup;
|
|
352514
352661
|
var init_source3 = __esm({
|
|
352515
352662
|
"node_modules/cacheable-lookup/source/index.js"() {
|
|
@@ -352535,7 +352682,7 @@ var init_source3 = __esm({
|
|
|
352535
352682
|
getIfaceInfo = () => {
|
|
352536
352683
|
let has4 = false;
|
|
352537
352684
|
let has6 = false;
|
|
352538
|
-
for (const device of Object.values(
|
|
352685
|
+
for (const device of Object.values(os21.networkInterfaces())) {
|
|
352539
352686
|
for (const iface of device) {
|
|
352540
352687
|
if (iface.internal) {
|
|
352541
352688
|
continue;
|
|
@@ -357767,12 +357914,12 @@ var init_path_exists = __esm({
|
|
|
357767
357914
|
});
|
|
357768
357915
|
|
|
357769
357916
|
// node_modules/xdg-basedir/index.js
|
|
357770
|
-
import
|
|
357917
|
+
import os22 from "os";
|
|
357771
357918
|
import path46 from "path";
|
|
357772
357919
|
var homeDirectory, env, xdgData, xdgConfig, xdgState, xdgCache, xdgRuntime, xdgDataDirectories, xdgConfigDirectories;
|
|
357773
357920
|
var init_xdg_basedir = __esm({
|
|
357774
357921
|
"node_modules/xdg-basedir/index.js"() {
|
|
357775
|
-
homeDirectory =
|
|
357922
|
+
homeDirectory = os22.homedir();
|
|
357776
357923
|
({ env } = process);
|
|
357777
357924
|
xdgData = env.XDG_DATA_HOME || (homeDirectory ? path46.join(homeDirectory, ".local", "share") : void 0);
|
|
357778
357925
|
xdgConfig = env.XDG_CONFIG_HOME || (homeDirectory ? path46.join(homeDirectory, ".config") : void 0);
|
|
@@ -357791,7 +357938,7 @@ var init_xdg_basedir = __esm({
|
|
|
357791
357938
|
});
|
|
357792
357939
|
|
|
357793
357940
|
// node_modules/@joshua.litt/get-ripgrep/dist/downloadRipGrep.js
|
|
357794
|
-
import * as
|
|
357941
|
+
import * as os23 from "node:os";
|
|
357795
357942
|
import { dirname as dirname9, join as join14 } from "node:path";
|
|
357796
357943
|
import { pipeline as pipeline3 } from "node:stream/promises";
|
|
357797
357944
|
import { fileURLToPath as fileURLToPath11 } from "node:url";
|
|
@@ -357812,8 +357959,8 @@ var init_downloadRipGrep = __esm({
|
|
|
357812
357959
|
VERSION3 = process.env.RIPGREP_VERSION || "v13.0.0-10";
|
|
357813
357960
|
BIN_PATH = join14(__dirname5, "../bin");
|
|
357814
357961
|
getTarget = () => {
|
|
357815
|
-
const arch4 = process.env.npm_config_arch ||
|
|
357816
|
-
const platform11 = process.env.platform ||
|
|
357962
|
+
const arch4 = process.env.npm_config_arch || os23.arch();
|
|
357963
|
+
const platform11 = process.env.platform || os23.platform();
|
|
357817
357964
|
switch (platform11) {
|
|
357818
357965
|
case "darwin":
|
|
357819
357966
|
switch (arch4) {
|
|
@@ -357854,7 +358001,7 @@ var init_downloadRipGrep = __esm({
|
|
|
357854
358001
|
downloadFile2 = async (url5, outFile) => {
|
|
357855
358002
|
let tmpDir = void 0;
|
|
357856
358003
|
try {
|
|
357857
|
-
tmpDir = await import_fs_extra.default.mkdtemp(path47.join(
|
|
358004
|
+
tmpDir = await import_fs_extra.default.mkdtemp(path47.join(os23.tmpdir(), "download-ripgrep"));
|
|
357858
358005
|
const tmpFile = path47.join(tmpDir, "tmp-file");
|
|
357859
358006
|
await pipeline3(source_default2.stream(url5), createWriteStream6(tmpFile));
|
|
357860
358007
|
await mkdir3(dirname9(outFile), { recursive: true });
|
|
@@ -364553,7 +364700,7 @@ var require_lib12 = __commonJS({
|
|
|
364553
364700
|
|
|
364554
364701
|
// packages/core/dist/src/utils/systemEncoding.js
|
|
364555
364702
|
import { execSync as execSync2 } from "node:child_process";
|
|
364556
|
-
import
|
|
364703
|
+
import os24 from "node:os";
|
|
364557
364704
|
function getCachedEncodingForBuffer(buffer) {
|
|
364558
364705
|
if (cachedSystemEncoding === void 0) {
|
|
364559
364706
|
cachedSystemEncoding = getSystemEncoding();
|
|
@@ -364564,7 +364711,7 @@ function getCachedEncodingForBuffer(buffer) {
|
|
|
364564
364711
|
return detectEncodingFromBuffer(buffer) || "utf-8";
|
|
364565
364712
|
}
|
|
364566
364713
|
function getSystemEncoding() {
|
|
364567
|
-
if (
|
|
364714
|
+
if (os24.platform() === "win32") {
|
|
364568
364715
|
try {
|
|
364569
364716
|
const output = execSync2("chcp", { encoding: "utf8" });
|
|
364570
364717
|
const match3 = output.match(/:\s*(\d+)/);
|
|
@@ -368468,10 +368615,10 @@ var init_terminalSerializer = __esm({
|
|
|
368468
368615
|
});
|
|
368469
368616
|
|
|
368470
368617
|
// packages/core/dist/src/utils/process-utils.js
|
|
368471
|
-
import
|
|
368618
|
+
import os25 from "node:os";
|
|
368472
368619
|
async function killProcessGroup(options) {
|
|
368473
368620
|
const { pid, escalate = false, isExited = () => false, pty } = options;
|
|
368474
|
-
const isWindows2 =
|
|
368621
|
+
const isWindows2 = os25.platform() === "win32";
|
|
368475
368622
|
if (isWindows2) {
|
|
368476
368623
|
if (pty) {
|
|
368477
368624
|
try {
|
|
@@ -368856,7 +369003,7 @@ var init_executionLifecycleService = __esm({
|
|
|
368856
369003
|
// packages/core/dist/src/services/shellExecutionService.js
|
|
368857
369004
|
import { spawn as cpSpawn } from "node:child_process";
|
|
368858
369005
|
import { TextDecoder as TextDecoder2 } from "node:util";
|
|
368859
|
-
import
|
|
369006
|
+
import os26 from "node:os";
|
|
368860
369007
|
import fs44, { mkdirSync as mkdirSync3 } from "node:fs";
|
|
368861
369008
|
import path52 from "node:path";
|
|
368862
369009
|
function ensurePromptvarsDisabled(command, shell) {
|
|
@@ -369095,7 +369242,7 @@ var init_shellExecutionService = __esm({
|
|
|
369095
369242
|
return { finalBuffer };
|
|
369096
369243
|
};
|
|
369097
369244
|
var cleanup = cleanup2;
|
|
369098
|
-
const isWindows2 =
|
|
369245
|
+
const isWindows2 = os26.platform() === "win32";
|
|
369099
369246
|
const { executable, argsPrefix, shell } = getShellConfiguration();
|
|
369100
369247
|
const guardedCommand = ensurePromptvarsDisabled(commandToExecute, shell);
|
|
369101
369248
|
const spawnArgs = [...argsPrefix, guardedCommand];
|
|
@@ -369258,7 +369405,7 @@ var init_shellExecutionService = __esm({
|
|
|
369258
369405
|
}
|
|
369259
369406
|
const finalStrippedOutput = stripAnsi(combinedOutput).trim();
|
|
369260
369407
|
const exitCode = code;
|
|
369261
|
-
const exitSignal = signal ?
|
|
369408
|
+
const exitSignal = signal ? os26.constants.signals[signal] : null;
|
|
369262
369409
|
const resultPayload = {
|
|
369263
369410
|
rawOutput: finalBuffer,
|
|
369264
369411
|
output: finalStrippedOutput,
|
|
@@ -369771,7 +369918,7 @@ var init_shellExecutionService = __esm({
|
|
|
369771
369918
|
// packages/core/dist/src/tools/shell.js
|
|
369772
369919
|
import fsPromises10 from "node:fs/promises";
|
|
369773
369920
|
import path53 from "node:path";
|
|
369774
|
-
import
|
|
369921
|
+
import os27 from "node:os";
|
|
369775
369922
|
import crypto20 from "node:crypto";
|
|
369776
369923
|
var OUTPUT_UPDATE_INTERVAL_MS, BACKGROUND_DELAY_MS, ShellToolInvocation, ShellTool;
|
|
369777
369924
|
var init_shell2 = __esm({
|
|
@@ -369856,9 +370003,9 @@ var init_shell2 = __esm({
|
|
|
369856
370003
|
returnDisplay: "Command cancelled by user."
|
|
369857
370004
|
};
|
|
369858
370005
|
}
|
|
369859
|
-
const isWindows2 =
|
|
370006
|
+
const isWindows2 = os27.platform() === "win32";
|
|
369860
370007
|
const tempFileName = `shell_pgrep_${crypto20.randomBytes(6).toString("hex")}.tmp`;
|
|
369861
|
-
const tempFilePath = path53.join(
|
|
370008
|
+
const tempFilePath = path53.join(os27.tmpdir(), tempFileName);
|
|
369862
370009
|
const timeoutMs = this.context.config.getShellToolInactivityTimeout();
|
|
369863
370010
|
const timeoutController = new AbortController();
|
|
369864
370011
|
let timeoutTimer;
|
|
@@ -369954,7 +370101,7 @@ var init_shell2 = __esm({
|
|
|
369954
370101
|
}
|
|
369955
370102
|
const result2 = await resultPromise;
|
|
369956
370103
|
const backgroundPIDs = [];
|
|
369957
|
-
if (
|
|
370104
|
+
if (os27.platform() !== "win32") {
|
|
369958
370105
|
let tempFileExists = false;
|
|
369959
370106
|
try {
|
|
369960
370107
|
await fsPromises10.access(tempFilePath);
|
|
@@ -369964,7 +370111,7 @@ var init_shell2 = __esm({
|
|
|
369964
370111
|
}
|
|
369965
370112
|
if (tempFileExists) {
|
|
369966
370113
|
const pgrepContent = await fsPromises10.readFile(tempFilePath, "utf8");
|
|
369967
|
-
const pgrepLines = pgrepContent.split(
|
|
370114
|
+
const pgrepLines = pgrepContent.split(os27.EOL).filter(Boolean);
|
|
369968
370115
|
for (const line of pgrepLines) {
|
|
369969
370116
|
if (!/^\d+$/.test(line)) {
|
|
369970
370117
|
debugLogger.error(`pgrep: ${line}`);
|
|
@@ -400332,7 +400479,7 @@ var require_service_config2 = __commonJS({
|
|
|
400332
400479
|
exports2.validateRetryThrottling = validateRetryThrottling;
|
|
400333
400480
|
exports2.validateServiceConfig = validateServiceConfig;
|
|
400334
400481
|
exports2.extractAndSelectServiceConfig = extractAndSelectServiceConfig;
|
|
400335
|
-
var
|
|
400482
|
+
var os28 = __require("os");
|
|
400336
400483
|
var constants_1 = require_constants11();
|
|
400337
400484
|
var DURATION_REGEX = /^\d+(\.\d{1,9})?s$/;
|
|
400338
400485
|
var CLIENT_LANGUAGE_STRING = "node";
|
|
@@ -400631,7 +400778,7 @@ var require_service_config2 = __commonJS({
|
|
|
400631
400778
|
if (Array.isArray(validatedConfig.clientHostname)) {
|
|
400632
400779
|
let hostnameMatched = false;
|
|
400633
400780
|
for (const hostname3 of validatedConfig.clientHostname) {
|
|
400634
|
-
if (hostname3 ===
|
|
400781
|
+
if (hostname3 === os28.hostname()) {
|
|
400635
400782
|
hostnameMatched = true;
|
|
400636
400783
|
}
|
|
400637
400784
|
}
|
|
@@ -405061,7 +405208,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
405061
405208
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
405062
405209
|
exports2.Http2SubchannelCall = void 0;
|
|
405063
405210
|
var http22 = __require("http2");
|
|
405064
|
-
var
|
|
405211
|
+
var os28 = __require("os");
|
|
405065
405212
|
var constants_1 = require_constants11();
|
|
405066
405213
|
var metadata_1 = require_metadata7();
|
|
405067
405214
|
var stream_decoder_1 = require_stream_decoder2();
|
|
@@ -405069,7 +405216,7 @@ var require_subchannel_call2 = __commonJS({
|
|
|
405069
405216
|
var constants_2 = require_constants11();
|
|
405070
405217
|
var TRACER_NAME2 = "subchannel_call";
|
|
405071
405218
|
function getSystemErrorName(errno) {
|
|
405072
|
-
for (const [name3, num] of Object.entries(
|
|
405219
|
+
for (const [name3, num] of Object.entries(os28.constants.errno)) {
|
|
405073
405220
|
if (num === errno) {
|
|
405074
405221
|
return name3;
|
|
405075
405222
|
}
|
|
@@ -418764,6 +418911,7 @@ var init_registry = __esm({
|
|
|
418764
418911
|
agents = /* @__PURE__ */ new Map();
|
|
418765
418912
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
418766
418913
|
allDefinitions = /* @__PURE__ */ new Map();
|
|
418914
|
+
builtInAgents = /* @__PURE__ */ new Set();
|
|
418767
418915
|
constructor(config3) {
|
|
418768
418916
|
this.config = config3;
|
|
418769
418917
|
}
|
|
@@ -418774,6 +418922,12 @@ var init_registry = __esm({
|
|
|
418774
418922
|
coreEvents.on(CoreEvent.ModelChanged, this.onModelChanged);
|
|
418775
418923
|
await this.loadAgents();
|
|
418776
418924
|
}
|
|
418925
|
+
/**
|
|
418926
|
+
* Returns true if the agent is a built-in agent.
|
|
418927
|
+
*/
|
|
418928
|
+
isBuiltIn(name3) {
|
|
418929
|
+
return this.builtInAgents.has(name3);
|
|
418930
|
+
}
|
|
418777
418931
|
onModelChanged = () => {
|
|
418778
418932
|
this.refreshAgents().catch((e3) => {
|
|
418779
418933
|
debugLogger.error("[AgentRegistry] Failed to refresh agents on model change:", e3);
|
|
@@ -418890,12 +419044,20 @@ var init_registry = __esm({
|
|
|
418890
419044
|
}
|
|
418891
419045
|
}
|
|
418892
419046
|
loadBuiltInAgents() {
|
|
418893
|
-
|
|
418894
|
-
this.
|
|
418895
|
-
this.registerLocalAgent(
|
|
419047
|
+
const codebaseAgent = CodebaseInvestigatorAgent(this.config);
|
|
419048
|
+
this.builtInAgents.add(codebaseAgent.name);
|
|
419049
|
+
this.registerLocalAgent(codebaseAgent);
|
|
419050
|
+
const helpAgent = CliHelpAgent(this.config);
|
|
419051
|
+
this.builtInAgents.add(helpAgent.name);
|
|
419052
|
+
this.registerLocalAgent(helpAgent);
|
|
419053
|
+
const generalistAgent = GeneralistAgent(this.config);
|
|
419054
|
+
this.builtInAgents.add(generalistAgent.name);
|
|
419055
|
+
this.registerLocalAgent(generalistAgent);
|
|
418896
419056
|
const browserConfig = this.config.getBrowserAgentConfig();
|
|
418897
419057
|
if (browserConfig.enabled) {
|
|
418898
|
-
|
|
419058
|
+
const browserAgent = BrowserAgentDefinition(this.config);
|
|
419059
|
+
this.builtInAgents.add(browserAgent.name);
|
|
419060
|
+
this.registerLocalAgent(browserAgent);
|
|
418899
419061
|
}
|
|
418900
419062
|
}
|
|
418901
419063
|
async refreshAgents() {
|
|
@@ -430313,7 +430475,7 @@ var init_config4 = __esm({
|
|
|
430313
430475
|
this.model = params.model;
|
|
430314
430476
|
this.disableLoopDetection = params.disableLoopDetection ?? false;
|
|
430315
430477
|
this._activeModel = params.model;
|
|
430316
|
-
this.enableAgents = params.enableAgents ??
|
|
430478
|
+
this.enableAgents = params.enableAgents ?? false;
|
|
430317
430479
|
this.agents = params.agents ?? {};
|
|
430318
430480
|
this.disableLLMCorrection = params.disableLLMCorrection ?? true;
|
|
430319
430481
|
this.planEnabled = params.plan ?? true;
|
|
@@ -431870,7 +432032,7 @@ ${sections.join("\n")}
|
|
|
431870
432032
|
const definitions = this.agentRegistry.getAllDefinitions();
|
|
431871
432033
|
for (const definition of definitions) {
|
|
431872
432034
|
try {
|
|
431873
|
-
if (!this.isAgentsEnabled() || agentsOverrides[definition.name]?.enabled === false) {
|
|
432035
|
+
if (!this.isAgentsEnabled() && !this.agentRegistry.isBuiltIn(definition.name) || agentsOverrides[definition.name]?.enabled === false) {
|
|
431874
432036
|
continue;
|
|
431875
432037
|
}
|
|
431876
432038
|
const tool = new SubagentTool(definition, this, this.messageBus);
|
|
@@ -436165,7 +436327,7 @@ var require_main2 = __commonJS({
|
|
|
436165
436327
|
"packages/a2a-server/node_modules/dotenv/lib/main.js"(exports2, module2) {
|
|
436166
436328
|
var fs70 = __require("fs");
|
|
436167
436329
|
var path85 = __require("path");
|
|
436168
|
-
var
|
|
436330
|
+
var os28 = __require("os");
|
|
436169
436331
|
var crypto24 = __require("crypto");
|
|
436170
436332
|
var packageJson4 = require_package14();
|
|
436171
436333
|
var version4 = packageJson4.version;
|
|
@@ -436288,7 +436450,7 @@ var require_main2 = __commonJS({
|
|
|
436288
436450
|
return null;
|
|
436289
436451
|
}
|
|
436290
436452
|
function _resolveHome(envPath) {
|
|
436291
|
-
return envPath[0] === "~" ? path85.join(
|
|
436453
|
+
return envPath[0] === "~" ? path85.join(os28.homedir(), envPath.slice(1)) : envPath;
|
|
436292
436454
|
}
|
|
436293
436455
|
function _configVault(options) {
|
|
436294
436456
|
const debug2 = Boolean(options && options.debug);
|
|
@@ -452592,7 +452754,8 @@ async function loadConfig(settings, extensionLoader, taskId) {
|
|
|
452592
452754
|
checkpointing,
|
|
452593
452755
|
interactive: !isHeadlessMode(),
|
|
452594
452756
|
enableInteractiveShell: !isHeadlessMode(),
|
|
452595
|
-
ptyInfo: "auto"
|
|
452757
|
+
ptyInfo: "auto",
|
|
452758
|
+
enableAgents: settings.experimental?.enableAgents ?? false
|
|
452596
452759
|
};
|
|
452597
452760
|
const fileService = new FileDiscoveryService(workspaceDir, {
|
|
452598
452761
|
respectGitIgnore: configParams?.fileFiltering?.respectGitIgnore,
|