@google/gemini-cli-a2a-server 0.28.0-preview.5 → 0.29.0-nightly.20260206.4ffc349c1

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.
@@ -3563,7 +3563,7 @@ var require_end_of_stream = __commonJS({
3563
3563
  "node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(exports2, module2) {
3564
3564
  "use strict";
3565
3565
  var ERR_STREAM_PREMATURE_CLOSE = require_errors2().codes.ERR_STREAM_PREMATURE_CLOSE;
3566
- function once9(callback) {
3566
+ function once10(callback) {
3567
3567
  var called = false;
3568
3568
  return function() {
3569
3569
  if (called) return;
@@ -3582,7 +3582,7 @@ var require_end_of_stream = __commonJS({
3582
3582
  function eos(stream3, opts, callback) {
3583
3583
  if (typeof opts === "function") return eos(stream3, null, opts);
3584
3584
  if (!opts) opts = {};
3585
- callback = once9(callback || noop9);
3585
+ callback = once10(callback || noop9);
3586
3586
  var readable2 = opts.readable || opts.readable !== false && stream3.readable;
3587
3587
  var writable2 = opts.writable || opts.writable !== false && stream3.writable;
3588
3588
  var onlegacyfinish = function onlegacyfinish2() {
@@ -5747,8 +5747,8 @@ var require_once = __commonJS({
5747
5747
  Object.defineProperty(exports2, "__esModule", {
5748
5748
  value: true
5749
5749
  });
5750
- exports2.default = once9;
5751
- function once9(fn) {
5750
+ exports2.default = once10;
5751
+ function once10(fn) {
5752
5752
  function wrapper(...args2) {
5753
5753
  if (fn === null) return;
5754
5754
  var callFn = fn;
@@ -6199,7 +6199,7 @@ var require_pipeline = __commonJS({
6199
6199
  "node_modules/readable-stream/lib/internal/streams/pipeline.js"(exports2, module2) {
6200
6200
  "use strict";
6201
6201
  var eos;
6202
- function once9(callback) {
6202
+ function once10(callback) {
6203
6203
  var called = false;
6204
6204
  return function() {
6205
6205
  if (called) return;
@@ -6217,7 +6217,7 @@ var require_pipeline = __commonJS({
6217
6217
  return stream3.setHeader && typeof stream3.abort === "function";
6218
6218
  }
6219
6219
  function destroyer(stream3, reading, writing, callback) {
6220
- callback = once9(callback);
6220
+ callback = once10(callback);
6221
6221
  var closed = false;
6222
6222
  stream3.on("close", function() {
6223
6223
  closed = true;
@@ -9531,7 +9531,7 @@ var require_exception_handler = __commonJS({
9531
9531
  var os22 = __require("os");
9532
9532
  var asyncForEach = require_forEach();
9533
9533
  var debug2 = require_node2()("winston:exception");
9534
- var once9 = require_one_time();
9534
+ var once10 = require_one_time();
9535
9535
  var stackTrace = require_stack_trace();
9536
9536
  var ExceptionStream = require_exception_stream();
9537
9537
  module2.exports = class ExceptionHandler {
@@ -9689,7 +9689,7 @@ var require_exception_handler = __commonJS({
9689
9689
  return process.nextTick(gracefulExit);
9690
9690
  }
9691
9691
  asyncForEach(handlers, (handler, next) => {
9692
- const done = once9(next);
9692
+ const done = once10(next);
9693
9693
  const transport = handler.transport || handler;
9694
9694
  function onDone(event) {
9695
9695
  return () => {
@@ -9769,7 +9769,7 @@ var require_rejection_handler = __commonJS({
9769
9769
  var os22 = __require("os");
9770
9770
  var asyncForEach = require_forEach();
9771
9771
  var debug2 = require_node2()("winston:rejection");
9772
- var once9 = require_one_time();
9772
+ var once10 = require_one_time();
9773
9773
  var stackTrace = require_stack_trace();
9774
9774
  var RejectionStream = require_rejection_stream();
9775
9775
  module2.exports = class RejectionHandler {
@@ -9931,7 +9931,7 @@ var require_rejection_handler = __commonJS({
9931
9931
  asyncForEach(
9932
9932
  handlers,
9933
9933
  (handler, next) => {
9934
- const done = once9(next);
9934
+ const done = once10(next);
9935
9935
  const transport = handler.transport || handler;
9936
9936
  function onDone(event) {
9937
9937
  return () => {
@@ -34148,12 +34148,12 @@ var require_wrappy = __commonJS({
34148
34148
  var require_once2 = __commonJS({
34149
34149
  "node_modules/once/once.js"(exports2, module2) {
34150
34150
  var wrappy = require_wrappy();
34151
- module2.exports = wrappy(once9);
34151
+ module2.exports = wrappy(once10);
34152
34152
  module2.exports.strict = wrappy(onceStrict);
34153
- once9.proto = once9(function() {
34153
+ once10.proto = once10(function() {
34154
34154
  Object.defineProperty(Function.prototype, "once", {
34155
34155
  value: function() {
34156
- return once9(this);
34156
+ return once10(this);
34157
34157
  },
34158
34158
  configurable: true
34159
34159
  });
@@ -34164,7 +34164,7 @@ var require_once2 = __commonJS({
34164
34164
  configurable: true
34165
34165
  });
34166
34166
  });
34167
- function once9(fn) {
34167
+ function once10(fn) {
34168
34168
  var f3 = function() {
34169
34169
  if (f3.called) return f3.value;
34170
34170
  f3.called = true;
@@ -35243,7 +35243,7 @@ var require_application = __commonJS({
35243
35243
  var compileQueryParser = require_utils3().compileQueryParser;
35244
35244
  var compileTrust = require_utils3().compileTrust;
35245
35245
  var resolve15 = __require("node:path").resolve;
35246
- var once9 = require_once2();
35246
+ var once10 = require_once2();
35247
35247
  var Router = require_router();
35248
35248
  var slice = Array.prototype.slice;
35249
35249
  var flatten2 = Array.prototype.flat;
@@ -35473,7 +35473,7 @@ var require_application = __commonJS({
35473
35473
  var server = http8.createServer(this);
35474
35474
  var args2 = slice.call(arguments);
35475
35475
  if (typeof args2[args2.length - 1] === "function") {
35476
- var done = args2[args2.length - 1] = once9(args2[args2.length - 1]);
35476
+ var done = args2[args2.length - 1] = once10(args2[args2.length - 1]);
35477
35477
  server.once("error", done);
35478
35478
  }
35479
35479
  return server.listen.apply(server, args2);
@@ -51519,7 +51519,7 @@ var require_dist4 = __commonJS({
51519
51519
  "node_modules/@tootallnate/once/dist/index.js"(exports2) {
51520
51520
  "use strict";
51521
51521
  Object.defineProperty(exports2, "__esModule", { value: true });
51522
- function once9(emitter, name4, { signal } = {}) {
51522
+ function once10(emitter, name4, { signal } = {}) {
51523
51523
  return new Promise((resolve15, reject) => {
51524
51524
  function cleanup() {
51525
51525
  signal === null || signal === void 0 ? void 0 : signal.removeEventListener("abort", cleanup);
@@ -51539,7 +51539,7 @@ var require_dist4 = __commonJS({
51539
51539
  emitter.on("error", onError2);
51540
51540
  });
51541
51541
  }
51542
- exports2.default = once9;
51542
+ exports2.default = once10;
51543
51543
  }
51544
51544
  });
51545
51545
 
@@ -51548,7 +51548,7 @@ var require_promisify = __commonJS({
51548
51548
  "node_modules/teeny-request/node_modules/agent-base/dist/src/promisify.js"(exports2) {
51549
51549
  "use strict";
51550
51550
  Object.defineProperty(exports2, "__esModule", { value: true });
51551
- function promisify14(fn) {
51551
+ function promisify15(fn) {
51552
51552
  return function(req, opts) {
51553
51553
  return new Promise((resolve15, reject) => {
51554
51554
  fn.call(this, req, opts, (err2, rtn) => {
@@ -51561,7 +51561,7 @@ var require_promisify = __commonJS({
51561
51561
  });
51562
51562
  };
51563
51563
  }
51564
- exports2.default = promisify14;
51564
+ exports2.default = promisify15;
51565
51565
  }
51566
51566
  });
51567
51567
 
@@ -52710,7 +52710,7 @@ var require_package_json_helper = __commonJS({
52710
52710
  // node_modules/end-of-stream/index.js
52711
52711
  var require_end_of_stream2 = __commonJS({
52712
52712
  "node_modules/end-of-stream/index.js"(exports2, module2) {
52713
- var once9 = require_once2();
52713
+ var once10 = require_once2();
52714
52714
  var noop9 = function() {
52715
52715
  };
52716
52716
  var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
@@ -52723,7 +52723,7 @@ var require_end_of_stream2 = __commonJS({
52723
52723
  var eos = function(stream3, opts, callback) {
52724
52724
  if (typeof opts === "function") return eos(stream3, null, opts);
52725
52725
  if (!opts) opts = {};
52726
- callback = once9(callback || noop9);
52726
+ callback = once10(callback || noop9);
52727
52727
  var ws2 = stream3._writableState;
52728
52728
  var rs = stream3._readableState;
52729
52729
  var readable2 = opts.readable || opts.readable !== false && stream3.readable;
@@ -53012,7 +53012,7 @@ var require_src10 = __commonJS({
53012
53012
  "use strict";
53013
53013
  Object.defineProperty(exports2, "__esModule", { value: true });
53014
53014
  exports2.callbackifyAll = exports2.callbackify = exports2.promisifyAll = exports2.promisify = void 0;
53015
- function promisify14(originalMethod, options) {
53015
+ function promisify15(originalMethod, options) {
53016
53016
  if (originalMethod.promisified_) {
53017
53017
  return originalMethod;
53018
53018
  }
@@ -53054,7 +53054,7 @@ var require_src10 = __commonJS({
53054
53054
  wrapper.promisified_ = true;
53055
53055
  return wrapper;
53056
53056
  }
53057
- exports2.promisify = promisify14;
53057
+ exports2.promisify = promisify15;
53058
53058
  function promisifyAll10(Class2, options) {
53059
53059
  const exclude = options && options.exclude || [];
53060
53060
  const ownPropertyNames = Object.getOwnPropertyNames(Class2.prototype);
@@ -91733,6 +91733,8 @@ var init_events = __esm({
91733
91733
  CoreEvent2["RetryAttempt"] = "retry-attempt";
91734
91734
  CoreEvent2["ConsentRequest"] = "consent-request";
91735
91735
  CoreEvent2["AgentsDiscovered"] = "agents-discovered";
91736
+ CoreEvent2["RequestEditorSelection"] = "request-editor-selection";
91737
+ CoreEvent2["EditorSelected"] = "editor-selected";
91736
91738
  })(CoreEvent || (CoreEvent = {}));
91737
91739
  CoreEventEmitter = class _CoreEventEmitter extends EventEmitter3 {
91738
91740
  _eventBacklog = [];
@@ -92114,7 +92116,7 @@ function isValidToolName(name4, options = {}) {
92114
92116
  }
92115
92117
  return false;
92116
92118
  }
92117
- var GLOB_TOOL_NAME, WRITE_TODOS_TOOL_NAME, WRITE_FILE_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WEB_FETCH_TOOL_NAME, EDIT_TOOL_NAME, SHELL_TOOL_NAME, GREP_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, READ_FILE_TOOL_NAME, LS_TOOL_NAME, MEMORY_TOOL_NAME, GET_INTERNAL_DOCS_TOOL_NAME, ACTIVATE_SKILL_TOOL_NAME, EDIT_TOOL_NAMES, ASK_USER_TOOL_NAME, ASK_USER_DISPLAY_NAME, EXIT_PLAN_MODE_TOOL_NAME, TOOL_LEGACY_ALIASES, DISCOVERED_TOOL_PREFIX, ALL_BUILTIN_TOOL_NAMES, PLAN_MODE_TOOLS;
92119
+ var GLOB_TOOL_NAME, WRITE_TODOS_TOOL_NAME, WRITE_FILE_TOOL_NAME, WEB_SEARCH_TOOL_NAME, WEB_FETCH_TOOL_NAME, EDIT_TOOL_NAME, SHELL_TOOL_NAME, GREP_TOOL_NAME, READ_MANY_FILES_TOOL_NAME, READ_FILE_TOOL_NAME, LS_TOOL_NAME, MEMORY_TOOL_NAME, GET_INTERNAL_DOCS_TOOL_NAME, ACTIVATE_SKILL_TOOL_NAME, EDIT_TOOL_NAMES, ASK_USER_TOOL_NAME, ASK_USER_DISPLAY_NAME, EXIT_PLAN_MODE_TOOL_NAME, ENTER_PLAN_MODE_TOOL_NAME, TOOL_LEGACY_ALIASES, DISCOVERED_TOOL_PREFIX, ALL_BUILTIN_TOOL_NAMES, PLAN_MODE_TOOLS;
92118
92120
  var init_tool_names = __esm({
92119
92121
  "packages/core/dist/src/tools/tool-names.js"() {
92120
92122
  "use strict";
@@ -92136,6 +92138,7 @@ var init_tool_names = __esm({
92136
92138
  ASK_USER_TOOL_NAME = "ask_user";
92137
92139
  ASK_USER_DISPLAY_NAME = "Ask User";
92138
92140
  EXIT_PLAN_MODE_TOOL_NAME = "exit_plan_mode";
92141
+ ENTER_PLAN_MODE_TOOL_NAME = "enter_plan_mode";
92139
92142
  TOOL_LEGACY_ALIASES = {
92140
92143
  // Add future renames here, e.g.:
92141
92144
  search_file_content: GREP_TOOL_NAME
@@ -162312,7 +162315,7 @@ var require_util12 = __commonJS({
162312
162315
  var fs70 = __require("fs");
162313
162316
  var path82 = __require("path");
162314
162317
  var spawn9 = __require("child_process").spawn;
162315
- var exec2 = __require("child_process").exec;
162318
+ var exec3 = __require("child_process").exec;
162316
162319
  var execSync3 = __require("child_process").execSync;
162317
162320
  var util5 = __require("util");
162318
162321
  var _platform = process.platform;
@@ -162920,7 +162923,7 @@ var require_util12 = __commonJS({
162920
162923
  opts = execOptsWin;
162921
162924
  }
162922
162925
  let newCmd = "chcp 65001 > nul && cmd /C " + cmd + " && chcp " + codepage + " > nul";
162923
- exec2(newCmd, opts, (error2, stdout) => {
162926
+ exec3(newCmd, opts, (error2, stdout) => {
162924
162927
  callback(error2, stdout);
162925
162928
  });
162926
162929
  }
@@ -163326,7 +163329,7 @@ var require_util12 = __commonJS({
163326
163329
  };
163327
163330
  });
163328
163331
  }
163329
- function promisify14(nodeStyleFunction) {
163332
+ function promisify15(nodeStyleFunction) {
163330
163333
  return () => {
163331
163334
  const args2 = Array.prototype.slice.call(arguments);
163332
163335
  return new Promise((resolve15, reject) => {
@@ -164821,7 +164824,7 @@ var require_util12 = __commonJS({
164821
164824
  exports2.decodePiCpuinfo = decodePiCpuinfo;
164822
164825
  exports2.getRpiGpu = getRpiGpu;
164823
164826
  exports2.promiseAll = promiseAll;
164824
- exports2.promisify = promisify14;
164827
+ exports2.promisify = promisify15;
164825
164828
  exports2.promisifySave = promisifySave;
164826
164829
  exports2.smartMonToolsInstalled = smartMonToolsInstalled;
164827
164830
  exports2.linuxVersion = linuxVersion;
@@ -164853,7 +164856,7 @@ var require_osinfo = __commonJS({
164853
164856
  var os22 = __require("os");
164854
164857
  var fs70 = __require("fs");
164855
164858
  var util5 = require_util12();
164856
- var exec2 = __require("child_process").exec;
164859
+ var exec3 = __require("child_process").exec;
164857
164860
  var execSync3 = __require("child_process").execSync;
164858
164861
  var _platform = process.platform;
164859
164862
  var _linux = _platform === "linux" || _platform === "android";
@@ -165056,7 +165059,7 @@ var require_osinfo = __commonJS({
165056
165059
  uefi: false
165057
165060
  };
165058
165061
  if (_linux) {
165059
- exec2("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release", (error2, stdout) => {
165062
+ exec3("cat /etc/*-release; cat /usr/lib/os-release; cat /etc/openwrt_release", (error2, stdout) => {
165060
165063
  let release2 = {};
165061
165064
  let lines = stdout.toString().split("\n");
165062
165065
  lines.forEach((line) => {
@@ -165093,7 +165096,7 @@ var require_osinfo = __commonJS({
165093
165096
  });
165094
165097
  }
165095
165098
  if (_freebsd || _openbsd || _netbsd) {
165096
- exec2("sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod kern.geom.confxml", (error2, stdout) => {
165099
+ exec3("sysctl kern.ostype kern.osrelease kern.osrevision kern.hostuuid machdep.bootmethod kern.geom.confxml", (error2, stdout) => {
165097
165100
  let lines = stdout.toString().split("\n");
165098
165101
  const distro = util5.getValue(lines, "kern.ostype");
165099
165102
  const logofile = getLogoFile(distro);
@@ -165116,7 +165119,7 @@ var require_osinfo = __commonJS({
165116
165119
  });
165117
165120
  }
165118
165121
  if (_darwin) {
165119
- exec2("sw_vers; sysctl kern.ostype kern.osrelease kern.osrevision kern.uuid", (error2, stdout) => {
165122
+ exec3("sw_vers; sysctl kern.ostype kern.osrelease kern.osrevision kern.uuid", (error2, stdout) => {
165120
165123
  let lines = stdout.toString().split("\n");
165121
165124
  result2.serial = util5.getValue(lines, "kern.uuid");
165122
165125
  result2.distro = util5.getValue(lines, "ProductName");
@@ -165152,7 +165155,7 @@ var require_osinfo = __commonJS({
165152
165155
  }
165153
165156
  if (_sunos) {
165154
165157
  result2.release = result2.kernel;
165155
- exec2("uname -o", (error2, stdout) => {
165158
+ exec3("uname -o", (error2, stdout) => {
165156
165159
  const lines = stdout.toString().split("\n");
165157
165160
  result2.distro = lines[0];
165158
165161
  result2.logofile = getLogoFile(result2.distro);
@@ -165216,7 +165219,7 @@ var require_osinfo = __commonJS({
165216
165219
  if (!err2) {
165217
165220
  return resolve15(true);
165218
165221
  } else {
165219
- exec2('dmesg | grep -E "EFI v"', (error2, stdout) => {
165222
+ exec3('dmesg | grep -E "EFI v"', (error2, stdout) => {
165220
165223
  if (!error2) {
165221
165224
  const lines = stdout.toString().split("\n");
165222
165225
  return resolve15(lines.length > 0);
@@ -165232,12 +165235,12 @@ var require_osinfo = __commonJS({
165232
165235
  return new Promise((resolve15) => {
165233
165236
  process.nextTick(() => {
165234
165237
  try {
165235
- exec2('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"', util5.execOptsWin, (error2, stdout) => {
165238
+ exec3('findstr /C:"Detected boot environment" "%windir%\\Panther\\setupact.log"', util5.execOptsWin, (error2, stdout) => {
165236
165239
  if (!error2) {
165237
165240
  const line = stdout.toString().split("\n\r")[0];
165238
165241
  return resolve15(line.toLowerCase().indexOf("efi") >= 0);
165239
165242
  } else {
165240
- exec2("echo %firmware_type%", util5.execOptsWin, (error3, stdout2) => {
165243
+ exec3("echo %firmware_type%", util5.execOptsWin, (error3, stdout2) => {
165241
165244
  if (!error3) {
165242
165245
  const line = stdout2.toString() || "";
165243
165246
  return resolve15(line.toLowerCase().indexOf("efi") >= 0);
@@ -165360,7 +165363,7 @@ var require_osinfo = __commonJS({
165360
165363
  try {
165361
165364
  if ({}.hasOwnProperty.call(appsObj.versions, "openssl")) {
165362
165365
  appsObj.versions.openssl = process.versions.openssl;
165363
- exec2("openssl version", (error2, stdout) => {
165366
+ exec3("openssl version", (error2, stdout) => {
165364
165367
  if (!error2) {
165365
165368
  let openssl_string = stdout.toString().split("\n")[0].trim();
165366
165369
  let openssl = openssl_string.split(" ");
@@ -165371,7 +165374,7 @@ var require_osinfo = __commonJS({
165371
165374
  });
165372
165375
  }
165373
165376
  if ({}.hasOwnProperty.call(appsObj.versions, "npm")) {
165374
- exec2("npm -v", (error2, stdout) => {
165377
+ exec3("npm -v", (error2, stdout) => {
165375
165378
  if (!error2) {
165376
165379
  appsObj.versions.npm = stdout.toString().split("\n")[0];
165377
165380
  }
@@ -165383,7 +165386,7 @@ var require_osinfo = __commonJS({
165383
165386
  if (_windows) {
165384
165387
  cmd += ".cmd";
165385
165388
  }
165386
- exec2(`${cmd} -v`, (error2, stdout) => {
165389
+ exec3(`${cmd} -v`, (error2, stdout) => {
165387
165390
  if (!error2) {
165388
165391
  let pm2 = stdout.toString().split("\n")[0].trim();
165389
165392
  if (!pm2.startsWith("[PM2]")) {
@@ -165394,7 +165397,7 @@ var require_osinfo = __commonJS({
165394
165397
  });
165395
165398
  }
165396
165399
  if ({}.hasOwnProperty.call(appsObj.versions, "yarn")) {
165397
- exec2("yarn --version", (error2, stdout) => {
165400
+ exec3("yarn --version", (error2, stdout) => {
165398
165401
  if (!error2) {
165399
165402
  appsObj.versions.yarn = stdout.toString().split("\n")[0];
165400
165403
  }
@@ -165406,7 +165409,7 @@ var require_osinfo = __commonJS({
165406
165409
  if (_windows) {
165407
165410
  cmd += ".cmd";
165408
165411
  }
165409
- exec2(`${cmd} --version`, (error2, stdout) => {
165412
+ exec3(`${cmd} --version`, (error2, stdout) => {
165410
165413
  if (!error2) {
165411
165414
  const gulp = stdout.toString().split("\n")[0] || "";
165412
165415
  appsObj.versions.gulp = (gulp.toLowerCase().split("version")[1] || "").trim();
@@ -165416,7 +165419,7 @@ var require_osinfo = __commonJS({
165416
165419
  }
165417
165420
  if ({}.hasOwnProperty.call(appsObj.versions, "homebrew")) {
165418
165421
  cmd = "brew";
165419
- exec2(`${cmd} --version`, (error2, stdout) => {
165422
+ exec3(`${cmd} --version`, (error2, stdout) => {
165420
165423
  if (!error2) {
165421
165424
  const brew = stdout.toString().split("\n")[0] || "";
165422
165425
  appsObj.versions.homebrew = (brew.toLowerCase().split(" ")[1] || "").trim();
@@ -165429,7 +165432,7 @@ var require_osinfo = __commonJS({
165429
165432
  if (_windows) {
165430
165433
  cmd += ".cmd";
165431
165434
  }
165432
- exec2(`${cmd} --version`, (error2, stdout) => {
165435
+ exec3(`${cmd} --version`, (error2, stdout) => {
165433
165436
  if (!error2) {
165434
165437
  const tsc = stdout.toString().split("\n")[0] || "";
165435
165438
  appsObj.versions.tsc = (tsc.toLowerCase().split("version")[1] || "").trim();
@@ -165442,7 +165445,7 @@ var require_osinfo = __commonJS({
165442
165445
  if (_windows) {
165443
165446
  cmd += ".cmd";
165444
165447
  }
165445
- exec2(`${cmd} --version`, (error2, stdout) => {
165448
+ exec3(`${cmd} --version`, (error2, stdout) => {
165446
165449
  if (!error2) {
165447
165450
  const grunt = stdout.toString().split("\n")[0] || "";
165448
165451
  appsObj.versions.grunt = (grunt.toLowerCase().split("cli v")[1] || "").trim();
@@ -165454,7 +165457,7 @@ var require_osinfo = __commonJS({
165454
165457
  if (_darwin) {
165455
165458
  const gitHomebrewExists = fs70.existsSync("/usr/local/Cellar/git") || fs70.existsSync("/opt/homebrew/bin/git");
165456
165459
  if (util5.darwinXcodeExists() || gitHomebrewExists) {
165457
- exec2("git --version", (error2, stdout) => {
165460
+ exec3("git --version", (error2, stdout) => {
165458
165461
  if (!error2) {
165459
165462
  let git = stdout.toString().split("\n")[0] || "";
165460
165463
  git = (git.toLowerCase().split("version")[1] || "").trim();
@@ -165466,7 +165469,7 @@ var require_osinfo = __commonJS({
165466
165469
  functionProcessed();
165467
165470
  }
165468
165471
  } else {
165469
- exec2("git --version", (error2, stdout) => {
165472
+ exec3("git --version", (error2, stdout) => {
165470
165473
  if (!error2) {
165471
165474
  let git = stdout.toString().split("\n")[0] || "";
165472
165475
  git = (git.toLowerCase().split("version")[1] || "").trim();
@@ -165477,7 +165480,7 @@ var require_osinfo = __commonJS({
165477
165480
  }
165478
165481
  }
165479
165482
  if ({}.hasOwnProperty.call(appsObj.versions, "apache")) {
165480
- exec2("apachectl -v 2>&1", (error2, stdout) => {
165483
+ exec3("apachectl -v 2>&1", (error2, stdout) => {
165481
165484
  if (!error2) {
165482
165485
  const apache = (stdout.toString().split("\n")[0] || "").split(":");
165483
165486
  appsObj.versions.apache = apache.length > 1 ? apache[1].replace("Apache", "").replace("/", "").split("(")[0].trim() : "";
@@ -165486,7 +165489,7 @@ var require_osinfo = __commonJS({
165486
165489
  });
165487
165490
  }
165488
165491
  if ({}.hasOwnProperty.call(appsObj.versions, "nginx")) {
165489
- exec2("nginx -v 2>&1", (error2, stdout) => {
165492
+ exec3("nginx -v 2>&1", (error2, stdout) => {
165490
165493
  if (!error2) {
165491
165494
  const nginx = stdout.toString().split("\n")[0] || "";
165492
165495
  appsObj.versions.nginx = (nginx.toLowerCase().split("/")[1] || "").trim();
@@ -165495,7 +165498,7 @@ var require_osinfo = __commonJS({
165495
165498
  });
165496
165499
  }
165497
165500
  if ({}.hasOwnProperty.call(appsObj.versions, "mysql")) {
165498
- exec2("mysql -V", (error2, stdout) => {
165501
+ exec3("mysql -V", (error2, stdout) => {
165499
165502
  if (!error2) {
165500
165503
  let mysql = stdout.toString().split("\n")[0] || "";
165501
165504
  mysql = mysql.toLowerCase();
@@ -165514,7 +165517,7 @@ var require_osinfo = __commonJS({
165514
165517
  });
165515
165518
  }
165516
165519
  if ({}.hasOwnProperty.call(appsObj.versions, "php")) {
165517
- exec2("php -v", (error2, stdout) => {
165520
+ exec3("php -v", (error2, stdout) => {
165518
165521
  if (!error2) {
165519
165522
  const php = stdout.toString().split("\n")[0] || "";
165520
165523
  let parts2 = php.split("(");
@@ -165527,7 +165530,7 @@ var require_osinfo = __commonJS({
165527
165530
  });
165528
165531
  }
165529
165532
  if ({}.hasOwnProperty.call(appsObj.versions, "redis")) {
165530
- exec2("redis-server --version", (error2, stdout) => {
165533
+ exec3("redis-server --version", (error2, stdout) => {
165531
165534
  if (!error2) {
165532
165535
  const redis = stdout.toString().split("\n")[0] || "";
165533
165536
  const parts2 = redis.split(" ");
@@ -165537,7 +165540,7 @@ var require_osinfo = __commonJS({
165537
165540
  });
165538
165541
  }
165539
165542
  if ({}.hasOwnProperty.call(appsObj.versions, "docker")) {
165540
- exec2("docker --version", (error2, stdout) => {
165543
+ exec3("docker --version", (error2, stdout) => {
165541
165544
  if (!error2) {
165542
165545
  const docker = stdout.toString().split("\n")[0] || "";
165543
165546
  const parts2 = docker.split(" ");
@@ -165547,7 +165550,7 @@ var require_osinfo = __commonJS({
165547
165550
  });
165548
165551
  }
165549
165552
  if ({}.hasOwnProperty.call(appsObj.versions, "postfix")) {
165550
- exec2("postconf -d | grep mail_version", (error2, stdout) => {
165553
+ exec3("postconf -d | grep mail_version", (error2, stdout) => {
165551
165554
  if (!error2) {
165552
165555
  const postfix = stdout.toString().split("\n") || [];
165553
165556
  appsObj.versions.postfix = util5.getValue(postfix, "mail_version", "=", true);
@@ -165556,7 +165559,7 @@ var require_osinfo = __commonJS({
165556
165559
  });
165557
165560
  }
165558
165561
  if ({}.hasOwnProperty.call(appsObj.versions, "mongodb")) {
165559
- exec2("mongod --version", (error2, stdout) => {
165562
+ exec3("mongod --version", (error2, stdout) => {
165560
165563
  if (!error2) {
165561
165564
  const mongodb = stdout.toString().split("\n")[0] || "";
165562
165565
  appsObj.versions.mongodb = (mongodb.toLowerCase().split(",")[0] || "").replace(/[^0-9.]/g, "");
@@ -165566,11 +165569,11 @@ var require_osinfo = __commonJS({
165566
165569
  }
165567
165570
  if ({}.hasOwnProperty.call(appsObj.versions, "postgresql")) {
165568
165571
  if (_linux) {
165569
- exec2("locate bin/postgres", (error2, stdout) => {
165572
+ exec3("locate bin/postgres", (error2, stdout) => {
165570
165573
  if (!error2) {
165571
165574
  const postgresqlBin = stdout.toString().split("\n").sort();
165572
165575
  if (postgresqlBin.length) {
165573
- exec2(postgresqlBin[postgresqlBin.length - 1] + " -V", (error3, stdout2) => {
165576
+ exec3(postgresqlBin[postgresqlBin.length - 1] + " -V", (error3, stdout2) => {
165574
165577
  if (!error3) {
165575
165578
  const postgresql = stdout2.toString().split("\n")[0].split(" ") || [];
165576
165579
  appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : "";
@@ -165581,7 +165584,7 @@ var require_osinfo = __commonJS({
165581
165584
  functionProcessed();
165582
165585
  }
165583
165586
  } else {
165584
- exec2("psql -V", (error3, stdout2) => {
165587
+ exec3("psql -V", (error3, stdout2) => {
165585
165588
  if (!error3) {
165586
165589
  const postgresql = stdout2.toString().split("\n")[0].split(" ") || [];
165587
165590
  appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : "";
@@ -165610,12 +165613,12 @@ var require_osinfo = __commonJS({
165610
165613
  functionProcessed();
165611
165614
  });
165612
165615
  } else {
165613
- exec2("postgres -V", (error2, stdout) => {
165616
+ exec3("postgres -V", (error2, stdout) => {
165614
165617
  if (!error2) {
165615
165618
  const postgresql = stdout.toString().split("\n")[0].split(" ") || [];
165616
165619
  appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : "";
165617
165620
  } else {
165618
- exec2("pg_config --version", (error3, stdout2) => {
165621
+ exec3("pg_config --version", (error3, stdout2) => {
165619
165622
  if (!error3) {
165620
165623
  const postgresql = stdout2.toString().split("\n")[0].split(" ") || [];
165621
165624
  appsObj.versions.postgresql = postgresql.length ? postgresql[postgresql.length - 1] : "";
@@ -165628,7 +165631,7 @@ var require_osinfo = __commonJS({
165628
165631
  }
165629
165632
  }
165630
165633
  if ({}.hasOwnProperty.call(appsObj.versions, "perl")) {
165631
- exec2("perl -v", (error2, stdout) => {
165634
+ exec3("perl -v", (error2, stdout) => {
165632
165635
  if (!error2) {
165633
165636
  const perl = stdout.toString().split("\n") || "";
165634
165637
  while (perl.length > 0 && perl[0].trim() === "") {
@@ -165651,7 +165654,7 @@ var require_osinfo = __commonJS({
165651
165654
  const gitHomebrewExists2 = fs70.existsSync("/opt/homebrew/bin/python");
165652
165655
  if (util5.darwinXcodeExists() && util5.semverCompare("12.0.1", osVersion) < 0 || gitHomebrewExists1 || gitHomebrewExists2) {
165653
165656
  const cmd2 = gitHomebrewExists1 ? "/usr/local/Cellar/python -V 2>&1" : gitHomebrewExists2 ? "/opt/homebrew/bin/python -V 2>&1" : "python -V 2>&1";
165654
- exec2(cmd2, (error2, stdout2) => {
165657
+ exec3(cmd2, (error2, stdout2) => {
165655
165658
  if (!error2) {
165656
165659
  const python = stdout2.toString().split("\n")[0] || "";
165657
165660
  appsObj.versions.python = python.toLowerCase().replace("python", "").trim();
@@ -165665,7 +165668,7 @@ var require_osinfo = __commonJS({
165665
165668
  functionProcessed();
165666
165669
  }
165667
165670
  } else {
165668
- exec2("python -V 2>&1", (error2, stdout) => {
165671
+ exec3("python -V 2>&1", (error2, stdout) => {
165669
165672
  if (!error2) {
165670
165673
  const python = stdout.toString().split("\n")[0] || "";
165671
165674
  appsObj.versions.python = python.toLowerCase().replace("python", "").trim();
@@ -165678,7 +165681,7 @@ var require_osinfo = __commonJS({
165678
165681
  if (_darwin) {
165679
165682
  const gitHomebrewExists = fs70.existsSync("/usr/local/Cellar/python3") || fs70.existsSync("/opt/homebrew/bin/python3");
165680
165683
  if (util5.darwinXcodeExists() || gitHomebrewExists) {
165681
- exec2("python3 -V 2>&1", (error2, stdout) => {
165684
+ exec3("python3 -V 2>&1", (error2, stdout) => {
165682
165685
  if (!error2) {
165683
165686
  const python = stdout.toString().split("\n")[0] || "";
165684
165687
  appsObj.versions.python3 = python.toLowerCase().replace("python", "").trim();
@@ -165689,7 +165692,7 @@ var require_osinfo = __commonJS({
165689
165692
  functionProcessed();
165690
165693
  }
165691
165694
  } else {
165692
- exec2("python3 -V 2>&1", (error2, stdout) => {
165695
+ exec3("python3 -V 2>&1", (error2, stdout) => {
165693
165696
  if (!error2) {
165694
165697
  const python = stdout.toString().split("\n")[0] || "";
165695
165698
  appsObj.versions.python3 = python.toLowerCase().replace("python", "").trim();
@@ -165702,7 +165705,7 @@ var require_osinfo = __commonJS({
165702
165705
  if (_darwin) {
165703
165706
  const gitHomebrewExists = fs70.existsSync("/usr/local/Cellar/pip") || fs70.existsSync("/opt/homebrew/bin/pip");
165704
165707
  if (util5.darwinXcodeExists() || gitHomebrewExists) {
165705
- exec2("pip -V 2>&1", (error2, stdout) => {
165708
+ exec3("pip -V 2>&1", (error2, stdout) => {
165706
165709
  if (!error2) {
165707
165710
  const pip = stdout.toString().split("\n")[0] || "";
165708
165711
  const parts2 = pip.split(" ");
@@ -165714,7 +165717,7 @@ var require_osinfo = __commonJS({
165714
165717
  functionProcessed();
165715
165718
  }
165716
165719
  } else {
165717
- exec2("pip -V 2>&1", (error2, stdout) => {
165720
+ exec3("pip -V 2>&1", (error2, stdout) => {
165718
165721
  if (!error2) {
165719
165722
  const pip = stdout.toString().split("\n")[0] || "";
165720
165723
  const parts2 = pip.split(" ");
@@ -165728,7 +165731,7 @@ var require_osinfo = __commonJS({
165728
165731
  if (_darwin) {
165729
165732
  const gitHomebrewExists = fs70.existsSync("/usr/local/Cellar/pip3") || fs70.existsSync("/opt/homebrew/bin/pip3");
165730
165733
  if (util5.darwinXcodeExists() || gitHomebrewExists) {
165731
- exec2("pip3 -V 2>&1", (error2, stdout) => {
165734
+ exec3("pip3 -V 2>&1", (error2, stdout) => {
165732
165735
  if (!error2) {
165733
165736
  const pip = stdout.toString().split("\n")[0] || "";
165734
165737
  const parts2 = pip.split(" ");
@@ -165740,7 +165743,7 @@ var require_osinfo = __commonJS({
165740
165743
  functionProcessed();
165741
165744
  }
165742
165745
  } else {
165743
- exec2("pip3 -V 2>&1", (error2, stdout) => {
165746
+ exec3("pip3 -V 2>&1", (error2, stdout) => {
165744
165747
  if (!error2) {
165745
165748
  const pip = stdout.toString().split("\n")[0] || "";
165746
165749
  const parts2 = pip.split(" ");
@@ -165752,9 +165755,9 @@ var require_osinfo = __commonJS({
165752
165755
  }
165753
165756
  if ({}.hasOwnProperty.call(appsObj.versions, "java")) {
165754
165757
  if (_darwin) {
165755
- exec2("/usr/libexec/java_home -V 2>&1", (error2, stdout) => {
165758
+ exec3("/usr/libexec/java_home -V 2>&1", (error2, stdout) => {
165756
165759
  if (!error2 && stdout.toString().toLowerCase().indexOf("no java runtime") === -1) {
165757
- exec2("java -version 2>&1", (error3, stdout2) => {
165760
+ exec3("java -version 2>&1", (error3, stdout2) => {
165758
165761
  if (!error3) {
165759
165762
  const java = stdout2.toString().split("\n")[0] || "";
165760
165763
  const parts2 = java.split('"');
@@ -165767,7 +165770,7 @@ var require_osinfo = __commonJS({
165767
165770
  }
165768
165771
  });
165769
165772
  } else {
165770
- exec2("java -version 2>&1", (error2, stdout) => {
165773
+ exec3("java -version 2>&1", (error2, stdout) => {
165771
165774
  if (!error2) {
165772
165775
  const java = stdout.toString().split("\n")[0] || "";
165773
165776
  const parts2 = java.split('"');
@@ -165779,14 +165782,14 @@ var require_osinfo = __commonJS({
165779
165782
  }
165780
165783
  if ({}.hasOwnProperty.call(appsObj.versions, "gcc")) {
165781
165784
  if (_darwin && util5.darwinXcodeExists() || !_darwin) {
165782
- exec2("gcc -dumpversion", (error2, stdout) => {
165785
+ exec3("gcc -dumpversion", (error2, stdout) => {
165783
165786
  if (!error2) {
165784
165787
  appsObj.versions.gcc = stdout.toString().split("\n")[0].trim() || "";
165785
165788
  }
165786
165789
  if (appsObj.versions.gcc.indexOf(".") > -1) {
165787
165790
  functionProcessed();
165788
165791
  } else {
165789
- exec2("gcc --version", (error3, stdout2) => {
165792
+ exec3("gcc --version", (error3, stdout2) => {
165790
165793
  if (!error3) {
165791
165794
  const gcc = stdout2.toString().split("\n")[0].trim();
165792
165795
  if (gcc.indexOf("gcc") > -1 && gcc.indexOf(")") > -1) {
@@ -165803,7 +165806,7 @@ var require_osinfo = __commonJS({
165803
165806
  }
165804
165807
  }
165805
165808
  if ({}.hasOwnProperty.call(appsObj.versions, "virtualbox")) {
165806
- exec2(util5.getVboxmanage() + " -v 2>&1", (error2, stdout) => {
165809
+ exec3(util5.getVboxmanage() + " -v 2>&1", (error2, stdout) => {
165807
165810
  if (!error2) {
165808
165811
  const vbox = stdout.toString().split("\n")[0] || "";
165809
165812
  const parts2 = vbox.split("r");
@@ -165813,7 +165816,7 @@ var require_osinfo = __commonJS({
165813
165816
  });
165814
165817
  }
165815
165818
  if ({}.hasOwnProperty.call(appsObj.versions, "bash")) {
165816
- exec2("bash --version", (error2, stdout) => {
165819
+ exec3("bash --version", (error2, stdout) => {
165817
165820
  if (!error2) {
165818
165821
  const line = stdout.toString().split("\n")[0];
165819
165822
  const parts2 = line.split(" version ");
@@ -165825,7 +165828,7 @@ var require_osinfo = __commonJS({
165825
165828
  });
165826
165829
  }
165827
165830
  if ({}.hasOwnProperty.call(appsObj.versions, "zsh")) {
165828
- exec2("zsh --version", (error2, stdout) => {
165831
+ exec3("zsh --version", (error2, stdout) => {
165829
165832
  if (!error2) {
165830
165833
  const line = stdout.toString().split("\n")[0];
165831
165834
  const parts2 = line.split("zsh ");
@@ -165837,7 +165840,7 @@ var require_osinfo = __commonJS({
165837
165840
  });
165838
165841
  }
165839
165842
  if ({}.hasOwnProperty.call(appsObj.versions, "fish")) {
165840
- exec2("fish --version", (error2, stdout) => {
165843
+ exec3("fish --version", (error2, stdout) => {
165841
165844
  if (!error2) {
165842
165845
  const line = stdout.toString().split("\n")[0];
165843
165846
  const parts2 = line.split(" version ");
@@ -165849,7 +165852,7 @@ var require_osinfo = __commonJS({
165849
165852
  });
165850
165853
  }
165851
165854
  if ({}.hasOwnProperty.call(appsObj.versions, "bun")) {
165852
- exec2("bun -v", (error2, stdout) => {
165855
+ exec3("bun -v", (error2, stdout) => {
165853
165856
  if (!error2) {
165854
165857
  const line = stdout.toString().split("\n")[0].trim();
165855
165858
  appsObj.versions.bun = line;
@@ -165858,7 +165861,7 @@ var require_osinfo = __commonJS({
165858
165861
  });
165859
165862
  }
165860
165863
  if ({}.hasOwnProperty.call(appsObj.versions, "deno")) {
165861
- exec2("deno -v", (error2, stdout) => {
165864
+ exec3("deno -v", (error2, stdout) => {
165862
165865
  if (!error2) {
165863
165866
  const line = stdout.toString().split("\n")[0].trim();
165864
165867
  const parts2 = line.split(" ");
@@ -165870,7 +165873,7 @@ var require_osinfo = __commonJS({
165870
165873
  });
165871
165874
  }
165872
165875
  if ({}.hasOwnProperty.call(appsObj.versions, "node")) {
165873
- exec2("node -v", (error2, stdout) => {
165876
+ exec3("node -v", (error2, stdout) => {
165874
165877
  if (!error2) {
165875
165878
  let line = stdout.toString().split("\n")[0].trim();
165876
165879
  if (line.startsWith("v")) {
@@ -165947,7 +165950,7 @@ var require_osinfo = __commonJS({
165947
165950
  }
165948
165951
  } else {
165949
165952
  let result2 = "";
165950
- exec2("echo $SHELL", (error2, stdout) => {
165953
+ exec3("echo $SHELL", (error2, stdout) => {
165951
165954
  if (!error2) {
165952
165955
  result2 = stdout.toString().split("\n")[0];
165953
165956
  }
@@ -166001,7 +166004,7 @@ var require_osinfo = __commonJS({
166001
166004
  };
166002
166005
  let parts2;
166003
166006
  if (_darwin) {
166004
- exec2("system_profiler SPHardwareDataType -json", (error2, stdout) => {
166007
+ exec3("system_profiler SPHardwareDataType -json", (error2, stdout) => {
166005
166008
  if (!error2) {
166006
166009
  try {
166007
166010
  const jsonObj = JSON.parse(stdout.toString());
@@ -166024,7 +166027,7 @@ var require_osinfo = __commonJS({
166024
166027
  const cmd = `echo -n "os: "; cat /var/lib/dbus/machine-id 2> /dev/null ||
166025
166028
  cat /etc/machine-id 2> /dev/null; echo;
166026
166029
  echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
166027
- exec2(cmd, (error2, stdout) => {
166030
+ exec3(cmd, (error2, stdout) => {
166028
166031
  const lines = stdout.toString().split("\n");
166029
166032
  result2.os = util5.getValue(lines, "os").toLowerCase();
166030
166033
  result2.hardware = util5.getValue(lines, "hardware").toLowerCase();
@@ -166040,7 +166043,7 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
166040
166043
  });
166041
166044
  }
166042
166045
  if (_freebsd || _openbsd || _netbsd) {
166043
- exec2("sysctl -i kern.hostid kern.hostuuid", (error2, stdout) => {
166046
+ exec3("sysctl -i kern.hostid kern.hostuuid", (error2, stdout) => {
166044
166047
  const lines = stdout.toString().split("\n");
166045
166048
  result2.hardware = util5.getValue(lines, "kern.hostid", ":").toLowerCase();
166046
166049
  result2.os = util5.getValue(lines, "kern.hostuuid", ":").toLowerCase();
@@ -166064,7 +166067,7 @@ echo -n "hardware: "; cat /sys/class/dmi/id/product_uuid 2> /dev/null; echo;`;
166064
166067
  util5.powerShell("Get-CimInstance Win32_ComputerSystemProduct | select UUID | fl").then((stdout) => {
166065
166068
  let lines = stdout.split("\r\n");
166066
166069
  result2.hardware = util5.getValue(lines, "uuid", ":").toLowerCase();
166067
- exec2(`${sysdir}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`, util5.execOptsWin, (error2, stdout2) => {
166070
+ exec3(`${sysdir}\\reg query "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Cryptography" /v MachineGuid`, util5.execOptsWin, (error2, stdout2) => {
166068
166071
  parts2 = stdout2.toString().split("\n\r")[0].split("REG_SZ");
166069
166072
  result2.os = parts2.length > 1 ? parts2[1].replace(/\r+|\n+|\s+/gi, "").toLowerCase() : "";
166070
166073
  if (callback) {
@@ -166089,7 +166092,7 @@ var require_system = __commonJS({
166089
166092
  var os22 = __require("os");
166090
166093
  var util5 = require_util12();
166091
166094
  var { uuid: uuid2 } = require_osinfo();
166092
- var exec2 = __require("child_process").exec;
166095
+ var exec3 = __require("child_process").exec;
166093
166096
  var execSync3 = __require("child_process").execSync;
166094
166097
  var execPromise = util5.promisify(__require("child_process").exec);
166095
166098
  var _platform = process.platform;
@@ -166113,7 +166116,7 @@ var require_system = __commonJS({
166113
166116
  virtual: false
166114
166117
  };
166115
166118
  if (_linux || _freebsd || _openbsd || _netbsd) {
166116
- exec2("export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL", (error2, stdout) => {
166119
+ exec3("export LC_ALL=C; dmidecode -t system 2>/dev/null; unset LC_ALL", (error2, stdout) => {
166117
166120
  let lines = stdout.toString().split("\n");
166118
166121
  result2.manufacturer = cleanDefaults(util5.getValue(lines, "manufacturer"));
166119
166122
  result2.model = cleanDefaults(util5.getValue(lines, "product name"));
@@ -166302,7 +166305,7 @@ var require_system = __commonJS({
166302
166305
  });
166303
166306
  }
166304
166307
  if (_darwin) {
166305
- exec2("ioreg -c IOPlatformExpertDevice -d 2", (error2, stdout) => {
166308
+ exec3("ioreg -c IOPlatformExpertDevice -d 2", (error2, stdout) => {
166306
166309
  if (!error2) {
166307
166310
  const lines = stdout.toString().replace(/[<>"]/g, "").split("\n");
166308
166311
  const model = util5.getAppleModel(util5.getValue(lines, "model", "=", true));
@@ -166463,7 +166466,7 @@ var require_system = __commonJS({
166463
166466
  } else {
166464
166467
  cmd = "export LC_ALL=C; dmidecode -t bios 2>/dev/null; unset LC_ALL";
166465
166468
  }
166466
- exec2(cmd, (error2, stdout) => {
166469
+ exec3(cmd, (error2, stdout) => {
166467
166470
  let lines = stdout.toString().split("\n");
166468
166471
  result2.vendor = util5.getValue(lines, "Vendor");
166469
166472
  result2.version = util5.getValue(lines, "Version");
@@ -166505,7 +166508,7 @@ var require_system = __commonJS({
166505
166508
  }
166506
166509
  if (_darwin) {
166507
166510
  result2.vendor = "Apple Inc.";
166508
- exec2("system_profiler SPHardwareDataType -json", (error2, stdout) => {
166511
+ exec3("system_profiler SPHardwareDataType -json", (error2, stdout) => {
166509
166512
  try {
166510
166513
  const hardwareData = JSON.parse(stdout.toString());
166511
166514
  if (hardwareData && hardwareData.SPHardwareDataType && hardwareData.SPHardwareDataType.length) {
@@ -166783,7 +166786,7 @@ var require_system = __commonJS({
166783
166786
  echo -n "chassis_type: "; cat /sys/devices/virtual/dmi/id/chassis_type 2>/dev/null; echo;
166784
166787
  echo -n "chassis_vendor: "; cat /sys/devices/virtual/dmi/id/chassis_vendor 2>/dev/null; echo;
166785
166788
  echo -n "chassis_version: "; cat /sys/devices/virtual/dmi/id/chassis_version 2>/dev/null; echo;`;
166786
- exec2(cmd, (error2, stdout) => {
166789
+ exec3(cmd, (error2, stdout) => {
166787
166790
  let lines = stdout.toString().split("\n");
166788
166791
  result2.manufacturer = cleanDefaults(util5.getValue(lines, "chassis_vendor"));
166789
166792
  const ctype = parseInt(util5.getValue(lines, "chassis_type").replace(/\D/g, ""));
@@ -166798,7 +166801,7 @@ var require_system = __commonJS({
166798
166801
  });
166799
166802
  }
166800
166803
  if (_darwin) {
166801
- exec2("ioreg -c IOPlatformExpertDevice -d 2", (error2, stdout) => {
166804
+ exec3("ioreg -c IOPlatformExpertDevice -d 2", (error2, stdout) => {
166802
166805
  if (!error2) {
166803
166806
  const lines = stdout.toString().replace(/[<>"]/g, "").split("\n");
166804
166807
  const model = util5.getAppleModel(util5.getValue(lines, "model", "=", true));
@@ -166863,7 +166866,7 @@ var require_cpu = __commonJS({
166863
166866
  "node_modules/systeminformation/lib/cpu.js"(exports2) {
166864
166867
  "use strict";
166865
166868
  var os22 = __require("os");
166866
- var exec2 = __require("child_process").exec;
166869
+ var exec3 = __require("child_process").exec;
166867
166870
  var execSync3 = __require("child_process").execSync;
166868
166871
  var fs70 = __require("fs");
166869
166872
  var util5 = require_util12();
@@ -167703,7 +167706,7 @@ var require_cpu = __commonJS({
167703
167706
  result2.flags = flags2;
167704
167707
  result2.virtualization = flags2.indexOf("vmx") > -1 || flags2.indexOf("svm") > -1;
167705
167708
  if (_darwin) {
167706
- exec2("sysctl machdep.cpu hw.cpufrequency_max hw.cpufrequency_min hw.packages hw.physicalcpu_max hw.ncpu hw.tbfrequency hw.cpufamily hw.cpusubfamily", (error2, stdout) => {
167709
+ exec3("sysctl machdep.cpu hw.cpufrequency_max hw.cpufrequency_min hw.packages hw.physicalcpu_max hw.ncpu hw.tbfrequency hw.cpufamily hw.cpusubfamily", (error2, stdout) => {
167707
167710
  const lines = stdout.toString().split("\n");
167708
167711
  const modelline = util5.getValue(lines, "machdep.cpu.brand_string");
167709
167712
  const modellineParts = modelline.split("@");
@@ -167756,7 +167759,7 @@ var require_cpu = __commonJS({
167756
167759
  if (os22.cpus()[0] && os22.cpus()[0].model) {
167757
167760
  modelline = os22.cpus()[0].model;
167758
167761
  }
167759
- exec2('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) => {
167762
+ 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) => {
167760
167763
  if (!error2) {
167761
167764
  lines = stdout.toString().split("\n");
167762
167765
  }
@@ -167831,7 +167834,7 @@ var require_cpu = __commonJS({
167831
167834
  }
167832
167835
  }
167833
167836
  let lines2 = [];
167834
- exec2('export LC_ALL=C; dmidecode \u2013t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL', (error22, stdout2) => {
167837
+ exec3('export LC_ALL=C; dmidecode \u2013t 4 2>/dev/null | grep "Upgrade: Socket"; unset LC_ALL', (error22, stdout2) => {
167835
167838
  lines2 = stdout2.toString().split("\n");
167836
167839
  if (lines2 && lines2.length) {
167837
167840
  result2.socket = util5.getValue(lines2, "Upgrade").replace("Socket", "").trim() || result2.socket;
@@ -167846,7 +167849,7 @@ var require_cpu = __commonJS({
167846
167849
  if (os22.cpus()[0] && os22.cpus()[0].model) {
167847
167850
  modelline = os22.cpus()[0].model;
167848
167851
  }
167849
- exec2("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error2, stdout) => {
167852
+ exec3("export LC_ALL=C; dmidecode -t 4; dmidecode -t 7 unset LC_ALL", (error2, stdout) => {
167850
167853
  let cache4 = [];
167851
167854
  if (!error2) {
167852
167855
  const data = stdout.toString().split("# dmidecode");
@@ -168113,7 +168116,7 @@ var require_cpu = __commonJS({
168113
168116
  }
168114
168117
  const cmd = 'for mon in /sys/class/hwmon/hwmon*; do for label in "$mon"/temp*_label; do if [ -f $label ]; then value=${label%_*}_input; echo $(cat "$label")___$(cat "$value"); fi; done; done;';
168115
168118
  try {
168116
- exec2(cmd, (error2, stdout) => {
168119
+ exec3(cmd, (error2, stdout) => {
168117
168120
  stdout = stdout.toString();
168118
168121
  const tdiePos = stdout.toLowerCase().indexOf("tdie");
168119
168122
  if (tdiePos !== -1) {
@@ -168154,7 +168157,7 @@ var require_cpu = __commonJS({
168154
168157
  resolve15(result2);
168155
168158
  return;
168156
168159
  }
168157
- exec2("sensors", (error3, stdout2) => {
168160
+ exec3("sensors", (error3, stdout2) => {
168158
168161
  if (!error3) {
168159
168162
  const lines2 = stdout2.toString().split("\n");
168160
168163
  let tdieTemp = null;
@@ -168237,7 +168240,7 @@ var require_cpu = __commonJS({
168237
168240
  resolve15(result2);
168238
168241
  });
168239
168242
  } else {
168240
- exec2("/opt/vc/bin/vcgencmd measure_temp", (error4, stdout3) => {
168243
+ exec3("/opt/vc/bin/vcgencmd measure_temp", (error4, stdout3) => {
168241
168244
  if (!error4) {
168242
168245
  const lines2 = stdout3.toString().split("\n");
168243
168246
  if (lines2.length > 0 && lines2[0].indexOf("=")) {
@@ -168262,7 +168265,7 @@ var require_cpu = __commonJS({
168262
168265
  }
168263
168266
  }
168264
168267
  if (_freebsd || _openbsd || _netbsd) {
168265
- exec2("sysctl dev.cpu | grep temp", (error2, stdout) => {
168268
+ exec3("sysctl dev.cpu | grep temp", (error2, stdout) => {
168266
168269
  if (!error2) {
168267
168270
  const lines = stdout.toString().split("\n");
168268
168271
  let sum = 0;
@@ -168376,7 +168379,7 @@ var require_cpu = __commonJS({
168376
168379
  let result2 = "";
168377
168380
  if (_windows) {
168378
168381
  try {
168379
- exec2('reg query "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" /v FeatureSet', util5.execOptsWin, (error2, stdout) => {
168382
+ exec3('reg query "HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0" /v FeatureSet', util5.execOptsWin, (error2, stdout) => {
168380
168383
  if (!error2) {
168381
168384
  let flag_hex = stdout.split("0x").pop().trim();
168382
168385
  let flag_bin_unpadded = parseInt(flag_hex, 16).toString(2);
@@ -168436,7 +168439,7 @@ var require_cpu = __commonJS({
168436
168439
  }
168437
168440
  if (_linux) {
168438
168441
  try {
168439
- exec2("export LC_ALL=C; lscpu; unset LC_ALL", (error2, stdout) => {
168442
+ exec3("export LC_ALL=C; lscpu; unset LC_ALL", (error2, stdout) => {
168440
168443
  if (!error2) {
168441
168444
  let lines = stdout.toString().split("\n");
168442
168445
  lines.forEach((line) => {
@@ -168471,7 +168474,7 @@ var require_cpu = __commonJS({
168471
168474
  }
168472
168475
  }
168473
168476
  if (_freebsd || _openbsd || _netbsd) {
168474
- exec2("export LC_ALL=C; dmidecode -t 4 2>/dev/null; unset LC_ALL", (error2, stdout) => {
168477
+ exec3("export LC_ALL=C; dmidecode -t 4 2>/dev/null; unset LC_ALL", (error2, stdout) => {
168475
168478
  const flags2 = [];
168476
168479
  if (!error2) {
168477
168480
  const parts2 = stdout.toString().split(" Flags:");
@@ -168491,7 +168494,7 @@ var require_cpu = __commonJS({
168491
168494
  });
168492
168495
  }
168493
168496
  if (_darwin) {
168494
- exec2("sysctl machdep.cpu.features", (error2, stdout) => {
168497
+ exec3("sysctl machdep.cpu.features", (error2, stdout) => {
168495
168498
  if (!error2) {
168496
168499
  let lines = stdout.toString().split("\n");
168497
168500
  if (lines.length > 0 && lines[0].indexOf("machdep.cpu.features:") !== -1) {
@@ -168525,7 +168528,7 @@ var require_cpu = __commonJS({
168525
168528
  };
168526
168529
  if (_linux) {
168527
168530
  try {
168528
- exec2("export LC_ALL=C; lscpu; unset LC_ALL", (error2, stdout) => {
168531
+ exec3("export LC_ALL=C; lscpu; unset LC_ALL", (error2, stdout) => {
168529
168532
  if (!error2) {
168530
168533
  const lines = stdout.toString().split("\n");
168531
168534
  lines.forEach((line) => {
@@ -168557,7 +168560,7 @@ var require_cpu = __commonJS({
168557
168560
  }
168558
168561
  }
168559
168562
  if (_freebsd || _openbsd || _netbsd) {
168560
- exec2("export LC_ALL=C; dmidecode -t 7 2>/dev/null; unset LC_ALL", (error2, stdout) => {
168563
+ exec3("export LC_ALL=C; dmidecode -t 7 2>/dev/null; unset LC_ALL", (error2, stdout) => {
168561
168564
  let cache4 = [];
168562
168565
  if (!error2) {
168563
168566
  const data = stdout.toString();
@@ -168588,7 +168591,7 @@ var require_cpu = __commonJS({
168588
168591
  });
168589
168592
  }
168590
168593
  if (_darwin) {
168591
- exec2("sysctl hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize", (error2, stdout) => {
168594
+ exec3("sysctl hw.l1icachesize hw.l1dcachesize hw.l2cachesize hw.l3cachesize", (error2, stdout) => {
168592
168595
  if (!error2) {
168593
168596
  let lines = stdout.toString().split("\n");
168594
168597
  lines.forEach((line) => {
@@ -168945,7 +168948,7 @@ var require_memory = __commonJS({
168945
168948
  "node_modules/systeminformation/lib/memory.js"(exports2) {
168946
168949
  "use strict";
168947
168950
  var os22 = __require("os");
168948
- var exec2 = __require("child_process").exec;
168951
+ var exec3 = __require("child_process").exec;
168949
168952
  var execSync3 = __require("child_process").execSync;
168950
168953
  var util5 = require_util12();
168951
168954
  var fs70 = __require("fs");
@@ -169054,7 +169057,7 @@ var require_memory = __commonJS({
169054
169057
  }
169055
169058
  if (_freebsd || _openbsd || _netbsd) {
169056
169059
  try {
169057
- exec2(
169060
+ exec3(
169058
169061
  "/sbin/sysctl hw.realmem hw.physmem vm.stats.vm.v_page_count vm.stats.vm.v_wire_count vm.stats.vm.v_active_count vm.stats.vm.v_inactive_count vm.stats.vm.v_cache_count vm.stats.vm.v_free_count vm.stats.vm.v_page_size",
169059
169062
  function(error2, stdout) {
169060
169063
  if (!error2) {
@@ -169102,7 +169105,7 @@ var require_memory = __commonJS({
169102
169105
  util5.noop();
169103
169106
  }
169104
169107
  try {
169105
- exec2('vm_stat 2>/dev/null | egrep "Pages active|Pages inactive"', function(error2, stdout) {
169108
+ exec3('vm_stat 2>/dev/null | egrep "Pages active|Pages inactive"', function(error2, stdout) {
169106
169109
  if (!error2) {
169107
169110
  let lines = stdout.toString().split("\n");
169108
169111
  result2.active = (parseInt(util5.getValue(lines, "Pages active"), 10) || 0) * pageSize;
@@ -169110,7 +169113,7 @@ var require_memory = __commonJS({
169110
169113
  result2.buffcache = result2.used - result2.active;
169111
169114
  result2.available = result2.free + result2.buffcache;
169112
169115
  }
169113
- exec2("sysctl -n vm.swapusage 2>/dev/null", function(error3, stdout2) {
169116
+ exec3("sysctl -n vm.swapusage 2>/dev/null", function(error3, stdout2) {
169114
169117
  if (!error3) {
169115
169118
  let lines = stdout2.toString().split("\n");
169116
169119
  if (lines.length > 0) {
@@ -169188,7 +169191,7 @@ var require_memory = __commonJS({
169188
169191
  process.nextTick(() => {
169189
169192
  let result2 = [];
169190
169193
  if (_linux || _freebsd || _openbsd || _netbsd) {
169191
- exec2(
169194
+ exec3(
169192
169195
  'export LC_ALL=C; dmidecode -t memory 2>/dev/null | grep -iE "Size:|Type|Speed|Manufacturer|Form Factor|Locator|Memory Device|Serial Number|Voltage|Part Number"; unset LC_ALL',
169193
169196
  function(error2, stdout) {
169194
169197
  if (!error2) {
@@ -169296,7 +169299,7 @@ var require_memory = __commonJS({
169296
169299
  );
169297
169300
  }
169298
169301
  if (_darwin) {
169299
- exec2("system_profiler SPMemoryDataType", function(error2, stdout) {
169302
+ exec3("system_profiler SPMemoryDataType", function(error2, stdout) {
169300
169303
  if (!error2) {
169301
169304
  const allLines = stdout.toString().split("\n");
169302
169305
  const eccStatus = util5.getValue(allLines, "ecc", ":", true).toLowerCase();
@@ -169439,7 +169442,7 @@ var require_memory = __commonJS({
169439
169442
  var require_battery = __commonJS({
169440
169443
  "node_modules/systeminformation/lib/battery.js"(exports2, module2) {
169441
169444
  "use strict";
169442
- var exec2 = __require("child_process").exec;
169445
+ var exec3 = __require("child_process").exec;
169443
169446
  var fs70 = __require("fs");
169444
169447
  var util5 = require_util12();
169445
169448
  var _platform = process.platform;
@@ -169573,7 +169576,7 @@ var require_battery = __commonJS({
169573
169576
  }
169574
169577
  }
169575
169578
  if (_freebsd || _openbsd || _netbsd) {
169576
- exec2("sysctl -i hw.acpi.battery hw.acpi.acline", (error2, stdout) => {
169579
+ exec3("sysctl -i hw.acpi.battery hw.acpi.acline", (error2, stdout) => {
169577
169580
  let lines = stdout.toString().split("\n");
169578
169581
  const batteries = parseInt("0" + util5.getValue(lines, "hw.acpi.battery.units"), 10);
169579
169582
  const percent = parseInt("0" + util5.getValue(lines, "hw.acpi.battery.life"), 10);
@@ -169592,7 +169595,7 @@ var require_battery = __commonJS({
169592
169595
  });
169593
169596
  }
169594
169597
  if (_darwin) {
169595
- exec2(
169598
+ exec3(
169596
169599
  'ioreg -n AppleSmartBattery -r | egrep "CycleCount|IsCharging|DesignCapacity|MaxCapacity|CurrentCapacity|DeviceName|BatterySerialNumber|Serial|TimeRemaining|Voltage"; pmset -g batt | grep %',
169597
169600
  (error2, stdout) => {
169598
169601
  if (stdout) {
@@ -169732,7 +169735,7 @@ var require_graphics = __commonJS({
169732
169735
  "node_modules/systeminformation/lib/graphics.js"(exports2) {
169733
169736
  "use strict";
169734
169737
  var fs70 = __require("fs");
169735
- var exec2 = __require("child_process").exec;
169738
+ var exec3 = __require("child_process").exec;
169736
169739
  var execSync3 = __require("child_process").execSync;
169737
169740
  var util5 = require_util12();
169738
169741
  var _platform = process.platform;
@@ -170388,7 +170391,7 @@ var require_graphics = __commonJS({
170388
170391
  };
170389
170392
  if (_darwin) {
170390
170393
  const cmd = "system_profiler -xml -detailLevel full SPDisplaysDataType";
170391
- exec2(cmd, (error2, stdout) => {
170394
+ exec3(cmd, (error2, stdout) => {
170392
170395
  if (!error2) {
170393
170396
  try {
170394
170397
  const output = stdout.toString();
@@ -170445,7 +170448,7 @@ var require_graphics = __commonJS({
170445
170448
  if (_linux) {
170446
170449
  if (util5.isRaspberry()) {
170447
170450
  const cmd2 = `fbset -s 2> /dev/null | grep 'mode "' ; vcgencmd get_mem gpu 2> /dev/null; tvservice -s 2> /dev/null; tvservice -n 2> /dev/null;`;
170448
- exec2(cmd2, (error2, stdout) => {
170451
+ exec3(cmd2, (error2, stdout) => {
170449
170452
  const lines = stdout.toString().split("\n");
170450
170453
  if (lines.length > 3 && lines[0].indexOf('mode "') >= -1 && lines[2].indexOf("0x12000a") > -1) {
170451
170454
  const parts2 = lines[0].replace("mode", "").replace(/"/g, "").trim().split("x");
@@ -170481,7 +170484,7 @@ var require_graphics = __commonJS({
170481
170484
  });
170482
170485
  }
170483
170486
  const cmd = "lspci -vvv 2>/dev/null";
170484
- exec2(cmd, (error2, stdout) => {
170487
+ exec3(cmd, (error2, stdout) => {
170485
170488
  if (!error2) {
170486
170489
  const lines = stdout.toString().split("\n");
170487
170490
  if (result2.controllers.length === 0) {
@@ -170493,20 +170496,20 @@ var require_graphics = __commonJS({
170493
170496
  }
170494
170497
  }
170495
170498
  const cmd2 = "clinfo --raw";
170496
- exec2(cmd2, (error3, stdout2) => {
170499
+ exec3(cmd2, (error3, stdout2) => {
170497
170500
  if (!error3) {
170498
170501
  const lines = stdout2.toString().split("\n");
170499
170502
  result2.controllers = parseLinesLinuxClinfo(result2.controllers, lines);
170500
170503
  }
170501
170504
  const cmd3 = "xdpyinfo 2>/dev/null | grep 'depth of root window' | awk '{ print $5 }'";
170502
- exec2(cmd3, (error4, stdout3) => {
170505
+ exec3(cmd3, (error4, stdout3) => {
170503
170506
  let depth = 0;
170504
170507
  if (!error4) {
170505
170508
  const lines = stdout3.toString().split("\n");
170506
170509
  depth = parseInt(lines[0]) || 0;
170507
170510
  }
170508
170511
  const cmd4 = "xrandr --verbose 2>/dev/null";
170509
- exec2(cmd4, (error5, stdout4) => {
170512
+ exec3(cmd4, (error5, stdout4) => {
170510
170513
  if (!error5) {
170511
170514
  const lines = stdout4.toString().split("\n");
170512
170515
  result2.displays = parseLinesLinuxDisplays(lines, depth);
@@ -170817,7 +170820,7 @@ var require_filesystem = __commonJS({
170817
170820
  "use strict";
170818
170821
  var util5 = require_util12();
170819
170822
  var fs70 = __require("fs");
170820
- var exec2 = __require("child_process").exec;
170823
+ var exec3 = __require("child_process").exec;
170821
170824
  var execSync3 = __require("child_process").execSync;
170822
170825
  var execPromiseSave = util5.promisifySave(__require("child_process").exec);
170823
170826
  var _platform = process.platform;
@@ -170954,7 +170957,7 @@ var require_filesystem = __commonJS({
170954
170957
  util5.noop();
170955
170958
  }
170956
170959
  }
170957
- exec2(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
170960
+ exec3(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
170958
170961
  const lines = filterLines(stdout);
170959
170962
  data = parseDf(lines);
170960
170963
  if (drive) {
@@ -170968,7 +170971,7 @@ var require_filesystem = __commonJS({
170968
170971
  }
170969
170972
  resolve15(data);
170970
170973
  } else {
170971
- exec2("df -kPT 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
170974
+ exec3("df -kPT 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
170972
170975
  const lines2 = filterLines(stdout2);
170973
170976
  data = parseDf(lines2);
170974
170977
  if (callback) {
@@ -171039,7 +171042,7 @@ var require_filesystem = __commonJS({
171039
171042
  };
171040
171043
  if (_freebsd || _openbsd || _netbsd || _darwin) {
171041
171044
  const cmd = "sysctl -i kern.maxfiles kern.num_files kern.open_files";
171042
- exec2(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171045
+ exec3(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171043
171046
  if (!error2) {
171044
171047
  const lines = stdout.toString().split("\n");
171045
171048
  result2.max = parseInt(util5.getValue(lines, "kern.maxfiles", ":"), 10);
@@ -171361,7 +171364,7 @@ var require_filesystem = __commonJS({
171361
171364
  process.nextTick(() => {
171362
171365
  let data = [];
171363
171366
  if (_linux) {
171364
- const procLsblk1 = exec2("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,TRAN,SERIAL,LABEL,MODEL,OWNER 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171367
+ const procLsblk1 = exec3("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,TRAN,SERIAL,LABEL,MODEL,OWNER 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171365
171368
  if (!error2) {
171366
171369
  const lines = blkStdoutToObject(stdout).split("\n");
171367
171370
  data = parseBlk(lines);
@@ -171372,7 +171375,7 @@ var require_filesystem = __commonJS({
171372
171375
  }
171373
171376
  resolve15(data);
171374
171377
  } else {
171375
- const procLsblk2 = exec2("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171378
+ const procLsblk2 = exec3("lsblk -bPo NAME,TYPE,SIZE,FSTYPE,MOUNTPOINT,UUID,ROTA,RO,RM,LABEL,MODEL,OWNER 2>/dev/null", { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171376
171379
  if (!error3) {
171377
171380
  const lines = blkStdoutToObject(stdout2).split("\n");
171378
171381
  data = parseBlk(lines);
@@ -171399,7 +171402,7 @@ var require_filesystem = __commonJS({
171399
171402
  });
171400
171403
  }
171401
171404
  if (_darwin) {
171402
- const procDskutil = exec2("diskutil info -all", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171405
+ const procDskutil = exec3("diskutil info -all", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171403
171406
  if (!error2) {
171404
171407
  const lines = stdout.toString().split("\n");
171405
171408
  data = parseDevices(lines);
@@ -171542,7 +171545,7 @@ var require_filesystem = __commonJS({
171542
171545
  let wx = 0;
171543
171546
  if (_fs_speed && !_fs_speed.ms || _fs_speed && _fs_speed.ms && Date.now() - _fs_speed.ms >= 500) {
171544
171547
  if (_linux) {
171545
- const procLsblk = exec2("lsblk -r 2>/dev/null | grep /", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171548
+ const procLsblk = exec3("lsblk -r 2>/dev/null | grep /", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171546
171549
  if (!error2) {
171547
171550
  const lines = stdout.toString().split("\n");
171548
171551
  const fs_filter = [];
@@ -171555,7 +171558,7 @@ var require_filesystem = __commonJS({
171555
171558
  }
171556
171559
  });
171557
171560
  const output = fs_filter.join("|");
171558
- const procCat = exec2('cat /proc/diskstats | egrep "' + output + '"', { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171561
+ const procCat = exec3('cat /proc/diskstats | egrep "' + output + '"', { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171559
171562
  if (!error3) {
171560
171563
  const lines2 = stdout2.toString().split("\n");
171561
171564
  lines2.forEach((line) => {
@@ -171594,7 +171597,7 @@ var require_filesystem = __commonJS({
171594
171597
  });
171595
171598
  }
171596
171599
  if (_darwin) {
171597
- const procIoreg = exec2(
171600
+ const procIoreg = exec3(
171598
171601
  'ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,\n"',
171599
171602
  { maxBuffer: 1024 * 1024 },
171600
171603
  (error2, stdout) => {
@@ -171738,7 +171741,7 @@ var require_filesystem = __commonJS({
171738
171741
  if (_disk_io && !_disk_io.ms || _disk_io && _disk_io.ms && Date.now() - _disk_io.ms >= 500) {
171739
171742
  if (_linux || _freebsd || _openbsd || _netbsd) {
171740
171743
  const cmd = 'for mount in `lsblk 2>/dev/null | grep " disk " | sed "s/[\u2502\u2514\u2500\u251C]//g" | awk \'{$1=$1};1\' | cut -d " " -f 1 | sort -u`; do cat /sys/block/$mount/stat | sed -r "s/ +/;/g" | sed -r "s/^;//"; done';
171741
- exec2(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171744
+ exec3(cmd, { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171742
171745
  if (!error2) {
171743
171746
  const lines = stdout.split("\n");
171744
171747
  lines.forEach((line) => {
@@ -171766,7 +171769,7 @@ var require_filesystem = __commonJS({
171766
171769
  });
171767
171770
  }
171768
171771
  if (_darwin) {
171769
- exec2(
171772
+ exec3(
171770
171773
  'ioreg -c IOBlockStorageDriver -k Statistics -r -w0 | sed -n "/IOBlockStorageDriver/,/Statistics/p" | grep "Statistics" | tr -cd "01234567890,\n"',
171771
171774
  { maxBuffer: 1024 * 1024 },
171772
171775
  (error2, stdout) => {
@@ -171874,7 +171877,7 @@ var require_filesystem = __commonJS({
171874
171877
  let cmd = "";
171875
171878
  if (_linux) {
171876
171879
  let cmdFullSmart = "";
171877
- exec2("export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171880
+ exec3("export LC_ALL=C; lsblk -ablJO 2>/dev/null; unset LC_ALL", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
171878
171881
  if (!error2) {
171879
171882
  try {
171880
171883
  const out2 = stdout.toString().trim();
@@ -171944,7 +171947,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
171944
171947
  }
171945
171948
  }
171946
171949
  if (cmdFullSmart) {
171947
- exec2(cmdFullSmart, { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171950
+ exec3(cmdFullSmart, { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
171948
171951
  try {
171949
171952
  const data = JSON.parse(`[${stdout2}]`);
171950
171953
  data.forEach((disk) => {
@@ -171963,7 +171966,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
171963
171966
  } catch {
171964
171967
  if (cmd) {
171965
171968
  cmd = cmd + 'printf "\n"';
171966
- exec2(cmd, { maxBuffer: 1024 * 1024 }, (error4, stdout3) => {
171969
+ exec3(cmd, { maxBuffer: 1024 * 1024 }, (error4, stdout3) => {
171967
171970
  const lines = stdout3.toString().split("\n");
171968
171971
  lines.forEach((line) => {
171969
171972
  if (line) {
@@ -172009,7 +172012,7 @@ ${BSDName}|"; smartctl -H ${BSDName} | grep overall;`;
172009
172012
  resolve15(result2);
172010
172013
  }
172011
172014
  if (_darwin) {
172012
- exec2("system_profiler SPSerialATADataType SPNVMeDataType SPUSBDataType", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
172015
+ exec3("system_profiler SPSerialATADataType SPNVMeDataType SPUSBDataType", { maxBuffer: 1024 * 1024 }, (error2, stdout) => {
172013
172016
  if (!error2) {
172014
172017
  const lines = stdout.toString().split("\n");
172015
172018
  const linesSATA = [];
@@ -172179,7 +172182,7 @@ ${BSDName}|"; diskutil info /dev/${BSDName} | grep SMART;`;
172179
172182
  }
172180
172183
  if (cmd) {
172181
172184
  cmd = cmd + 'printf "\n"';
172182
- exec2(cmd, { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
172185
+ exec3(cmd, { maxBuffer: 1024 * 1024 }, (error3, stdout2) => {
172183
172186
  const lines2 = stdout2.toString().split("\n");
172184
172187
  lines2.forEach((line) => {
172185
172188
  if (line) {
@@ -172339,7 +172342,7 @@ var require_network = __commonJS({
172339
172342
  "node_modules/systeminformation/lib/network.js"(exports2) {
172340
172343
  "use strict";
172341
172344
  var os22 = __require("os");
172342
- var exec2 = __require("child_process").exec;
172345
+ var exec3 = __require("child_process").exec;
172343
172346
  var execSync3 = __require("child_process").execSync;
172344
172347
  var fs70 = __require("fs");
172345
172348
  var util5 = require_util12();
@@ -173594,7 +173597,7 @@ var require_network = __commonJS({
173594
173597
  if (_linux) {
173595
173598
  if (fs70.existsSync("/sys/class/net/" + ifaceSanitized)) {
173596
173599
  cmd = "cat /sys/class/net/" + ifaceSanitized + "/operstate; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_bytes; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_bytes; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_dropped; cat /sys/class/net/" + ifaceSanitized + "/statistics/rx_errors; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_dropped; cat /sys/class/net/" + ifaceSanitized + "/statistics/tx_errors; ";
173597
- exec2(cmd, (error2, stdout) => {
173600
+ exec3(cmd, (error2, stdout) => {
173598
173601
  if (!error2) {
173599
173602
  lines = stdout.toString().split("\n");
173600
173603
  operstate = lines[0].trim();
@@ -173614,7 +173617,7 @@ var require_network = __commonJS({
173614
173617
  }
173615
173618
  if (_freebsd || _openbsd || _netbsd) {
173616
173619
  cmd = "netstat -ibndI " + ifaceSanitized;
173617
- exec2(cmd, (error2, stdout) => {
173620
+ exec3(cmd, (error2, stdout) => {
173618
173621
  if (!error2) {
173619
173622
  lines = stdout.toString().split("\n");
173620
173623
  for (let i4 = 1; i4 < lines.length; i4++) {
@@ -173644,12 +173647,12 @@ var require_network = __commonJS({
173644
173647
  }
173645
173648
  if (_darwin) {
173646
173649
  cmd = "ifconfig " + ifaceSanitized + ' | grep "status"';
173647
- exec2(cmd, (error2, stdout) => {
173650
+ exec3(cmd, (error2, stdout) => {
173648
173651
  result2.operstate = (stdout.toString().split(":")[1] || "").trim();
173649
173652
  result2.operstate = (result2.operstate || "").toLowerCase();
173650
173653
  result2.operstate = result2.operstate === "active" ? "up" : result2.operstate === "inactive" ? "down" : "unknown";
173651
173654
  cmd = "netstat -bdI " + ifaceSanitized;
173652
- exec2(cmd, function(error3, stdout2) {
173655
+ exec3(cmd, function(error3, stdout2) {
173653
173656
  if (!error3) {
173654
173657
  lines = stdout2.toString().split("\n");
173655
173658
  if (lines.length > 1 && lines[1].trim() !== "") {
@@ -173738,7 +173741,7 @@ var require_network = __commonJS({
173738
173741
  if (_freebsd || _openbsd || _netbsd) {
173739
173742
  cmd = 'export LC_ALL=C; netstat -na | grep "ESTABLISHED\\|SYN_SENT\\|SYN_RECV\\|FIN_WAIT1\\|FIN_WAIT2\\|TIME_WAIT\\|CLOSE\\|CLOSE_WAIT\\|LAST_ACK\\|LISTEN\\|CLOSING\\|UNKNOWN"; unset LC_ALL';
173740
173743
  }
173741
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
173744
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
173742
173745
  let lines = stdout.toString().split("\n");
173743
173746
  if (!error2 && (lines.length > 1 || lines[0] !== "")) {
173744
173747
  lines.forEach((line) => {
@@ -173782,7 +173785,7 @@ var require_network = __commonJS({
173782
173785
  resolve15(result2);
173783
173786
  } else {
173784
173787
  cmd = 'ss -tunap | grep "ESTAB\\|SYN-SENT\\|SYN-RECV\\|FIN-WAIT1\\|FIN-WAIT2\\|TIME-WAIT\\|CLOSE\\|CLOSE-WAIT\\|LAST-ACK\\|LISTEN\\|CLOSING"';
173785
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
173788
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
173786
173789
  if (!error3) {
173787
173790
  const lines2 = stdout2.toString().split("\n");
173788
173791
  lines2.forEach((line) => {
@@ -173849,9 +173852,9 @@ var require_network = __commonJS({
173849
173852
  if (_darwin) {
173850
173853
  const cmd = 'netstat -natvln | head -n2; netstat -natvln | grep "tcp4\\|tcp6\\|udp4\\|udp6"';
173851
173854
  const states = "ESTABLISHED|SYN_SENT|SYN_RECV|FIN_WAIT1|FIN_WAIT_1|FIN_WAIT2|FIN_WAIT_2|TIME_WAIT|CLOSE|CLOSE_WAIT|LAST_ACK|LISTEN|CLOSING|UNKNOWN".split("|");
173852
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
173855
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
173853
173856
  if (!error2) {
173854
- exec2("ps -axo pid,command", { maxBuffer: 1024 * 102400 }, (err2, stdout2) => {
173857
+ exec3("ps -axo pid,command", { maxBuffer: 1024 * 102400 }, (err2, stdout2) => {
173855
173858
  let processes = stdout2.toString().split("\n");
173856
173859
  processes = processes.map((line) => {
173857
173860
  return line.trim().replace(/ +/g, " ");
@@ -173919,7 +173922,7 @@ var require_network = __commonJS({
173919
173922
  if (_windows) {
173920
173923
  let cmd = "netstat -nao";
173921
173924
  try {
173922
- exec2(cmd, util5.execOptsWin, (error2, stdout) => {
173925
+ exec3(cmd, util5.execOptsWin, (error2, stdout) => {
173923
173926
  if (!error2) {
173924
173927
  let lines = stdout.toString().split("\r\n");
173925
173928
  lines.forEach((line) => {
@@ -174021,7 +174024,7 @@ var require_network = __commonJS({
174021
174024
  if (_linux || _freebsd || _openbsd || _netbsd) {
174022
174025
  let cmd = "ip route get 1";
174023
174026
  try {
174024
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
174027
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
174025
174028
  if (!error2) {
174026
174029
  let lines = stdout.toString().split("\n");
174027
174030
  const line = lines && lines[0] ? lines[0] : "";
@@ -174051,14 +174054,14 @@ var require_network = __commonJS({
174051
174054
  if (_darwin) {
174052
174055
  let cmd = "route -n get default";
174053
174056
  try {
174054
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
174057
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
174055
174058
  if (!error2) {
174056
174059
  const lines = stdout.toString().split("\n").map((line) => line.trim());
174057
174060
  result2 = util5.getValue(lines, "gateway");
174058
174061
  }
174059
174062
  if (!result2) {
174060
174063
  cmd = "netstat -rn | awk '/default/ {print $2}'";
174061
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
174064
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
174062
174065
  const lines = stdout2.toString().split("\n").map((line) => line.trim());
174063
174066
  result2 = lines.find(
174064
174067
  (line) => /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(line)
@@ -174084,7 +174087,7 @@ var require_network = __commonJS({
174084
174087
  }
174085
174088
  if (_windows) {
174086
174089
  try {
174087
- exec2("netstat -r", util5.execOptsWin, (error2, stdout) => {
174090
+ exec3("netstat -r", util5.execOptsWin, (error2, stdout) => {
174088
174091
  const lines = stdout.toString().split(os22.EOL);
174089
174092
  lines.forEach((line) => {
174090
174093
  line = line.replace(/\s+/g, " ").trim();
@@ -174132,7 +174135,7 @@ var require_wifi = __commonJS({
174132
174135
  "node_modules/systeminformation/lib/wifi.js"(exports2) {
174133
174136
  "use strict";
174134
174137
  var os22 = __require("os");
174135
- var exec2 = __require("child_process").exec;
174138
+ var exec3 = __require("child_process").exec;
174136
174139
  var execSync3 = __require("child_process").execSync;
174137
174140
  var util5 = require_util12();
174138
174141
  var _platform = process.platform;
@@ -174567,7 +174570,7 @@ var require_wifi = __commonJS({
174567
174570
  }
174568
174571
  } else if (_darwin) {
174569
174572
  const cmd = "system_profiler SPAirPortDataType -json 2>/dev/null";
174570
- exec2(cmd, { maxBuffer: 1024 * 4e4 }, (error2, stdout) => {
174573
+ exec3(cmd, { maxBuffer: 1024 * 4e4 }, (error2, stdout) => {
174571
174574
  result2 = parseWifiDarwin(stdout.toString());
174572
174575
  if (callback) {
174573
174576
  callback(result2);
@@ -174708,7 +174711,7 @@ var require_wifi = __commonJS({
174708
174711
  resolve15(result2);
174709
174712
  } else if (_darwin) {
174710
174713
  const cmd = 'system_profiler SPNetworkDataType SPAirPortDataType -xml 2>/dev/null; echo "######" ; ioreg -n AppleBCMWLANSkywalkInterface -r 2>/dev/null';
174711
- exec2(cmd, (error2, stdout) => {
174714
+ exec3(cmd, (error2, stdout) => {
174712
174715
  try {
174713
174716
  const parts2 = stdout.toString().split("######");
174714
174717
  const profilerObj = util5.plistParser(parts2[0]);
@@ -174837,7 +174840,7 @@ var require_wifi = __commonJS({
174837
174840
  resolve15(result2);
174838
174841
  } else if (_darwin) {
174839
174842
  const cmd = "system_profiler SPNetworkDataType";
174840
- exec2(cmd, (error2, stdout) => {
174843
+ exec3(cmd, (error2, stdout) => {
174841
174844
  const parts1 = stdout.toString().split("\n\n Wi-Fi:\n\n");
174842
174845
  if (parts1.length > 1) {
174843
174846
  const lines = parts1[1].split("\n\n")[0].split("\n");
@@ -174912,7 +174915,7 @@ var require_processes = __commonJS({
174912
174915
  var os22 = __require("os");
174913
174916
  var fs70 = __require("fs");
174914
174917
  var path82 = __require("path");
174915
- var exec2 = __require("child_process").exec;
174918
+ var exec3 = __require("child_process").exec;
174916
174919
  var execSync3 = __require("child_process").execSync;
174917
174920
  var util5 = require_util12();
174918
174921
  var _platform = process.platform;
@@ -175128,7 +175131,7 @@ var require_processes = __commonJS({
175128
175131
  cmd += ";cat /proc/" + result2[i4].pids[j] + "/stat";
175129
175132
  }
175130
175133
  }
175131
- exec2(cmd, { maxBuffer: 1024 * 102400 }, function(error2, stdout2) {
175134
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, function(error2, stdout2) {
175132
175135
  let curr_processes = stdout2.toString().split("\n");
175133
175136
  let all3 = parseProcStat(curr_processes.shift());
175134
175137
  let list_new = {};
@@ -175610,7 +175613,7 @@ var require_processes = __commonJS({
175610
175613
  cmd = "ps -Ao pid,ppid,pcpu,pmem,pri,vsz,rss,nice,stime,s,tty,user,comm";
175611
175614
  }
175612
175615
  try {
175613
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
175616
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout) => {
175614
175617
  if (!error2 && stdout.toString().trim()) {
175615
175618
  result2.list = parseProcesses(stdout.toString().split("\n")).slice();
175616
175619
  result2.all = result2.list.length;
@@ -175628,7 +175631,7 @@ var require_processes = __commonJS({
175628
175631
  result2.list.forEach((element) => {
175629
175632
  cmd += ";cat /proc/" + element.pid + "/stat";
175630
175633
  });
175631
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
175634
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
175632
175635
  let curr_processes = stdout2.toString().split("\n");
175633
175636
  let all3 = parseProcStat(curr_processes.shift());
175634
175637
  let list_new = {};
@@ -175674,7 +175677,7 @@ var require_processes = __commonJS({
175674
175677
  if (_sunos) {
175675
175678
  cmd = "ps -o pid,ppid,vsz,rss,nice,etime,s,tty,user,comm";
175676
175679
  }
175677
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
175680
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error3, stdout2) => {
175678
175681
  if (!error3) {
175679
175682
  let lines = stdout2.toString().split("\n");
175680
175683
  lines.shift();
@@ -176076,7 +176079,7 @@ var require_processes = __commonJS({
176076
176079
  cmd += ";cat /proc/" + result2[i4].pids[j] + "/stat";
176077
176080
  }
176078
176081
  }
176079
- exec2(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout2) => {
176082
+ exec3(cmd, { maxBuffer: 1024 * 102400 }, (error2, stdout2) => {
176080
176083
  let curr_processes = stdout2.toString().split("\n");
176081
176084
  let all3 = parseProcStat(curr_processes.shift());
176082
176085
  let list_new = {};
@@ -176141,7 +176144,7 @@ var require_processes = __commonJS({
176141
176144
  var require_users = __commonJS({
176142
176145
  "node_modules/systeminformation/lib/users.js"(exports2) {
176143
176146
  "use strict";
176144
- var exec2 = __require("child_process").exec;
176147
+ var exec3 = __require("child_process").exec;
176145
176148
  var util5 = require_util12();
176146
176149
  var _platform = process.platform;
176147
176150
  var _linux = _platform === "linux" || _platform === "android";
@@ -176279,12 +176282,12 @@ var require_users = __commonJS({
176279
176282
  process.nextTick(() => {
176280
176283
  let result2 = [];
176281
176284
  if (_linux) {
176282
- exec2('export LC_ALL=C; who --ips; echo "---"; w; unset LC_ALL | tail -n +2', (error2, stdout) => {
176285
+ exec3('export LC_ALL=C; who --ips; echo "---"; w; unset LC_ALL | tail -n +2', (error2, stdout) => {
176283
176286
  if (!error2) {
176284
176287
  let lines = stdout.toString().split("\n");
176285
176288
  result2 = parseUsersLinux(lines, 1);
176286
176289
  if (result2.length === 0) {
176287
- exec2('who; echo "---"; w | tail -n +2', (error3, stdout2) => {
176290
+ exec3('who; echo "---"; w | tail -n +2', (error3, stdout2) => {
176288
176291
  if (!error3) {
176289
176292
  lines = stdout2.toString().split("\n");
176290
176293
  result2 = parseUsersLinux(lines, 2);
@@ -176309,7 +176312,7 @@ var require_users = __commonJS({
176309
176312
  });
176310
176313
  }
176311
176314
  if (_freebsd || _openbsd || _netbsd) {
176312
- exec2('who; echo "---"; w -ih', (error2, stdout) => {
176315
+ exec3('who; echo "---"; w -ih', (error2, stdout) => {
176313
176316
  if (!error2) {
176314
176317
  const lines = stdout.toString().split("\n");
176315
176318
  result2 = parseUsersDarwin(lines);
@@ -176321,7 +176324,7 @@ var require_users = __commonJS({
176321
176324
  });
176322
176325
  }
176323
176326
  if (_sunos) {
176324
- exec2('who; echo "---"; w -h', (error2, stdout) => {
176327
+ exec3('who; echo "---"; w -h', (error2, stdout) => {
176325
176328
  if (!error2) {
176326
176329
  const lines = stdout.toString().split("\n");
176327
176330
  result2 = parseUsersDarwin(lines);
@@ -176333,7 +176336,7 @@ var require_users = __commonJS({
176333
176336
  });
176334
176337
  }
176335
176338
  if (_darwin) {
176336
- exec2('export LC_ALL=C; who; echo "---"; w -ih; unset LC_ALL', (error2, stdout) => {
176339
+ exec3('export LC_ALL=C; who; echo "---"; w -ih; unset LC_ALL', (error2, stdout) => {
176337
176340
  if (!error2) {
176338
176341
  const lines = stdout.toString().split("\n");
176339
176342
  result2 = parseUsersDarwin(lines);
@@ -177669,14 +177672,14 @@ var require_virtualbox = __commonJS({
177669
177672
  "node_modules/systeminformation/lib/virtualbox.js"(exports2) {
177670
177673
  "use strict";
177671
177674
  var os22 = __require("os");
177672
- var exec2 = __require("child_process").exec;
177675
+ var exec3 = __require("child_process").exec;
177673
177676
  var util5 = require_util12();
177674
177677
  function vboxInfo(callback) {
177675
177678
  let result2 = [];
177676
177679
  return new Promise((resolve15) => {
177677
177680
  process.nextTick(() => {
177678
177681
  try {
177679
- exec2(util5.getVboxmanage() + " list vms --long", function(error2, stdout) {
177682
+ exec3(util5.getVboxmanage() + " list vms --long", function(error2, stdout) {
177680
177683
  let parts2 = (os22.EOL + stdout.toString()).split(os22.EOL + "Name:");
177681
177684
  parts2.shift();
177682
177685
  parts2.forEach((part) => {
@@ -177766,7 +177769,7 @@ var require_virtualbox = __commonJS({
177766
177769
  var require_printer = __commonJS({
177767
177770
  "node_modules/systeminformation/lib/printer.js"(exports2) {
177768
177771
  "use strict";
177769
- var exec2 = __require("child_process").exec;
177772
+ var exec3 = __require("child_process").exec;
177770
177773
  var util5 = require_util12();
177771
177774
  var _platform = process.platform;
177772
177775
  var _linux = _platform === "linux" || _platform === "android";
@@ -177856,7 +177859,7 @@ var require_printer = __commonJS({
177856
177859
  let result2 = [];
177857
177860
  if (_linux || _freebsd || _openbsd || _netbsd) {
177858
177861
  let cmd = "cat /etc/cups/printers.conf 2>/dev/null";
177859
- exec2(cmd, function(error2, stdout) {
177862
+ exec3(cmd, function(error2, stdout) {
177860
177863
  if (!error2) {
177861
177864
  const parts2 = stdout.toString().split("<Printer ");
177862
177865
  const printerHeader = parseLinuxCupsHeader(parts2[0]);
@@ -177872,7 +177875,7 @@ var require_printer = __commonJS({
177872
177875
  if (result2.length === 0) {
177873
177876
  if (_linux) {
177874
177877
  cmd = "export LC_ALL=C; lpstat -lp 2>/dev/null; unset LC_ALL";
177875
- exec2(cmd, function(error3, stdout2) {
177878
+ exec3(cmd, function(error3, stdout2) {
177876
177879
  const parts2 = ("\n" + stdout2.toString()).split("\nprinter ");
177877
177880
  for (let i4 = 1; i4 < parts2.length; i4++) {
177878
177881
  const printers = parseLinuxLpstatPrinter(parts2[i4].split("\n"), i4);
@@ -177899,7 +177902,7 @@ var require_printer = __commonJS({
177899
177902
  }
177900
177903
  if (_darwin) {
177901
177904
  let cmd = "system_profiler SPPrintersDataType -json";
177902
- exec2(cmd, function(error2, stdout) {
177905
+ exec3(cmd, function(error2, stdout) {
177903
177906
  if (!error2) {
177904
177907
  try {
177905
177908
  const outObj = JSON.parse(stdout.toString());
@@ -177950,7 +177953,7 @@ var require_printer = __commonJS({
177950
177953
  var require_usb = __commonJS({
177951
177954
  "node_modules/systeminformation/lib/usb.js"(exports2) {
177952
177955
  "use strict";
177953
- var exec2 = __require("child_process").exec;
177956
+ var exec3 = __require("child_process").exec;
177954
177957
  var util5 = require_util12();
177955
177958
  var _platform = process.platform;
177956
177959
  var _linux = _platform === "linux" || _platform === "android";
@@ -178160,7 +178163,7 @@ var require_usb = __commonJS({
178160
178163
  let result2 = [];
178161
178164
  if (_linux) {
178162
178165
  const cmd = "export LC_ALL=C; lsusb -v 2>/dev/null; unset LC_ALL";
178163
- exec2(cmd, { maxBuffer: 1024 * 1024 * 128 }, function(error2, stdout) {
178166
+ exec3(cmd, { maxBuffer: 1024 * 1024 * 128 }, function(error2, stdout) {
178164
178167
  if (!error2) {
178165
178168
  const parts2 = ("\n\n" + stdout.toString()).split("\n\nBus ");
178166
178169
  for (let i4 = 1; i4 < parts2.length; i4++) {
@@ -178176,7 +178179,7 @@ var require_usb = __commonJS({
178176
178179
  }
178177
178180
  if (_darwin) {
178178
178181
  let cmd = "ioreg -p IOUSB -c AppleUSBRootHubDevice -w0 -l";
178179
- exec2(cmd, { maxBuffer: 1024 * 1024 * 128 }, function(error2, stdout) {
178182
+ exec3(cmd, { maxBuffer: 1024 * 1024 * 128 }, function(error2, stdout) {
178180
178183
  if (!error2) {
178181
178184
  const parts2 = stdout.toString().split(" +-o ");
178182
178185
  for (let i4 = 1; i4 < parts2.length; i4++) {
@@ -178227,7 +178230,7 @@ var require_usb = __commonJS({
178227
178230
  var require_audio = __commonJS({
178228
178231
  "node_modules/systeminformation/lib/audio.js"(exports2) {
178229
178232
  "use strict";
178230
- var exec2 = __require("child_process").exec;
178233
+ var exec3 = __require("child_process").exec;
178231
178234
  var execSync3 = __require("child_process").execSync;
178232
178235
  var util5 = require_util12();
178233
178236
  var _platform = process.platform;
@@ -178401,7 +178404,7 @@ var require_audio = __commonJS({
178401
178404
  const result2 = [];
178402
178405
  if (_linux || _freebsd || _openbsd || _netbsd) {
178403
178406
  const cmd = "lspci -vmm 2>/dev/null";
178404
- exec2(cmd, (error2, stdout) => {
178407
+ exec3(cmd, (error2, stdout) => {
178405
178408
  if (!error2) {
178406
178409
  const audioPCI = getLinuxAudioPci();
178407
178410
  const parts2 = stdout.toString().split("\n\n");
@@ -178421,7 +178424,7 @@ var require_audio = __commonJS({
178421
178424
  }
178422
178425
  if (_darwin) {
178423
178426
  const cmd = "system_profiler SPAudioDataType -json";
178424
- exec2(cmd, (error2, stdout) => {
178427
+ exec3(cmd, (error2, stdout) => {
178425
178428
  if (!error2) {
178426
178429
  try {
178427
178430
  const outObj = JSON.parse(stdout.toString());
@@ -179615,7 +179618,7 @@ var require_bluetoothVendors = __commonJS({
179615
179618
  var require_bluetooth = __commonJS({
179616
179619
  "node_modules/systeminformation/lib/bluetooth.js"(exports2) {
179617
179620
  "use strict";
179618
- var exec2 = __require("child_process").exec;
179621
+ var exec3 = __require("child_process").exec;
179619
179622
  var execSync3 = __require("child_process").execSync;
179620
179623
  var path82 = __require("path");
179621
179624
  var util5 = require_util12();
@@ -179775,7 +179778,7 @@ var require_bluetooth = __commonJS({
179775
179778
  }
179776
179779
  if (_darwin) {
179777
179780
  let cmd = "system_profiler SPBluetoothDataType -json";
179778
- exec2(cmd, (error2, stdout) => {
179781
+ exec3(cmd, (error2, stdout) => {
179779
179782
  if (!error2) {
179780
179783
  try {
179781
179784
  const outObj = JSON.parse(stdout.toString());
@@ -206981,7 +206984,7 @@ var require_src54 = __commonJS({
206981
206984
  // node_modules/pump/index.js
206982
206985
  var require_pump = __commonJS({
206983
206986
  "node_modules/pump/index.js"(exports2, module2) {
206984
- var once9 = require_once2();
206987
+ var once10 = require_once2();
206985
206988
  var eos = require_end_of_stream2();
206986
206989
  var fs70;
206987
206990
  try {
@@ -207003,7 +207006,7 @@ var require_pump = __commonJS({
207003
207006
  return stream3.setHeader && isFn(stream3.abort);
207004
207007
  };
207005
207008
  var destroyer = function(stream3, reading, writing, callback) {
207006
- callback = once9(callback);
207009
+ callback = once10(callback);
207007
207010
  var closed = false;
207008
207011
  stream3.on("close", function() {
207009
207012
  closed = true;
@@ -250282,13 +250285,13 @@ var init_base2 = __esm({
250282
250285
  editLength++;
250283
250286
  };
250284
250287
  if (callback) {
250285
- (function exec2() {
250288
+ (function exec3() {
250286
250289
  setTimeout(function() {
250287
250290
  if (editLength > maxEditLength || Date.now() > abortAfterTimestamp) {
250288
250291
  return callback(void 0);
250289
250292
  }
250290
250293
  if (!execEditLength()) {
250291
- exec2();
250294
+ exec3();
250292
250295
  }
250293
250296
  }, 0);
250294
250297
  })();
@@ -250753,7 +250756,7 @@ async function readMemoryFileContent() {
250753
250756
  }
250754
250757
  }
250755
250758
  function computeNewContent(currentContent, fact) {
250756
- let processedText = fact.trim();
250759
+ let processedText = fact.replace(/[\r\n]/g, " ").trim();
250757
250760
  processedText = processedText.replace(/^(-+\s*)+/, "").trim();
250758
250761
  const newMemoryItem = `- ${processedText}`;
250759
250762
  const headerIndex = currentContent.indexOf(MEMORY_SECTION_HEADER);
@@ -250791,7 +250794,7 @@ var init_memoryTool = __esm({
250791
250794
  init_tool_names();
250792
250795
  memoryToolSchemaData = {
250793
250796
  name: MEMORY_TOOL_NAME,
250794
- description: "Saves a specific piece of information or fact to your long-term memory. Use this when the user explicitly asks you to remember something, or when they state a clear, concise fact that seems important to retain for future interactions.",
250797
+ description: 'Saves a specific piece of information, fact, or user preference to your long-term memory. Use this when the user explicitly asks you to remember something, or when they state a clear, concise fact or preference that seems important to retain for future interactions. Examples: "Always lint after building", "Never run sudo commands", "Remember my address".',
250795
250798
  parametersJsonSchema: {
250796
250799
  type: "object",
250797
250800
  properties: {
@@ -250800,7 +250803,8 @@ var init_memoryTool = __esm({
250800
250803
  description: "The specific fact or piece of information to remember. Should be a clear, self-contained statement."
250801
250804
  }
250802
250805
  },
250803
- required: ["fact"]
250806
+ required: ["fact"],
250807
+ additionalProperties: false
250804
250808
  }
250805
250809
  };
250806
250810
  memoryToolDescription = `
@@ -250825,6 +250829,7 @@ Do NOT use this tool:
250825
250829
  currentGeminiMdFilename = DEFAULT_CONTEXT_FILENAME;
250826
250830
  MemoryToolInvocation = class _MemoryToolInvocation extends BaseToolInvocation {
250827
250831
  static allowlist = /* @__PURE__ */ new Set();
250832
+ proposedNewContent;
250828
250833
  constructor(params, messageBus, toolName, displayName) {
250829
250834
  super(params, messageBus, toolName, displayName);
250830
250835
  }
@@ -250839,9 +250844,11 @@ Do NOT use this tool:
250839
250844
  return false;
250840
250845
  }
250841
250846
  const currentContent = await readMemoryFileContent();
250842
- const newContent = computeNewContent(currentContent, this.params.fact);
250847
+ const { fact, modified_by_user, modified_content } = this.params;
250848
+ const contentForDiff = modified_by_user && modified_content !== void 0 ? modified_content : computeNewContent(currentContent, fact);
250849
+ this.proposedNewContent = contentForDiff;
250843
250850
  const fileName = path24.basename(memoryFilePath);
250844
- const fileDiff = createPatch(fileName, currentContent, newContent, "Current", "Proposed", DEFAULT_DIFF_OPTIONS);
250851
+ const fileDiff = createPatch(fileName, currentContent, this.proposedNewContent, "Current", "Proposed", DEFAULT_DIFF_OPTIONS);
250845
250852
  const confirmationDetails = {
250846
250853
  type: "edit",
250847
250854
  title: `Confirm Memory Save: ${tildeifyPath(memoryFilePath)}`,
@@ -250849,7 +250856,7 @@ Do NOT use this tool:
250849
250856
  filePath: memoryFilePath,
250850
250857
  fileDiff,
250851
250858
  originalContent: currentContent,
250852
- newContent,
250859
+ newContent: this.proposedNewContent,
250853
250860
  onConfirm: async (outcome) => {
250854
250861
  if (outcome === ToolConfirmationOutcome.ProceedAlways) {
250855
250862
  _MemoryToolInvocation.allowlist.add(allowlistKey);
@@ -250862,34 +250869,31 @@ Do NOT use this tool:
250862
250869
  async execute(_signal) {
250863
250870
  const { fact, modified_by_user, modified_content } = this.params;
250864
250871
  try {
250872
+ let contentToWrite;
250873
+ let successMessage;
250874
+ const sanitizedFact = fact.replace(/[\r\n]/g, " ").trim();
250865
250875
  if (modified_by_user && modified_content !== void 0) {
250866
- await fs30.mkdir(path24.dirname(getGlobalMemoryFilePath()), {
250867
- recursive: true
250868
- });
250869
- await fs30.writeFile(getGlobalMemoryFilePath(), modified_content, "utf-8");
250870
- const successMessage = `Okay, I've updated the memory file with your modifications.`;
250871
- return {
250872
- llmContent: JSON.stringify({
250873
- success: true,
250874
- message: successMessage
250875
- }),
250876
- returnDisplay: successMessage
250877
- };
250876
+ contentToWrite = modified_content;
250877
+ successMessage = `Okay, I've updated the memory file with your modifications.`;
250878
250878
  } else {
250879
- await MemoryTool.performAddMemoryEntry(fact, getGlobalMemoryFilePath(), {
250880
- readFile: fs30.readFile,
250881
- writeFile: fs30.writeFile,
250882
- mkdir: fs30.mkdir
250883
- });
250884
- const successMessage = `Okay, I've remembered that: "${fact}"`;
250885
- return {
250886
- llmContent: JSON.stringify({
250887
- success: true,
250888
- message: successMessage
250889
- }),
250890
- returnDisplay: successMessage
250891
- };
250879
+ if (this.proposedNewContent === void 0) {
250880
+ const currentContent = await readMemoryFileContent();
250881
+ this.proposedNewContent = computeNewContent(currentContent, fact);
250882
+ }
250883
+ contentToWrite = this.proposedNewContent;
250884
+ successMessage = `Okay, I've remembered that: "${sanitizedFact}"`;
250892
250885
  }
250886
+ await fs30.mkdir(path24.dirname(getGlobalMemoryFilePath()), {
250887
+ recursive: true
250888
+ });
250889
+ await fs30.writeFile(getGlobalMemoryFilePath(), contentToWrite, "utf-8");
250890
+ return {
250891
+ llmContent: JSON.stringify({
250892
+ success: true,
250893
+ message: successMessage
250894
+ }),
250895
+ returnDisplay: successMessage
250896
+ };
250893
250897
  } catch (error2) {
250894
250898
  const errorMessage = error2 instanceof Error ? error2.message : String(error2);
250895
250899
  return {
@@ -250920,27 +250924,14 @@ Do NOT use this tool:
250920
250924
  createInvocation(params, messageBus, toolName, displayName) {
250921
250925
  return new MemoryToolInvocation(params, messageBus, toolName ?? this.name, displayName ?? this.displayName);
250922
250926
  }
250923
- static async performAddMemoryEntry(text, memoryFilePath, fsAdapter) {
250924
- try {
250925
- await fsAdapter.mkdir(path24.dirname(memoryFilePath), { recursive: true });
250926
- let currentContent = "";
250927
- try {
250928
- currentContent = await fsAdapter.readFile(memoryFilePath, "utf-8");
250929
- } catch (_e) {
250930
- }
250931
- const newContent = computeNewContent(currentContent, text);
250932
- await fsAdapter.writeFile(memoryFilePath, newContent, "utf-8");
250933
- } catch (error2) {
250934
- throw new Error(`[MemoryTool] Failed to add memory entry: ${error2 instanceof Error ? error2.message : String(error2)}`);
250935
- }
250936
- }
250937
250927
  getModifyContext(_abortSignal) {
250938
250928
  return {
250939
250929
  getFilePath: (_params) => getGlobalMemoryFilePath(),
250940
250930
  getCurrentContent: async (_params) => readMemoryFileContent(),
250941
250931
  getProposedContent: async (params) => {
250942
250932
  const currentContent = await readMemoryFileContent();
250943
- return computeNewContent(currentContent, params.fact);
250933
+ const { fact, modified_by_user, modified_content } = params;
250934
+ return modified_by_user && modified_content !== void 0 ? modified_content : computeNewContent(currentContent, fact);
250944
250935
  },
250945
250936
  createUpdatedParams: (_oldContent, modifiedProposedContent, originalParams) => ({
250946
250937
  ...originalParams,
@@ -253276,11 +253267,11 @@ var require_extract_zip = __commonJS({
253276
253267
  var { createWriteStream: createWriteStream7, promises: fs70 } = __require("fs");
253277
253268
  var getStream = require_get_stream();
253278
253269
  var path82 = __require("path");
253279
- var { promisify: promisify14 } = __require("util");
253270
+ var { promisify: promisify15 } = __require("util");
253280
253271
  var stream3 = __require("stream");
253281
253272
  var yauzl = require_yauzl();
253282
- var openZip = promisify14(yauzl.open);
253283
- var pipeline4 = promisify14(stream3.pipeline);
253273
+ var openZip = promisify15(yauzl.open);
253274
+ var pipeline4 = promisify15(stream3.pipeline);
253284
253275
  var Extractor = class {
253285
253276
  constructor(zipPath, opts) {
253286
253277
  this.zipPath = zipPath;
@@ -253362,7 +253353,7 @@ var require_extract_zip = __commonJS({
253362
253353
  await fs70.mkdir(destDir, mkdirOptions);
253363
253354
  if (isDir) return;
253364
253355
  debug2("opening read stream", dest);
253365
- const readStream2 = await promisify14(this.zipfile.openReadStream.bind(this.zipfile))(entry);
253356
+ const readStream2 = await promisify15(this.zipfile.openReadStream.bind(this.zipfile))(entry);
253366
253357
  if (symlink) {
253367
253358
  const link = await getStream(readStream2);
253368
253359
  debug2("creating symlink", link, dest);
@@ -274102,7 +274093,7 @@ var require_mock_interceptor = __commonJS({
274102
274093
  var require_mock_client = __commonJS({
274103
274094
  "node_modules/undici/lib/mock/mock-client.js"(exports2, module2) {
274104
274095
  "use strict";
274105
- var { promisify: promisify14 } = __require("node:util");
274096
+ var { promisify: promisify15 } = __require("node:util");
274106
274097
  var Client3 = require_client2();
274107
274098
  var { buildMockDispatch } = require_mock_utils();
274108
274099
  var {
@@ -274150,7 +274141,7 @@ var require_mock_client = __commonJS({
274150
274141
  this[kDispatches] = [];
274151
274142
  }
274152
274143
  async [kClose]() {
274153
- await promisify14(this[kOriginalClose])();
274144
+ await promisify15(this[kOriginalClose])();
274154
274145
  this[kConnected] = 0;
274155
274146
  this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
274156
274147
  }
@@ -274363,7 +274354,7 @@ var require_mock_call_history = __commonJS({
274363
274354
  var require_mock_pool = __commonJS({
274364
274355
  "node_modules/undici/lib/mock/mock-pool.js"(exports2, module2) {
274365
274356
  "use strict";
274366
- var { promisify: promisify14 } = __require("node:util");
274357
+ var { promisify: promisify15 } = __require("node:util");
274367
274358
  var Pool = require_pool2();
274368
274359
  var { buildMockDispatch } = require_mock_utils();
274369
274360
  var {
@@ -274411,7 +274402,7 @@ var require_mock_pool = __commonJS({
274411
274402
  this[kDispatches] = [];
274412
274403
  }
274413
274404
  async [kClose]() {
274414
- await promisify14(this[kOriginalClose])();
274405
+ await promisify15(this[kOriginalClose])();
274415
274406
  this[kConnected] = 0;
274416
274407
  this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
274417
274408
  }
@@ -327581,7 +327572,7 @@ var __filename = fileURLToPath5(import.meta.url);
327581
327572
  var __dirname3 = path20.dirname(__filename);
327582
327573
  async function getVersion() {
327583
327574
  const pkgJson = await getPackageJson(__dirname3);
327584
- return "0.28.0-preview.5";
327575
+ return "0.29.0-nightly.20260206.4ffc349c1";
327585
327576
  }
327586
327577
 
327587
327578
  // packages/core/dist/src/code_assist/experiments/client_metadata.js
@@ -328485,10 +328476,11 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
328485
328476
  serverToolName;
328486
328477
  parameterSchema;
328487
328478
  trust;
328479
+ isReadOnly;
328488
328480
  cliConfig;
328489
328481
  extensionName;
328490
328482
  extensionId;
328491
- constructor(mcpTool, serverName, serverToolName, description, parameterSchema, messageBus, trust, nameOverride, cliConfig, extensionName, extensionId) {
328483
+ constructor(mcpTool, serverName, serverToolName, description, parameterSchema, messageBus, trust, isReadOnly, nameOverride, cliConfig, extensionName, extensionId) {
328492
328484
  super(
328493
328485
  nameOverride ?? generateValidName(serverToolName),
328494
328486
  `${serverToolName} (${serverName} MCP Server)`,
@@ -328508,6 +328500,7 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
328508
328500
  this.serverToolName = serverToolName;
328509
328501
  this.parameterSchema = parameterSchema;
328510
328502
  this.trust = trust;
328503
+ this.isReadOnly = isReadOnly;
328511
328504
  this.cliConfig = cliConfig;
328512
328505
  this.extensionName = extensionName;
328513
328506
  this.extensionId = extensionId;
@@ -328519,7 +328512,7 @@ var DiscoveredMCPTool = class _DiscoveredMCPTool extends BaseDeclarativeTool {
328519
328512
  return `${this.getFullyQualifiedPrefix()}${generateValidName(this.serverToolName)}`;
328520
328513
  }
328521
328514
  asFullyQualifiedTool() {
328522
- return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.messageBus, this.trust, this.getFullyQualifiedName(), this.cliConfig, this.extensionName, this.extensionId);
328515
+ return new _DiscoveredMCPTool(this.mcpTool, this.serverName, this.serverToolName, this.description, this.parameterSchema, this.messageBus, this.trust, this.isReadOnly, this.getFullyQualifiedName(), this.cliConfig, this.extensionName, this.extensionId);
328523
328516
  }
328524
328517
  createInvocation(params, messageBus, _toolName, _displayName) {
328525
328518
  return new DiscoveredMCPToolInvocation(this.mcpTool, this.serverName, this.serverToolName, _displayName ?? this.displayName, messageBus, this.trust, params, this.cliConfig);
@@ -328773,6 +328766,7 @@ var BASELINE_COMPARISON = "gemini_cli.performance.baseline.comparison";
328773
328766
  var FLICKER_FRAME_COUNT = "gemini_cli.ui.flicker.count";
328774
328767
  var SLOW_RENDER_LATENCY = "gemini_cli.ui.slow_render.latency";
328775
328768
  var EXIT_FAIL_COUNT = "gemini_cli.exit.fail.count";
328769
+ var PLAN_EXECUTION_COUNT = "gemini_cli.plan.execution.count";
328776
328770
  var baseMetricDefinition = {
328777
328771
  getCommonAttributes
328778
328772
  };
@@ -328873,6 +328867,12 @@ var COUNTER_DEFINITIONS = {
328873
328867
  assign: (c4) => exitFailCounter = c4,
328874
328868
  attributes: {}
328875
328869
  },
328870
+ [PLAN_EXECUTION_COUNT]: {
328871
+ description: "Counts plan executions (switching from Plan Mode).",
328872
+ valueType: ValueType.INT,
328873
+ assign: (c4) => planExecutionCounter = c4,
328874
+ attributes: {}
328875
+ },
328876
328876
  [EVENT_HOOK_CALL_COUNT]: {
328877
328877
  description: "Counts hook calls, tagged by hook event name and success.",
328878
328878
  valueType: ValueType.INT,
@@ -329105,6 +329105,7 @@ var agentRecoveryAttemptCounter;
329105
329105
  var agentRecoveryAttemptDurationHistogram;
329106
329106
  var flickerFrameCounter;
329107
329107
  var exitFailCounter;
329108
+ var planExecutionCounter;
329108
329109
  var slowRenderHistogram;
329109
329110
  var hookCallCounter;
329110
329111
  var hookCallLatencyHistogram;
@@ -329222,6 +329223,14 @@ function recordLinesChanged(config3, lines, changeType, attributes) {
329222
329223
  ...attributes ?? {}
329223
329224
  });
329224
329225
  }
329226
+ function recordPlanExecution(config3, attributes) {
329227
+ if (!planExecutionCounter || !isMetricsInitialized)
329228
+ return;
329229
+ planExecutionCounter.add(1, {
329230
+ ...baseMetricDefinition.getCommonAttributes(config3),
329231
+ ...attributes
329232
+ });
329233
+ }
329225
329234
  function recordContentRetry(config3) {
329226
329235
  if (!contentRetryCounter || !isMetricsInitialized)
329227
329236
  return;
@@ -330699,11 +330708,14 @@ var WebFetchFallbackAttemptEvent = class {
330699
330708
  }
330700
330709
  };
330701
330710
  var EVENT_HOOK_CALL = "gemini_cli.hook_call";
330711
+ var EVENT_APPROVAL_MODE_SWITCH = "gemini_cli.plan.approval_mode_switch";
330702
330712
  var ApprovalModeSwitchEvent = class {
330703
330713
  eventName = "approval_mode_switch";
330704
330714
  from_mode;
330705
330715
  to_mode;
330706
330716
  constructor(fromMode, toMode) {
330717
+ this["event.name"] = this.eventName;
330718
+ this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
330707
330719
  this.from_mode = fromMode;
330708
330720
  this.to_mode = toMode;
330709
330721
  }
@@ -330712,7 +330724,7 @@ var ApprovalModeSwitchEvent = class {
330712
330724
  toOpenTelemetryAttributes(config3) {
330713
330725
  return {
330714
330726
  ...getCommonAttributes(config3),
330715
- event_name: this.eventName,
330727
+ event_name: EVENT_APPROVAL_MODE_SWITCH,
330716
330728
  from_mode: this.from_mode,
330717
330729
  to_mode: this.to_mode
330718
330730
  };
@@ -330721,11 +330733,14 @@ var ApprovalModeSwitchEvent = class {
330721
330733
  return `Approval mode switched from ${this.from_mode} to ${this.to_mode}.`;
330722
330734
  }
330723
330735
  };
330736
+ var EVENT_APPROVAL_MODE_DURATION = "gemini_cli.plan.approval_mode_duration";
330724
330737
  var ApprovalModeDurationEvent = class {
330725
330738
  eventName = "approval_mode_duration";
330726
330739
  mode;
330727
330740
  duration_ms;
330728
330741
  constructor(mode, durationMs) {
330742
+ this["event.name"] = this.eventName;
330743
+ this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
330729
330744
  this.mode = mode;
330730
330745
  this.duration_ms = durationMs;
330731
330746
  }
@@ -330734,7 +330749,7 @@ var ApprovalModeDurationEvent = class {
330734
330749
  toOpenTelemetryAttributes(config3) {
330735
330750
  return {
330736
330751
  ...getCommonAttributes(config3),
330737
- event_name: this.eventName,
330752
+ event_name: EVENT_APPROVAL_MODE_DURATION,
330738
330753
  mode: this.mode,
330739
330754
  duration_ms: this.duration_ms
330740
330755
  };
@@ -330743,6 +330758,29 @@ var ApprovalModeDurationEvent = class {
330743
330758
  return `Approval mode ${this.mode} was active for ${this.duration_ms}ms.`;
330744
330759
  }
330745
330760
  };
330761
+ var EVENT_PLAN_EXECUTION = "gemini_cli.plan.execution";
330762
+ var PlanExecutionEvent = class {
330763
+ eventName = "plan_execution";
330764
+ approval_mode;
330765
+ constructor(approvalMode) {
330766
+ this["event.name"] = this.eventName;
330767
+ this["event.timestamp"] = (/* @__PURE__ */ new Date()).toISOString();
330768
+ this.approval_mode = approvalMode;
330769
+ }
330770
+ "event.name";
330771
+ "event.timestamp";
330772
+ toOpenTelemetryAttributes(config3) {
330773
+ return {
330774
+ ...getCommonAttributes(config3),
330775
+ "event.name": EVENT_PLAN_EXECUTION,
330776
+ "event.timestamp": this["event.timestamp"],
330777
+ approval_mode: this.approval_mode
330778
+ };
330779
+ }
330780
+ toLogBody() {
330781
+ return `Plan executed with approval mode: ${this.approval_mode}`;
330782
+ }
330783
+ };
330746
330784
  var HookCallEvent = class {
330747
330785
  "event.name";
330748
330786
  "event.timestamp";
@@ -331005,8 +331043,8 @@ var Float64Vector = import_vector.default.Float64Vector;
331005
331043
  var PointerVector = import_vector.default.PointerVector;
331006
331044
 
331007
331045
  // packages/core/dist/src/generated/git-commit.js
331008
- var GIT_COMMIT_INFO = "44c67daa0";
331009
- var CLI_VERSION = "0.28.0-preview.5";
331046
+ var GIT_COMMIT_INFO = "4ffc349c1";
331047
+ var CLI_VERSION = "0.29.0-nightly.20260206.4ffc349c1";
331010
331048
 
331011
331049
  // packages/core/dist/src/ide/detect-ide.js
331012
331050
  var IDE_DEFINITIONS = {
@@ -331166,6 +331204,7 @@ var EventNames;
331166
331204
  EventNames2["HOOK_CALL"] = "hook_call";
331167
331205
  EventNames2["APPROVAL_MODE_SWITCH"] = "approval_mode_switch";
331168
331206
  EventNames2["APPROVAL_MODE_DURATION"] = "approval_mode_duration";
331207
+ EventNames2["PLAN_EXECUTION"] = "plan_execution";
331169
331208
  })(EventNames || (EventNames = {}));
331170
331209
  function determineSurface() {
331171
331210
  if (process.env["SURFACE"]) {
@@ -332288,6 +332327,16 @@ var ClearcutLogger = class _ClearcutLogger {
332288
332327
  this.enqueueLogEvent(this.createLogEvent(EventNames.APPROVAL_MODE_DURATION, data));
332289
332328
  this.flushIfNeeded();
332290
332329
  }
332330
+ logPlanExecutionEvent(event) {
332331
+ const data = [
332332
+ {
332333
+ gemini_cli_key: EventMetadataKey.GEMINI_CLI_APPROVAL_MODE,
332334
+ value: event.approval_mode
332335
+ }
332336
+ ];
332337
+ this.enqueueLogEvent(this.createLogEvent(EventNames.PLAN_EXECUTION, data));
332338
+ this.flushIfNeeded();
332339
+ }
332291
332340
  /**
332292
332341
  * Adds default fields to data, and returns a new data array. This fields
332293
332342
  * should exist on all log events.
@@ -333990,6 +334039,18 @@ function logApprovalModeDuration(config3, event) {
333990
334039
  });
333991
334040
  });
333992
334041
  }
334042
+ function logPlanExecution(config3, event) {
334043
+ ClearcutLogger.getInstance(config3)?.logPlanExecutionEvent(event);
334044
+ bufferTelemetryEvent(() => {
334045
+ import_api_logs.logs.getLogger(SERVICE_NAME).emit({
334046
+ body: event.toLogBody(),
334047
+ attributes: event.toOpenTelemetryAttributes(config3)
334048
+ });
334049
+ recordPlanExecution(config3, {
334050
+ approval_mode: event.approval_mode
334051
+ });
334052
+ });
334053
+ }
333993
334054
  function logHookCall(config3, event) {
333994
334055
  ClearcutLogger.getInstance(config3)?.logHookCallEvent(event);
333995
334056
  bufferTelemetryEvent(() => {
@@ -356909,7 +356970,7 @@ function timedOut(request3, delays, options) {
356909
356970
  }
356910
356971
  request3[reentry] = true;
356911
356972
  const cancelers = [];
356912
- const { once: once9, unhandleAll } = unhandle();
356973
+ const { once: once10, unhandleAll } = unhandle();
356913
356974
  const handled = /* @__PURE__ */ new Map();
356914
356975
  const addTimeout = (delay4, callback, event) => {
356915
356976
  const timeout = setTimeout(callback, delay4, delay4, event);
@@ -356943,8 +357004,8 @@ function timedOut(request3, delays, options) {
356943
357004
  });
356944
357005
  if (delays.request !== void 0) {
356945
357006
  const cancelTimeout = addTimeout(delays.request, timeoutHandler, "request");
356946
- once9(request3, "response", (response) => {
356947
- once9(response, "end", cancelTimeout);
357007
+ once10(request3, "response", (response) => {
357008
+ once10(response, "end", cancelTimeout);
356948
357009
  });
356949
357010
  }
356950
357011
  if (delays.socket !== void 0) {
@@ -356962,55 +357023,55 @@ function timedOut(request3, delays, options) {
356962
357023
  const hasSecureConnect = delays.secureConnect !== void 0;
356963
357024
  const hasSend = delays.send !== void 0;
356964
357025
  if (hasLookup || hasConnect || hasSecureConnect || hasSend) {
356965
- once9(request3, "socket", (socket) => {
357026
+ once10(request3, "socket", (socket) => {
356966
357027
  const { socketPath } = request3;
356967
357028
  if (socket.connecting) {
356968
357029
  const hasPath = Boolean(socketPath ?? net2.isIP(hostname3 ?? host ?? "") !== 0);
356969
357030
  if (hasLookup && !hasPath && socket.address().address === void 0) {
356970
357031
  const cancelTimeout = addTimeout(delays.lookup, timeoutHandler, "lookup");
356971
- once9(socket, "lookup", cancelTimeout);
357032
+ once10(socket, "lookup", cancelTimeout);
356972
357033
  }
356973
357034
  if (hasConnect) {
356974
357035
  const timeConnect = () => addTimeout(delays.connect, timeoutHandler, "connect");
356975
357036
  if (hasPath) {
356976
- once9(socket, "connect", timeConnect());
357037
+ once10(socket, "connect", timeConnect());
356977
357038
  } else {
356978
- once9(socket, "lookup", (error2) => {
357039
+ once10(socket, "lookup", (error2) => {
356979
357040
  if (error2 === null) {
356980
- once9(socket, "connect", timeConnect());
357041
+ once10(socket, "connect", timeConnect());
356981
357042
  }
356982
357043
  });
356983
357044
  }
356984
357045
  }
356985
357046
  if (hasSecureConnect && options.protocol === "https:") {
356986
- once9(socket, "connect", () => {
357047
+ once10(socket, "connect", () => {
356987
357048
  const cancelTimeout = addTimeout(delays.secureConnect, timeoutHandler, "secureConnect");
356988
- once9(socket, "secureConnect", cancelTimeout);
357049
+ once10(socket, "secureConnect", cancelTimeout);
356989
357050
  });
356990
357051
  }
356991
357052
  }
356992
357053
  if (hasSend) {
356993
357054
  const timeRequest = () => addTimeout(delays.send, timeoutHandler, "send");
356994
357055
  if (socket.connecting) {
356995
- once9(socket, "connect", () => {
356996
- once9(request3, "upload-complete", timeRequest());
357056
+ once10(socket, "connect", () => {
357057
+ once10(request3, "upload-complete", timeRequest());
356997
357058
  });
356998
357059
  } else {
356999
- once9(request3, "upload-complete", timeRequest());
357060
+ once10(request3, "upload-complete", timeRequest());
357000
357061
  }
357001
357062
  }
357002
357063
  });
357003
357064
  }
357004
357065
  if (delays.response !== void 0) {
357005
- once9(request3, "upload-complete", () => {
357066
+ once10(request3, "upload-complete", () => {
357006
357067
  const cancelTimeout = addTimeout(delays.response, timeoutHandler, "response");
357007
- once9(request3, "response", cancelTimeout);
357068
+ once10(request3, "response", cancelTimeout);
357008
357069
  });
357009
357070
  }
357010
357071
  if (delays.read !== void 0) {
357011
- once9(request3, "response", (response) => {
357072
+ once10(request3, "response", (response) => {
357012
357073
  const cancelTimeout = addTimeout(delays.read, timeoutHandler, "read");
357013
- once9(response, "end", cancelTimeout);
357074
+ once10(response, "end", cancelTimeout);
357014
357075
  });
357015
357076
  }
357016
357077
  return cancelTimeouts;
@@ -362654,7 +362715,9 @@ init_diffOptions();
362654
362715
  // packages/core/dist/src/utils/editor.js
362655
362716
  init_debugLogger();
362656
362717
  init_events();
362657
- import { execSync, spawn as spawn5, spawnSync as spawnSync3 } from "node:child_process";
362718
+ import { exec, execSync, spawn as spawn5, spawnSync as spawnSync3 } from "node:child_process";
362719
+ import { promisify as promisify12 } from "node:util";
362720
+ import { once as once9 } from "node:events";
362658
362721
  var GUI_EDITORS = [
362659
362722
  "vscode",
362660
362723
  "vscodium",
@@ -362668,7 +362731,11 @@ var EDITORS = [...GUI_EDITORS, ...TERMINAL_EDITORS];
362668
362731
  var GUI_EDITORS_SET = new Set(GUI_EDITORS);
362669
362732
  var TERMINAL_EDITORS_SET = new Set(TERMINAL_EDITORS);
362670
362733
  var EDITORS_SET = new Set(EDITORS);
362734
+ var NO_EDITOR_AVAILABLE_ERROR = "No external editor is available. Please run /editor to configure one.";
362671
362735
  var DEFAULT_GUI_EDITOR = "vscode";
362736
+ function isGuiEditor(editor) {
362737
+ return GUI_EDITORS_SET.has(editor);
362738
+ }
362672
362739
  function isTerminalEditor(editor) {
362673
362740
  return TERMINAL_EDITORS_SET.has(editor);
362674
362741
  }
@@ -362678,9 +362745,21 @@ function isValidEditorType(editor) {
362678
362745
  function escapeELispString(str2) {
362679
362746
  return `"${str2.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"`;
362680
362747
  }
362748
+ var execAsync = promisify12(exec);
362749
+ function getCommandExistsCmd(cmd) {
362750
+ return process.platform === "win32" ? `where.exe ${cmd}` : `command -v ${cmd}`;
362751
+ }
362681
362752
  function commandExists(cmd) {
362682
362753
  try {
362683
- execSync(process.platform === "win32" ? `where.exe ${cmd}` : `command -v ${cmd}`, { stdio: "ignore" });
362754
+ execSync(getCommandExistsCmd(cmd), { stdio: "ignore" });
362755
+ return true;
362756
+ } catch {
362757
+ return false;
362758
+ }
362759
+ }
362760
+ async function commandExistsAsync(cmd) {
362761
+ try {
362762
+ await execAsync(getCommandExistsCmd(cmd));
362684
362763
  return true;
362685
362764
  } catch {
362686
362765
  return false;
@@ -362701,11 +362780,37 @@ var editorCommands = {
362701
362780
  },
362702
362781
  hx: { win32: ["hx"], default: ["hx"] }
362703
362782
  };
362704
- function getEditorCommand(editor) {
362783
+ function getEditorCommands(editor) {
362705
362784
  const commandConfig = editorCommands[editor];
362706
- const commands = process.platform === "win32" ? commandConfig.win32 : commandConfig.default;
362785
+ return process.platform === "win32" ? commandConfig.win32 : commandConfig.default;
362786
+ }
362787
+ async function hasValidEditorCommandAsync(editor) {
362788
+ return Promise.any(getEditorCommands(editor).map((cmd) => commandExistsAsync(cmd).then((exists2) => exists2 || Promise.reject()))).catch(() => false);
362789
+ }
362790
+ function getEditorCommand(editor) {
362791
+ const commands = getEditorCommands(editor);
362707
362792
  return commands.slice(0, -1).find((cmd) => commandExists(cmd)) || commands[commands.length - 1];
362708
362793
  }
362794
+ function allowEditorTypeInSandbox(editor) {
362795
+ const notUsingSandbox = !process.env["SANDBOX"];
362796
+ if (isGuiEditor(editor)) {
362797
+ return notUsingSandbox;
362798
+ }
362799
+ return true;
362800
+ }
362801
+ function isEditorTypeAvailable(editor) {
362802
+ return !!editor && isValidEditorType(editor) && allowEditorTypeInSandbox(editor);
362803
+ }
362804
+ async function isEditorAvailableAsync(editor) {
362805
+ return isEditorTypeAvailable(editor) && await hasValidEditorCommandAsync(editor);
362806
+ }
362807
+ async function resolveEditorAsync(preferredEditor, signal) {
362808
+ if (preferredEditor && await isEditorAvailableAsync(preferredEditor)) {
362809
+ return preferredEditor;
362810
+ }
362811
+ coreEvents.emit(CoreEvent.RequestEditorSelection);
362812
+ return once9(coreEvents, CoreEvent.EditorSelected, { signal }).then(([payload]) => payload.editor).catch(() => void 0);
362813
+ }
362709
362814
  function getDiffCommand(oldPath, newPath, editor) {
362710
362815
  if (!isValidEditorType(editor)) {
362711
362816
  return null;
@@ -363083,17 +363188,17 @@ var CloseDiffRequestSchema = external_exports.object({
363083
363188
  });
363084
363189
 
363085
363190
  // packages/core/dist/src/ide/process-utils.js
363086
- import { exec } from "node:child_process";
363087
- import { promisify as promisify12 } from "node:util";
363191
+ import { exec as exec2 } from "node:child_process";
363192
+ import { promisify as promisify13 } from "node:util";
363088
363193
  import os12 from "node:os";
363089
363194
  import path48 from "node:path";
363090
- var execAsync = promisify12(exec);
363195
+ var execAsync2 = promisify13(exec2);
363091
363196
  var MAX_TRAVERSAL_DEPTH = 32;
363092
363197
  async function getProcessTableWindows() {
363093
363198
  const processMap = /* @__PURE__ */ new Map();
363094
363199
  try {
363095
363200
  const powershellCommand = "Get-CimInstance Win32_Process | Select-Object ProcessId,ParentProcessId,Name,CommandLine | ConvertTo-Json -Compress";
363096
- const { stdout } = await execAsync(`powershell "${powershellCommand}"`, {
363201
+ const { stdout } = await execAsync2(`powershell "${powershellCommand}"`, {
363097
363202
  maxBuffer: 10 * 1024 * 1024
363098
363203
  });
363099
363204
  if (!stdout.trim()) {
@@ -363125,7 +363230,7 @@ async function getProcessTableWindows() {
363125
363230
  async function getProcessInfo(pid) {
363126
363231
  try {
363127
363232
  const command = `ps -o ppid=,command= -p ${pid}`;
363128
- const { stdout } = await execAsync(command);
363233
+ const { stdout } = await execAsync2(command);
363129
363234
  const trimmedStdout = stdout.trim();
363130
363235
  if (!trimmedStdout) {
363131
363236
  return { parentPid: 0, name: "", command: "" };
@@ -372565,10 +372670,10 @@ import { createHash as createHash8 } from "node:crypto";
372565
372670
 
372566
372671
  // packages/core/dist/src/utils/secure-browser-launcher.js
372567
372672
  import { execFile as execFile6 } from "node:child_process";
372568
- import { promisify as promisify13 } from "node:util";
372673
+ import { promisify as promisify14 } from "node:util";
372569
372674
  import { platform as platform10 } from "node:os";
372570
372675
  import { URL as URL6 } from "node:url";
372571
- var execFileAsync5 = promisify13(execFile6);
372676
+ var execFileAsync5 = promisify14(execFile6);
372572
372677
  function validateUrl(url5) {
372573
372678
  let parsedUrl;
372574
372679
  try {
@@ -373031,7 +373136,14 @@ var RETRYABLE_NETWORK_CODES = [
373031
373136
  "EPIPE",
373032
373137
  "ENOTFOUND",
373033
373138
  "EAI_AGAIN",
373034
- "ECONNREFUSED"
373139
+ "ECONNREFUSED",
373140
+ // SSL/TLS transient errors
373141
+ "ERR_SSL_SSLV3_ALERT_BAD_RECORD_MAC",
373142
+ "ERR_SSL_WRONG_VERSION_NUMBER",
373143
+ "ERR_SSL_DECRYPTION_FAILED_OR_BAD_RECORD_MAC",
373144
+ "ERR_SSL_BAD_RECORD_MAC",
373145
+ "EPROTO"
373146
+ // Generic protocol error (often SSL-related)
373035
373147
  ];
373036
373148
  function getNetworkErrorCode(error2) {
373037
373149
  const getCode = (obj) => {
@@ -373047,8 +373159,17 @@ function getNetworkErrorCode(error2) {
373047
373159
  if (directCode) {
373048
373160
  return directCode;
373049
373161
  }
373050
- if (typeof error2 === "object" && error2 !== null && "cause" in error2) {
373051
- return getCode(error2.cause);
373162
+ let current = error2;
373163
+ const maxDepth = 5;
373164
+ for (let depth = 0; depth < maxDepth; depth++) {
373165
+ if (typeof current !== "object" || current === null || !("cause" in current)) {
373166
+ break;
373167
+ }
373168
+ current = current.cause;
373169
+ const code2 = getCode(current);
373170
+ if (code2) {
373171
+ return code2;
373172
+ }
373052
373173
  }
373053
373174
  return void 0;
373054
373175
  }
@@ -382369,8 +382490,8 @@ var AskUserTool = class extends BaseDeclarativeTool {
382369
382490
  },
382370
382491
  header: {
382371
382492
  type: "string",
382372
- maxLength: 12,
382373
- description: 'Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".'
382493
+ maxLength: 16,
382494
+ description: 'Very short label displayed as a chip/tag (max 16 chars). Examples: "Auth method", "Library", "Approach".'
382374
382495
  },
382375
382496
  type: {
382376
382497
  type: "string",
@@ -382657,6 +382778,8 @@ var ExitPlanModeInvocation = class extends BaseToolInvocation {
382657
382778
  if (payload?.approved) {
382658
382779
  const newMode = payload.approvalMode ?? ApprovalMode.DEFAULT;
382659
382780
  this.config.setApprovalMode(newMode);
382781
+ this.config.setApprovedPlanPath(resolvedPlanPath);
382782
+ logPlanExecution(this.config, new PlanExecutionEvent(newMode));
382660
382783
  const description = getApprovalModeDescription(newMode);
382661
382784
  return {
382662
382785
  llmContent: `Plan approved. Switching to ${description}.
@@ -382688,6 +382811,71 @@ Ask the user for specific feedback on how to improve the plan.`,
382688
382811
  }
382689
382812
  };
382690
382813
 
382814
+ // packages/core/dist/src/tools/enter-plan-mode.js
382815
+ init_tools();
382816
+ init_tool_names();
382817
+ init_types2();
382818
+ var EnterPlanModeTool = class extends BaseDeclarativeTool {
382819
+ config;
382820
+ constructor(config3, messageBus) {
382821
+ super(ENTER_PLAN_MODE_TOOL_NAME, "Enter Plan Mode", "Switch to Plan Mode to safely research, design, and plan complex changes using read-only tools.", Kind.Plan, {
382822
+ type: "object",
382823
+ properties: {
382824
+ reason: {
382825
+ type: "string",
382826
+ description: "Short reason explaining why you are entering plan mode."
382827
+ }
382828
+ }
382829
+ }, messageBus);
382830
+ this.config = config3;
382831
+ }
382832
+ createInvocation(params, messageBus, toolName, toolDisplayName) {
382833
+ return new EnterPlanModeInvocation(params, messageBus, toolName, toolDisplayName, this.config);
382834
+ }
382835
+ };
382836
+ var EnterPlanModeInvocation = class extends BaseToolInvocation {
382837
+ config;
382838
+ confirmationOutcome = null;
382839
+ constructor(params, messageBus, toolName, toolDisplayName, config3) {
382840
+ super(params, messageBus, toolName, toolDisplayName);
382841
+ this.config = config3;
382842
+ }
382843
+ getDescription() {
382844
+ return this.params.reason || "Initiating Plan Mode";
382845
+ }
382846
+ async shouldConfirmExecute(abortSignal) {
382847
+ const decision = await this.getMessageBusDecision(abortSignal);
382848
+ if (decision === "ALLOW") {
382849
+ return false;
382850
+ }
382851
+ if (decision === "DENY") {
382852
+ throw new Error(`Tool execution for "${this._toolDisplayName || this._toolName}" denied by policy.`);
382853
+ }
382854
+ return {
382855
+ type: "info",
382856
+ title: "Enter Plan Mode",
382857
+ prompt: "This will restrict the agent to read-only tools to allow for safe planning.",
382858
+ onConfirm: async (outcome) => {
382859
+ this.confirmationOutcome = outcome;
382860
+ await this.publishPolicyUpdate(outcome);
382861
+ }
382862
+ };
382863
+ }
382864
+ async execute(_signal) {
382865
+ if (this.confirmationOutcome === ToolConfirmationOutcome.Cancel) {
382866
+ return {
382867
+ llmContent: "User cancelled entering Plan Mode.",
382868
+ returnDisplay: "Cancelled"
382869
+ };
382870
+ }
382871
+ this.config.setApprovalMode(ApprovalMode.PLAN);
382872
+ return {
382873
+ llmContent: "Switching to Plan mode.",
382874
+ returnDisplay: this.params.reason ? `Switching to Plan mode: ${this.params.reason}` : "Switching to Plan mode"
382875
+ };
382876
+ }
382877
+ };
382878
+
382691
382879
  // packages/core/dist/src/core/client.js
382692
382880
  init_node();
382693
382881
 
@@ -384871,12 +385059,14 @@ var GeminiChat = class {
384871
385059
  lastError = null;
384872
385060
  return;
384873
385061
  }
385062
+ const isRetryable = isRetryableError(error2, this.config.getRetryFetchErrors());
384874
385063
  if (isConnectionPhase) {
384875
- throw error2;
385064
+ if (!isRetryable || signal.aborted) {
385065
+ throw error2;
385066
+ }
384876
385067
  }
384877
385068
  lastError = error2;
384878
385069
  const isContentError = error2 instanceof InvalidStreamError;
384879
- const isRetryable = isRetryableError(error2, this.config.getRetryFetchErrors());
384880
385070
  if (isContentError && isGemini2Model(model) || isRetryable && !signal.aborted) {
384881
385071
  if (attempt < maxAttempts - 1) {
384882
385072
  const delayMs = INVALID_CONTENT_RETRY_OPTIONS.initialDelayMs;
@@ -385465,7 +385655,7 @@ ${renderAgentSkills(options.agentSkills)}
385465
385655
 
385466
385656
  ${renderHookContext(options.hookContext)}
385467
385657
 
385468
- ${renderPrimaryWorkflows(options.primaryWorkflows)}
385658
+ ${options.planningWorkflow ? renderPlanningWorkflow(options.planningWorkflow) : renderPrimaryWorkflows(options.primaryWorkflows)}
385469
385659
 
385470
385660
  ${renderOperationalGuidelines(options.operationalGuidelines)}
385471
385661
 
@@ -385476,13 +385666,11 @@ ${renderGitRepo(options.gitRepo)}
385476
385666
  ${renderFinalReminder(options.finalReminder)}
385477
385667
  `.trim();
385478
385668
  }
385479
- function renderFinalShell(basePrompt, userMemory, planOptions) {
385669
+ function renderFinalShell(basePrompt, userMemory) {
385480
385670
  return `
385481
385671
  ${basePrompt.trim()}
385482
385672
 
385483
385673
  ${renderUserMemory(userMemory)}
385484
-
385485
- ${renderApprovalModePlan(planOptions)}
385486
385674
  `.trim();
385487
385675
  }
385488
385676
  function renderPreamble(options) {
@@ -385549,7 +385737,7 @@ function renderPrimaryWorkflows(options) {
385549
385737
  When requested to perform tasks like fixing bugs, adding features, refactoring, or explaining code, follow this sequence:
385550
385738
  ${workflowStepUnderstand(options)}
385551
385739
  ${workflowStepPlan(options)}
385552
- 3. **Implement:** Use the available tools (e.g., '${EDIT_TOOL_NAME}', '${WRITE_FILE_TOOL_NAME}' '${SHELL_TOOL_NAME}' ...) to act on the plan, strictly adhering to the project's established conventions (detailed under 'Core Mandates').
385740
+ 3. **Implement:** Use the available tools (e.g., '${EDIT_TOOL_NAME}', '${WRITE_FILE_TOOL_NAME}' '${SHELL_TOOL_NAME}' ...) to act on the plan. Strictly adhere to the project's established conventions (detailed under 'Core Mandates'). Before making manual code changes, check if an ecosystem tool (like 'eslint --fix', 'prettier --write', 'go fmt', 'cargo fmt') is available in the project to perform the task automatically.
385553
385741
  4. **Verify (Tests):** If applicable and feasible, verify the changes using the project's testing procedures. Identify the correct test commands and frameworks by examining 'README' files, build/package configuration (e.g., 'package.json'), or existing test execution patterns. NEVER assume standard test commands. When executing test commands, prefer "run once" or "CI" modes to ensure the command terminates after completion.
385554
385742
  5. **Verify (Standards):** VERY IMPORTANT: After making code changes, execute the project-specific build, linting and type-checking commands (e.g., 'tsc', 'npm run lint', 'ruff check .') that you have identified for this project (or obtained from the user). This ensures code quality and adherence to standards.${workflowVerifyStandardsSuffix(options.interactive)}
385555
385743
  6. **Finalize:** After all verification passes, consider the task complete. Do not remove or revert any changes or created files (like tests). Await the user's next instruction.
@@ -385558,7 +385746,7 @@ ${workflowStepPlan(options)}
385558
385746
 
385559
385747
  **Goal:** Autonomously implement and deliver a visually appealing, substantially complete, and functional prototype. Utilize all tools at your disposal to implement the application. Some tools you may especially find useful are '${WRITE_FILE_TOOL_NAME}', '${EDIT_TOOL_NAME}' and '${SHELL_TOOL_NAME}'.
385560
385748
 
385561
- ${newApplicationSteps(options.interactive)}
385749
+ ${newApplicationSteps(options)}
385562
385750
  `.trim();
385563
385751
  }
385564
385752
  function renderOperationalGuidelines(options) {
@@ -385643,7 +385831,7 @@ function renderUserMemory(memory) {
385643
385831
 
385644
385832
  ${memory.trim()}`;
385645
385833
  }
385646
- function renderApprovalModePlan(options) {
385834
+ function renderPlanningWorkflow(options) {
385647
385835
  if (!options)
385648
385836
  return "";
385649
385837
  return `
@@ -385655,6 +385843,7 @@ You are operating in **Plan Mode** - a structured planning workflow for designin
385655
385843
  The following read-only tools are available in Plan Mode:
385656
385844
  ${options.planModeToolsList}
385657
385845
  - \`${WRITE_FILE_TOOL_NAME}\` - Save plans to the plans directory (see Plan Storage below)
385846
+ - \`${EDIT_TOOL_NAME}\` - Update plans in the plans directory
385658
385847
 
385659
385848
  ## Plan Storage
385660
385849
  - Save your plans as Markdown (.md) files ONLY within: \`${options.plansDir}/\`
@@ -385679,7 +385868,10 @@ ${options.planModeToolsList}
385679
385868
  ### Phase 3: Design & Planning
385680
385869
  - Only begin this phase after exploration is complete
385681
385870
  - Create a detailed implementation plan with clear steps
385682
- - Include file paths, function signatures, and code snippets where helpful
385871
+ - The plan MUST include:
385872
+ - Iterative development steps (e.g., "Implement X, then verify with test Y")
385873
+ - Specific verification steps (unit tests, manual checks, build commands)
385874
+ - File paths, function signatures, and code snippets where helpful
385683
385875
  - Save the implementation plan to the designated plans directory
385684
385876
 
385685
385877
  ### Phase 4: Review & Approval
@@ -385687,11 +385879,22 @@ ${options.planModeToolsList}
385687
385879
  - If plan is approved, you can begin implementation
385688
385880
  - If plan is rejected, address the feedback and iterate on the plan
385689
385881
 
385882
+ ${renderApprovedPlanSection(options.approvedPlanPath)}
385883
+
385690
385884
  ## Constraints
385691
385885
  - You may ONLY use the read-only tools listed above
385692
385886
  - You MUST NOT modify source code, configs, or any files
385693
385887
  - If asked to modify code, explain you are in Plan Mode and suggest exiting Plan Mode to enable edits`.trim();
385694
385888
  }
385889
+ function renderApprovedPlanSection(approvedPlanPath) {
385890
+ if (!approvedPlanPath)
385891
+ return "";
385892
+ return `## Approved Plan
385893
+ An approved plan is available for this task.
385894
+ - **Iterate:** You should default to refining the existing approved plan.
385895
+ - **New Plan:** Only create a new plan file if the user explicitly asks for a "new plan" or if the current request is for a completely different feature or bug.
385896
+ `;
385897
+ }
385695
385898
  function mandateConfirm(interactive) {
385696
385899
  return interactive ? "**Confirm Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request without confirming with the user. If the user implies a change (e.g., reports a bug) without explicitly asking for a fix, **ask for confirmation first**. If asked *how* to do something, explain first, don't just do it." : "**Handle Ambiguity/Expansion:** Do not take significant actions beyond the clear scope of the request. If the user implies a change (e.g., reports a bug) without explicitly asking for a fix, do not perform it automatically.";
385697
385900
  }
@@ -385721,6 +385924,9 @@ function workflowStepUnderstand(options) {
385721
385924
  Use '${READ_FILE_TOOL_NAME}' to understand context and validate any assumptions you may have. If you need to read multiple files, you should make multiple parallel calls to '${READ_FILE_TOOL_NAME}'.`;
385722
385925
  }
385723
385926
  function workflowStepPlan(options) {
385927
+ if (options.approvedPlan) {
385928
+ return `2. **Plan:** An approved plan is available for this task. Use this file as a guide for your implementation. You MUST read this file before proceeding. If you discover new requirements or need to change the approach, confirm with the user and update this plan file to reflect the updated design decisions or discovered requirements.`;
385929
+ }
385724
385930
  if (options.enableCodebaseInvestigator && options.enableWriteTodosTool) {
385725
385931
  return `2. **Plan:** Build a coherent and grounded (based on the understanding in step 1) plan for how you intend to resolve the user's task. If the user's request implies a change but does not explicitly state it, **YOU MUST ASK** for confirmation before modifying code. If 'codebase_investigator' was used, do not ignore the output of the agent, you must use it as the foundation of your plan. For complex tasks, break them down into smaller, manageable subtasks and use the \`${WRITE_TODOS_TOOL_NAME}\` tool to track your progress. Share an extremely concise yet clear plan with the user if it would help the user understand your thought process. As part of the plan, you should use an iterative development process that includes writing unit tests to verify your changes. Use output logs or debug statements as part of this process to arrive at a solution.`;
385726
385932
  }
@@ -385735,11 +385941,20 @@ function workflowStepPlan(options) {
385735
385941
  function workflowVerifyStandardsSuffix(interactive) {
385736
385942
  return interactive ? " If unsure about these commands, you can ask the user if they'd like you to run them and if so how to." : "";
385737
385943
  }
385738
- function newApplicationSteps(interactive) {
385944
+ var NEW_APP_IMPLEMENTATION_GUIDANCE = `When starting ensure you scaffold the application using '${SHELL_TOOL_NAME}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.`;
385945
+ function newApplicationSteps(options) {
385946
+ const interactive = options.interactive;
385947
+ if (options.approvedPlan) {
385948
+ return `
385949
+ 1. **Understand:** Read the approved plan. Use this file as a guide for your implementation.
385950
+ 2. **Implement:** Implement the application according to the plan. ${NEW_APP_IMPLEMENTATION_GUIDANCE} If you discover new requirements or need to change the approach, confirm with the user and update this plan file to reflect the updated design decisions or discovered requirements.
385951
+ 3. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.
385952
+ 4. **Finish:** Provide a brief summary of what was built.`.trim();
385953
+ }
385739
385954
  if (interactive) {
385740
385955
  return `
385741
385956
  1. **Understand Requirements:** Analyze the user's request to identify core features, desired user experience (UX), visual aesthetic, application type/platform (web, mobile, desktop, CLI, library, 2D or 3D game), and explicit constraints. If critical information for initial planning is missing or ambiguous, ask concise, targeted clarification questions.
385742
- 2. **Propose Plan:** Formulate an internal development plan. Present a clear, concise, high-level summary to the user. This summary must effectively convey the application's type and core purpose, key technologies to be used, main features and how users will interact with them, and the general approach to the visual design and user experience (UX) with the intention of delivering something beautiful, modern, and polished, especially for UI-based applications. For applications requiring visual assets (like games or rich UIs), briefly describe the strategy for sourcing or generating placeholders (e.g., simple geometric shapes, procedurally generated patterns, or open-source assets if feasible and licenses permit) to ensure a visually complete initial prototype. Ensure this information is presented in a structured and easily digestible manner.
385957
+ 2. **Propose Plan:** Formulate an internal development plan. Present a clear, concise, high-level summary to the user. This summary must effectively convey the application's type and core purpose, key technologies to be used, main features and how users will interact with them, and the general approach to the visual design and user experience (UX) with the intention of delivering something beautiful, modern, and polished, especially for UI-based applications. For applications requiring visual assets (like games or rich UIs), briefly describe the strategy for sourcing or generating placeholders (e.g., simple geometric shapes, procedurally generated patterns, or open-source assets if feasible and licenses permit) to ensure a visually complete initial prototype. Ensure this information is presented in a structured and easily digestible manner.${planningPhaseSuggestion(options)}
385743
385958
  - When key technologies aren't specified, prefer the following:
385744
385959
  - **Websites (Frontend):** React (JavaScript/TypeScript) or Angular with Bootstrap CSS, incorporating Material Design principles for UI/UX.
385745
385960
  - **Back-End APIs:** Node.js with Express.js (JavaScript/TypeScript) or Python with FastAPI.
@@ -385749,7 +385964,7 @@ function newApplicationSteps(interactive) {
385749
385964
  - **3d Games:** HTML/CSS/JavaScript with Three.js.
385750
385965
  - **2d Games:** HTML/CSS/JavaScript.
385751
385966
  3. **User Approval:** Obtain user approval for the proposed plan.
385752
- 4. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. When starting ensure you scaffold the application using '${SHELL_TOOL_NAME}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.
385967
+ 4. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. ${NEW_APP_IMPLEMENTATION_GUIDANCE}
385753
385968
  5. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.
385754
385969
  6. **Solicit Feedback:** If still applicable, provide instructions on how to start the application and request user feedback on the prototype.`.trim();
385755
385970
  }
@@ -385764,12 +385979,20 @@ function newApplicationSteps(interactive) {
385764
385979
  - **Mobile App:** Compose Multiplatform (Kotlin Multiplatform) or Flutter (Dart) using Material Design libraries and principles, when sharing code between Android and iOS. Jetpack Compose (Kotlin JVM) with Material Design principles or SwiftUI (Swift) for native apps targeted at either Android or iOS, respectively.
385765
385980
  - **3d Games:** HTML/CSS/JavaScript with Three.js.
385766
385981
  - **2d Games:** HTML/CSS/JavaScript.
385767
- 3. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. When starting ensure you scaffold the application using '${SHELL_TOOL_NAME}' for commands like 'npm init', 'npx create-react-app'. Aim for full scope completion. Proactively create or source necessary placeholder assets (e.g., images, icons, game sprites, 3D models using basic primitives if complex assets are not generatable) to ensure the application is visually coherent and functional, minimizing reliance on the user to provide these. If the model can generate simple assets (e.g., a uniformly colored square sprite, a simple 3D cube), it should do so. Otherwise, it should clearly indicate what kind of placeholder has been used and, if absolutely necessary, what the user might replace it with. Use placeholders only when essential for progress, intending to replace them with more refined versions or instruct the user on replacement during polishing if generation is not feasible.
385982
+ 3. **Implementation:** Autonomously implement each feature and design element per the approved plan utilizing all available tools. ${NEW_APP_IMPLEMENTATION_GUIDANCE}
385768
385983
  4. **Verify:** Review work against the original request, the approved plan. Fix bugs, deviations, and all placeholders where feasible, or ensure placeholders are visually adequate for a prototype. Ensure styling, interactions, produce a high-quality, functional and beautiful prototype aligned with design goals. Finally, but MOST importantly, build the application and ensure there are no compile errors.`.trim();
385769
385984
  }
385985
+ function planningPhaseSuggestion(options) {
385986
+ if (options.enableEnterPlanModeTool) {
385987
+ return ` For complex tasks, consider using the '${ENTER_PLAN_MODE_TOOL_NAME}' tool to enter a dedicated planning phase before starting implementation.`;
385988
+ }
385989
+ return "";
385990
+ }
385770
385991
  function shellEfficiencyGuidelines(enabled) {
385771
385992
  if (!enabled)
385772
385993
  return "";
385994
+ const isWindows5 = process.platform === "win32";
385995
+ const inspectExample = isWindows5 ? "using commands like 'type' or 'findstr' (on CMD) and 'Get-Content' or 'Select-String' (on PowerShell)" : "using commands like 'grep', 'tail', 'head'";
385773
385996
  return `
385774
385997
  ## Shell tool output token efficiency:
385775
385998
 
@@ -385780,7 +386003,7 @@ IT IS CRITICAL TO FOLLOW THESE GUIDELINES TO AVOID EXCESSIVE TOKEN CONSUMPTION.
385780
386003
  - If a command is expected to produce a lot of output, use quiet or silent flags where available and appropriate.
385781
386004
  - Always consider the trade-off between output verbosity and the need for information. If a command's full output is essential for understanding the result, avoid overly aggressive quieting that might obscure important details.
385782
386005
  - If a command does not have quiet/silent flags or for commands with potentially long output that may not be useful, redirect stdout and stderr to temp files in the project's temporary directory. For example: 'command > <temp_dir>/out.log 2> <temp_dir>/err.log'.
385783
- - After the command runs, inspect the temp files (e.g. '<temp_dir>/out.log' and '<temp_dir>/err.log') using commands like 'grep', 'tail', 'head', ... (or platform equivalents). Remove the temp files when done.`;
386006
+ - After the command runs, inspect the temp files (e.g. '<temp_dir>/out.log' and '<temp_dir>/err.log') ${inspectExample}. Remove the temp files when done.`;
385784
386007
  }
385785
386008
  function toneAndStyleNoChitchat(isGemini3) {
385786
386009
  return isGemini3 ? `
@@ -385790,12 +386013,12 @@ function toneAndStyleNoChitchat(isGemini3) {
385790
386013
  function toolUsageInteractive(interactive) {
385791
386014
  if (interactive) {
385792
386015
  return `
385793
- - **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`. If unsure, ask the user.
385794
- - **Interactive Commands:** Always prefer non-interactive commands (e.g., using 'run once' or 'CI' flags for test runners to avoid persistent watch modes or 'git --no-pager') unless a persistent process is specifically required; however, some commands are only interactive and expect user input during their execution (e.g. ssh, vim). If you choose to execute an interactive command consider letting the user know they can press \`ctrl + f\` to focus into the shell to provide input.`;
386016
+ - **Background Processes:** To run a command in the background, set the \`is_background\` parameter to true. If unsure, ask the user.
386017
+ - **Interactive Commands:** Never use interactive shell commands unless absolutely necessary. **ALWAYS** use arguments to bypass prompts for **EVERY** tool in use that supports it, even if that command is part of a chain or larger command. For example: 'git --no-pager', 'vitest run', and 'npx --yes' to bypass interactive prompts.`;
385795
386018
  }
385796
386019
  return `
385797
- - **Background Processes:** Use background processes (via \`&\`) for commands that are unlikely to stop on their own, e.g. \`node server.js &\`.
385798
- - **Interactive Commands:** Only execute non-interactive commands. e.g.: use 'git --no-pager'`;
386020
+ - **Background Processes:** To run a command in the background, set the \`is_background\` parameter to true.
386021
+ - **Interactive Commands:** Never use interactive shell commands. **ALWAYS** use arguments to bypass prompts for **EVERY** tool in use that supports it, even if that command is part of a chain or larger command. For example: 'git --no-pager', 'vitest run', and 'npx --yes' to bypass interactive prompts.`;
385799
386022
  }
385800
386023
  function toolUsageRememberingFacts(options) {
385801
386024
  const base = `
@@ -385947,6 +386170,7 @@ var CodebaseInvestigationReportSchema = external_exports.object({
385947
386170
  });
385948
386171
  var CodebaseInvestigatorAgent = (config3) => {
385949
386172
  const model = isPreviewModel(config3.getModel()) ? PREVIEW_GEMINI_FLASH_MODEL : DEFAULT_GEMINI_MODEL;
386173
+ const listCommand = process.platform === "win32" ? "`dir /s` (CMD) or `Get-ChildItem -Recurse` (PowerShell)" : "`ls -R`";
385950
386174
  return {
385951
386175
  name: "codebase_investigator",
385952
386176
  kind: "local",
@@ -386047,7 +386271,7 @@ When you are finished, you **MUST** call the \`complete_task\` tool. The \`repor
386047
386271
  "ExplorationTrace": [
386048
386272
  "Used \`grep\` to search for \`updateUser\` to locate the primary function.",
386049
386273
  "Read the file \`src/controllers/userController.js\` to understand the function's logic.",
386050
- "Used \`ls -R\` to look for related files, such as services or database models.",
386274
+ "Used ${listCommand} to look for related files, such as services or database models.",
386051
386275
  "Read \`src/services/userService.js\` and \`src/models/User.js\` to understand the data flow and how state is managed."
386052
386276
  ],
386053
386277
  "RelevantLocations": [
@@ -386082,12 +386306,20 @@ var PromptProvider = class {
386082
386306
  const isPlanMode = approvalMode === ApprovalMode.PLAN;
386083
386307
  const skills = config3.getSkillManager().getSkills();
386084
386308
  const toolNames = config3.getToolRegistry().getAllToolNames();
386309
+ const enabledToolNames = new Set(toolNames);
386310
+ const approvedPlanPath = config3.getApprovedPlanPath();
386085
386311
  const desiredModel = resolveModel(config3.getActiveModel(), config3.getPreviewFeatures());
386086
386312
  const isGemini3 = isPreviewModel(desiredModel);
386087
- const planOptions = isPlanMode ? {
386088
- planModeToolsList: PLAN_MODE_TOOLS.filter((t3) => new Set(toolNames).has(t3)).map((t3) => `- \`${t3}\``).join("\n"),
386089
- plansDir: config3.storage.getProjectTempPlansDir()
386090
- } : void 0;
386313
+ let planModeToolsList = PLAN_MODE_TOOLS.filter((t3) => enabledToolNames.has(t3)).map((t3) => `- \`${t3}\``).join("\n");
386314
+ if (isPlanMode) {
386315
+ const allTools = config3.getToolRegistry().getAllTools();
386316
+ const readOnlyMcpTools = allTools.filter((t3) => t3 instanceof DiscoveredMCPTool && !!t3.isReadOnly);
386317
+ if (readOnlyMcpTools.length > 0) {
386318
+ const mcpToolsList = readOnlyMcpTools.map((t3) => `- \`${t3.name}\` (${t3.serverName})`).join("\n");
386319
+ planModeToolsList += `
386320
+ ${mcpToolsList}`;
386321
+ }
386322
+ }
386091
386323
  let basePrompt;
386092
386324
  if (systemMdResolution.value && !systemMdResolution.isDisabled) {
386093
386325
  let systemMdPath = path60.resolve(path60.join(GEMINI_DIR, "system.md"));
@@ -386123,9 +386355,16 @@ var PromptProvider = class {
386123
386355
  hookContext: isSectionEnabled("hookContext") || void 0,
386124
386356
  primaryWorkflows: this.withSection("primaryWorkflows", () => ({
386125
386357
  interactive: interactiveMode,
386126
- enableCodebaseInvestigator: toolNames.includes(CodebaseInvestigatorAgent.name),
386127
- enableWriteTodosTool: toolNames.includes(WRITE_TODOS_TOOL_NAME)
386358
+ enableCodebaseInvestigator: enabledToolNames.has(CodebaseInvestigatorAgent.name),
386359
+ enableWriteTodosTool: enabledToolNames.has(WRITE_TODOS_TOOL_NAME),
386360
+ enableEnterPlanModeTool: enabledToolNames.has(ENTER_PLAN_MODE_TOOL_NAME),
386361
+ approvedPlan: approvedPlanPath ? { path: approvedPlanPath } : void 0
386128
386362
  }), !isPlanMode),
386363
+ planningWorkflow: this.withSection("planningWorkflow", () => ({
386364
+ planModeToolsList,
386365
+ plansDir: config3.storage.getProjectTempPlansDir(),
386366
+ approvedPlanPath: config3.getApprovedPlanPath()
386367
+ }), isPlanMode),
386129
386368
  operationalGuidelines: this.withSection("operationalGuidelines", () => ({
386130
386369
  interactive: interactiveMode,
386131
386370
  isGemini3,
@@ -386139,7 +386378,7 @@ var PromptProvider = class {
386139
386378
  };
386140
386379
  basePrompt = getCoreSystemPrompt(options);
386141
386380
  }
386142
- const finalPrompt = renderFinalShell(basePrompt, userMemory, planOptions);
386381
+ const finalPrompt = renderFinalShell(basePrompt, userMemory);
386143
386382
  const sanitizedPrompt = finalPrompt.replace(/\n{3,}/g, "\n\n");
386144
386383
  this.maybeWriteSystemMd(sanitizedPrompt, systemMdResolution, path60.resolve(path60.join(GEMINI_DIR, "system.md")));
386145
386384
  return sanitizedPrompt;
@@ -394157,7 +394396,7 @@ var HookRegistry = class {
394157
394396
  async initialize() {
394158
394397
  this.entries = [];
394159
394398
  this.processHooksFromConfig();
394160
- debugLogger.log(`Hook registry initialized with ${this.entries.length} hook entries`);
394399
+ debugLogger.debug(`Hook registry initialized with ${this.entries.length} hook entries`);
394161
394400
  }
394162
394401
  /**
394163
394402
  * Get all hook entries for a specific event
@@ -398087,6 +398326,22 @@ var jsYaml = {
398087
398326
  import * as fs58 from "node:fs/promises";
398088
398327
  import * as path67 from "node:path";
398089
398328
  import * as crypto21 from "node:crypto";
398329
+
398330
+ // packages/core/dist/src/agents/types.js
398331
+ var AgentTerminateMode;
398332
+ (function(AgentTerminateMode2) {
398333
+ AgentTerminateMode2["ERROR"] = "ERROR";
398334
+ AgentTerminateMode2["TIMEOUT"] = "TIMEOUT";
398335
+ AgentTerminateMode2["GOAL"] = "GOAL";
398336
+ AgentTerminateMode2["MAX_TURNS"] = "MAX_TURNS";
398337
+ AgentTerminateMode2["ABORTED"] = "ABORTED";
398338
+ AgentTerminateMode2["ERROR_NO_COMPLETE_TASK_CALL"] = "ERROR_NO_COMPLETE_TASK_CALL";
398339
+ })(AgentTerminateMode || (AgentTerminateMode = {}));
398340
+ var DEFAULT_QUERY_STRING = "Get Started!";
398341
+ var DEFAULT_MAX_TURNS = 15;
398342
+ var DEFAULT_MAX_TIME_MINUTES = 5;
398343
+
398344
+ // packages/core/dist/src/agents/agentLoader.js
398090
398345
  init_tool_names();
398091
398346
 
398092
398347
  // packages/core/dist/src/skills/skillLoader.js
@@ -398149,10 +398404,12 @@ async function loadSkillsFromDir(dir) {
398149
398404
  if (!stats || !stats.isDirectory()) {
398150
398405
  return [];
398151
398406
  }
398152
- const skillFiles = await glob(["SKILL.md", "*/SKILL.md"], {
398407
+ const pattern = ["SKILL.md", "*/SKILL.md"];
398408
+ const skillFiles = await glob(pattern, {
398153
398409
  cwd: absoluteSearchPath,
398154
398410
  absolute: true,
398155
- nodir: true
398411
+ nodir: true,
398412
+ ignore: ["**/node_modules/**", "**/.git/**"]
398156
398413
  });
398157
398414
  for (const skillFile of skillFiles) {
398158
398415
  const metadata2 = await loadSkillFromFile(skillFile);
@@ -398182,8 +398439,9 @@ async function loadSkillFromFile(filePath) {
398182
398439
  if (!frontmatter) {
398183
398440
  return null;
398184
398441
  }
398442
+ const sanitizedName = frontmatter.name.replace(/[:\\/<>*?"|]/g, "-");
398185
398443
  return {
398186
- name: frontmatter.name,
398444
+ name: sanitizedName,
398187
398445
  description: frontmatter.description,
398188
398446
  location: filePath,
398189
398447
  body: match2[2]?.trim() ?? ""
@@ -398343,8 +398601,8 @@ function markdownToAgentDefinition(markdown, metadata2) {
398343
398601
  }
398344
398602
  },
398345
398603
  runConfig: {
398346
- maxTurns: markdown.max_turns,
398347
- maxTimeMinutes: markdown.timeout_mins || 5
398604
+ maxTurns: markdown.max_turns ?? DEFAULT_MAX_TURNS,
398605
+ maxTimeMinutes: markdown.timeout_mins ?? DEFAULT_MAX_TIME_MINUTES
398348
398606
  },
398349
398607
  toolConfig: markdown.tools ? {
398350
398608
  tools: markdown.tools
@@ -399865,18 +400123,6 @@ var A2AClientManager = class _A2AClientManager {
399865
400123
  // packages/core/dist/src/agents/remote-invocation.js
399866
400124
  init_tools();
399867
400125
 
399868
- // packages/core/dist/src/agents/types.js
399869
- var AgentTerminateMode;
399870
- (function(AgentTerminateMode2) {
399871
- AgentTerminateMode2["ERROR"] = "ERROR";
399872
- AgentTerminateMode2["TIMEOUT"] = "TIMEOUT";
399873
- AgentTerminateMode2["GOAL"] = "GOAL";
399874
- AgentTerminateMode2["MAX_TURNS"] = "MAX_TURNS";
399875
- AgentTerminateMode2["ABORTED"] = "ABORTED";
399876
- AgentTerminateMode2["ERROR_NO_COMPLETE_TASK_CALL"] = "ERROR_NO_COMPLETE_TASK_CALL";
399877
- })(AgentTerminateMode || (AgentTerminateMode = {}));
399878
- var DEFAULT_QUERY_STRING = "Get Started!";
399879
-
399880
400126
  // packages/core/dist/src/agents/a2aUtils.js
399881
400127
  function extractMessageText(message) {
399882
400128
  if (!message) {
@@ -400795,9 +401041,10 @@ var SchedulerStateManager = class {
400795
401041
  // packages/core/dist/src/scheduler/confirmation.js
400796
401042
  init_types();
400797
401043
  init_tools();
400798
- init_debugLogger();
400799
401044
  import { on as on6 } from "node:events";
400800
401045
  import { randomUUID as randomUUID8 } from "node:crypto";
401046
+ init_debugLogger();
401047
+ init_events();
400801
401048
  async function awaitConfirmation(messageBus, correlationId, signal) {
400802
401049
  if (signal.aborted) {
400803
401050
  throw new Error("Operation cancelled");
@@ -400854,7 +401101,10 @@ async function resolveConfirmation(toolCall, signal, deps) {
400854
401101
  await details.onConfirm(outcome, response.payload);
400855
401102
  }
400856
401103
  if (outcome === ToolConfirmationOutcome.ModifyWithEditor) {
400857
- await handleExternalModification(deps, toolCall, signal);
401104
+ const modResult = await handleExternalModification(deps, toolCall, signal);
401105
+ if (modResult.error) {
401106
+ coreEvents.emitFeedback("error", modResult.error);
401107
+ }
400858
401108
  } else if (response.payload && "newContent" in response.payload) {
400859
401109
  await handleInlineModification(deps, toolCall, response.payload, signal);
400860
401110
  outcome = ToolConfirmationOutcome.ProceedOnce;
@@ -400875,14 +401125,17 @@ async function notifyHooks(deps, details) {
400875
401125
  }
400876
401126
  async function handleExternalModification(deps, toolCall, signal) {
400877
401127
  const { state, modifier, getPreferredEditor } = deps;
400878
- const editor = getPreferredEditor();
400879
- if (!editor)
400880
- return;
401128
+ const preferredEditor = getPreferredEditor();
401129
+ const editor = await resolveEditorAsync(preferredEditor, signal);
401130
+ if (!editor) {
401131
+ return { error: NO_EDITOR_AVAILABLE_ERROR };
401132
+ }
400881
401133
  const result2 = await modifier.handleModifyWithEditor(state.firstActiveCall, editor, signal);
400882
401134
  if (result2) {
400883
401135
  const newInvocation = toolCall.tool.build(result2.updatedParams);
400884
401136
  state.updateArgs(toolCall.request.callId, result2.updatedParams, newInvocation);
400885
401137
  }
401138
+ return {};
400886
401139
  }
400887
401140
  async function handleInlineModification(deps, toolCall, payload, signal) {
400888
401141
  const { state, modifier } = deps;
@@ -401463,7 +401716,8 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
401463
401716
  let turnCounter = 0;
401464
401717
  let terminateReason = AgentTerminateMode.ERROR;
401465
401718
  let finalResult = null;
401466
- const { maxTimeMinutes } = this.definition.runConfig;
401719
+ const maxTimeMinutes = this.definition.runConfig.maxTimeMinutes ?? DEFAULT_MAX_TIME_MINUTES;
401720
+ const maxTurns = this.definition.runConfig.maxTurns ?? DEFAULT_MAX_TURNS;
401467
401721
  const timeoutController = new AbortController();
401468
401722
  const timeoutId = setTimeout(() => timeoutController.abort(new Error("Agent timed out.")), maxTimeMinutes * 60 * 1e3);
401469
401723
  const combinedSignal = AbortSignal.any([signal, timeoutController.signal]);
@@ -401482,7 +401736,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
401482
401736
  const query = this.definition.promptConfig.query ? templateString(this.definition.promptConfig.query, augmentedInputs) : DEFAULT_QUERY_STRING;
401483
401737
  let currentMessage = { role: "user", parts: [{ text: query }] };
401484
401738
  while (true) {
401485
- const reason = this.checkTermination(startTime, turnCounter);
401739
+ const reason = this.checkTermination(turnCounter, maxTurns);
401486
401740
  if (reason) {
401487
401741
  terminateReason = reason;
401488
401742
  break;
@@ -401514,13 +401768,13 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
401514
401768
  finalResult = recoveryResult;
401515
401769
  } else {
401516
401770
  if (terminateReason === AgentTerminateMode.TIMEOUT) {
401517
- finalResult = `Agent timed out after ${this.definition.runConfig.maxTimeMinutes} minutes.`;
401771
+ finalResult = `Agent timed out after ${maxTimeMinutes} minutes.`;
401518
401772
  this.emitActivity("ERROR", {
401519
401773
  error: finalResult,
401520
401774
  context: "timeout"
401521
401775
  });
401522
401776
  } else if (terminateReason === AgentTerminateMode.MAX_TURNS) {
401523
- finalResult = `Agent reached max turns limit (${this.definition.runConfig.maxTurns}).`;
401777
+ finalResult = `Agent reached max turns limit (${maxTurns}).`;
401524
401778
  this.emitActivity("ERROR", {
401525
401779
  error: finalResult,
401526
401780
  context: "max_turns"
@@ -401564,7 +401818,7 @@ var LocalAgentExecutor = class _LocalAgentExecutor {
401564
401818
  };
401565
401819
  }
401566
401820
  }
401567
- finalResult = `Agent timed out after ${this.definition.runConfig.maxTimeMinutes} minutes.`;
401821
+ finalResult = `Agent timed out after ${maxTimeMinutes} minutes.`;
401568
401822
  this.emitActivity("ERROR", {
401569
401823
  error: finalResult,
401570
401824
  context: "timeout"
@@ -401973,9 +402227,8 @@ Important Rules:
401973
402227
  *
401974
402228
  * @returns The reason for termination, or `null` if execution can continue.
401975
402229
  */
401976
- checkTermination(startTime, turnCounter) {
401977
- const { runConfig } = this.definition;
401978
- if (runConfig.maxTurns && turnCounter >= runConfig.maxTurns) {
402230
+ checkTermination(turnCounter, maxTurns) {
402231
+ if (turnCounter >= maxTurns) {
401979
402232
  return AgentTerminateMode.MAX_TURNS;
401980
402233
  }
401981
402234
  return null;
@@ -402167,9 +402420,6 @@ var SubAgentInvocation = class extends BaseToolInvocation {
402167
402420
  return `Delegating to agent '${this.definition.name}'`;
402168
402421
  }
402169
402422
  async shouldConfirmExecute(abortSignal) {
402170
- if (this.definition.kind !== "remote") {
402171
- return false;
402172
- }
402173
402423
  const invocation = this.buildSubInvocation(this.definition, this.params);
402174
402424
  return invocation.shouldConfirmExecute(abortSignal);
402175
402425
  }
@@ -403191,6 +403441,7 @@ var SSEClientTransport = class {
403191
403441
  };
403192
403442
 
403193
403443
  // packages/core/dist/src/tools/mcp-client.js
403444
+ init_types2();
403194
403445
  var import_shell_quote3 = __toESM(require_shell_quote(), 1);
403195
403446
 
403196
403447
  // packages/core/dist/src/mcp/google-auth-provider.js
@@ -404550,10 +404801,12 @@ var McpClient = class {
404550
404801
  }
404551
404802
  this.updateStatus(MCPServerStatus.CONNECTING);
404552
404803
  try {
404553
- this.client = await connectToMcpServer(this.clientVersion, this.serverName, this.serverConfig, this.debugMode, this.workspaceContext, this.cliConfig.sanitizationConfig);
404804
+ const { client, transport } = await connectToMcpServer(this.clientVersion, this.serverName, this.serverConfig, this.debugMode, this.workspaceContext, this.cliConfig.sanitizationConfig);
404805
+ this.client = client;
404806
+ this.transport = transport;
404554
404807
  this.registerNotificationHandlers();
404555
404808
  const originalOnError = this.client.onerror;
404556
- this.client.onerror = (error2) => {
404809
+ this.client.onerror = async (error2) => {
404557
404810
  if (this.status !== MCPServerStatus.CONNECTED) {
404558
404811
  return;
404559
404812
  }
@@ -404561,6 +404814,12 @@ var McpClient = class {
404561
404814
  originalOnError(error2);
404562
404815
  coreEvents.emitFeedback("error", `MCP ERROR (${this.serverName})`, error2);
404563
404816
  this.updateStatus(MCPServerStatus.DISCONNECTED);
404817
+ if (this.transport) {
404818
+ try {
404819
+ await this.transport.close();
404820
+ } catch {
404821
+ }
404822
+ }
404564
404823
  };
404565
404824
  this.updateStatus(MCPServerStatus.CONNECTED);
404566
404825
  } catch (error2) {
@@ -404951,7 +405210,18 @@ async function discoverTools(mcpServerName, mcpServerConfig, mcpClient, cliConfi
404951
405210
  continue;
404952
405211
  }
404953
405212
  const mcpCallableTool = new McpCallableTool2(mcpClient, toolDef, mcpServerConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC);
404954
- const tool = new DiscoveredMCPTool(mcpCallableTool, mcpServerName, toolDef.name, toolDef.description ?? "", toolDef.inputSchema ?? { type: "object", properties: {} }, messageBus, mcpServerConfig.trust, void 0, cliConfig, mcpServerConfig.extension?.name, mcpServerConfig.extension?.id);
405213
+ const isReadOnly = toolDef.annotations?.readOnlyHint === true;
405214
+ const tool = new DiscoveredMCPTool(mcpCallableTool, mcpServerName, toolDef.name, toolDef.description ?? "", toolDef.inputSchema ?? { type: "object", properties: {} }, messageBus, mcpServerConfig.trust, isReadOnly, void 0, cliConfig, mcpServerConfig.extension?.name, mcpServerConfig.extension?.id);
405215
+ if (isReadOnly) {
405216
+ cliConfig.getPolicyEngine().addRule({
405217
+ toolName: tool.getFullyQualifiedName(),
405218
+ decision: PolicyDecision.ASK_USER,
405219
+ priority: 50,
405220
+ // Match priority of built-in plan tools
405221
+ modes: [ApprovalMode.PLAN],
405222
+ source: `MCP Annotation (readOnlyHint) - ${mcpServerName}`
405223
+ });
405224
+ }
404955
405225
  discoveredTools.push(tool);
404956
405226
  } catch (error2) {
404957
405227
  coreEvents.emitFeedback("error", `Error discovering tool: '${toolDef.name}' from MCP server '${mcpServerName}': ${error2.message}`, error2);
@@ -405116,6 +405386,7 @@ async function connectWithSSETransport(client, config3, accessToken) {
405116
405386
  await client.connect(transport, {
405117
405387
  timeout: config3.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC
405118
405388
  });
405389
+ return transport;
405119
405390
  }
405120
405391
  async function showAuthRequiredMessage(serverName) {
405121
405392
  const hasRejectedToken = !!await getStoredOAuthToken(serverName);
@@ -405126,9 +405397,9 @@ async function showAuthRequiredMessage(serverName) {
405126
405397
  async function retryWithOAuth(client, serverName, config3, accessToken, httpReturned404) {
405127
405398
  if (httpReturned404) {
405128
405399
  debugLogger.log(`Retrying SSE connection to '${serverName}' with OAuth token...`);
405129
- await connectWithSSETransport(client, config3, accessToken);
405400
+ const transport = await connectWithSSETransport(client, config3, accessToken);
405130
405401
  debugLogger.log(`Successfully connected to '${serverName}' using SSE with OAuth.`);
405131
- return;
405402
+ return transport;
405132
405403
  }
405133
405404
  debugLogger.log(`Retrying connection to '${serverName}' with OAuth token...`);
405134
405405
  const httpTransport = await createTransportWithOAuth(serverName, config3, accessToken);
@@ -405140,12 +405411,14 @@ async function retryWithOAuth(client, serverName, config3, accessToken, httpRetu
405140
405411
  timeout: config3.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC
405141
405412
  });
405142
405413
  debugLogger.log(`Successfully connected to '${serverName}' using HTTP with OAuth.`);
405414
+ return httpTransport;
405143
405415
  } catch (httpError) {
405144
405416
  await httpTransport.close();
405145
405417
  if (String(httpError).includes("404") && config3.url && !config3.type && !config3.httpUrl) {
405146
405418
  debugLogger.log(`HTTP with OAuth returned 404, trying SSE with OAuth...`);
405147
- await connectWithSSETransport(client, config3, accessToken);
405419
+ const sseTransport = await connectWithSSETransport(client, config3, accessToken);
405148
405420
  debugLogger.log(`Successfully connected to '${serverName}' using SSE with OAuth.`);
405421
+ return sseTransport;
405149
405422
  } else {
405150
405423
  throw httpError;
405151
405424
  }
@@ -405201,7 +405474,7 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
405201
405474
  await mcpClient.connect(transport, {
405202
405475
  timeout: mcpServerConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC
405203
405476
  });
405204
- return mcpClient;
405477
+ return { client: mcpClient, transport };
405205
405478
  } catch (error2) {
405206
405479
  await transport.close();
405207
405480
  firstAttemptError = error2;
@@ -405218,9 +405491,9 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
405218
405491
  const logMessage = httpReturned404 ? `HTTP returned 404, trying SSE transport...` : `HTTP connection failed, attempting SSE fallback...`;
405219
405492
  debugLogger.log(`MCP server '${mcpServerName}': ${logMessage}`);
405220
405493
  try {
405221
- await connectWithSSETransport(mcpClient, mcpServerConfig, await getStoredOAuthToken(mcpServerName));
405494
+ const sseTransport = await connectWithSSETransport(mcpClient, mcpServerConfig, await getStoredOAuthToken(mcpServerName));
405222
405495
  debugLogger.log(`MCP server '${mcpServerName}': Successfully connected using SSE transport.`);
405223
- return mcpClient;
405496
+ return { client: mcpClient, transport: sseTransport };
405224
405497
  } catch (sseFallbackError) {
405225
405498
  sseError = sseFallbackError;
405226
405499
  if (isAuthenticationError(sseError)) {
@@ -405281,8 +405554,8 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
405281
405554
  if (!accessToken) {
405282
405555
  throw new Error(`Failed to get OAuth token for server '${mcpServerName}'`);
405283
405556
  }
405284
- await retryWithOAuth(mcpClient, mcpServerName, mcpServerConfig, accessToken, httpReturned404);
405285
- return mcpClient;
405557
+ const oauthTransport = await retryWithOAuth(mcpClient, mcpServerName, mcpServerConfig, accessToken, httpReturned404);
405558
+ return { client: mcpClient, transport: oauthTransport };
405286
405559
  } else {
405287
405560
  throw new Error(`Failed to handle automatic OAuth for server '${mcpServerName}'`);
405288
405561
  }
@@ -405319,7 +405592,7 @@ async function connectToMcpServer(clientVersion, mcpServerName, mcpServerConfig,
405319
405592
  await mcpClient.connect(oauthTransport, {
405320
405593
  timeout: mcpServerConfig.timeout ?? MCP_DEFAULT_TIMEOUT_MSEC
405321
405594
  });
405322
- return mcpClient;
405595
+ return { client: mcpClient, transport: oauthTransport };
405323
405596
  } else {
405324
405597
  throw new Error(`OAuth configuration failed for '${mcpServerName}'. Please authenticate manually with /mcp auth ${mcpServerName}`);
405325
405598
  }
@@ -405760,6 +406033,7 @@ ${clientInstructions}
405760
406033
  };
405761
406034
 
405762
406035
  // packages/core/dist/src/config/config.js
406036
+ init_tool_names();
405763
406037
  var DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD = 4e6;
405764
406038
  var DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES = 1e3;
405765
406039
  var AuthProviderType;
@@ -405902,9 +406176,11 @@ var Config = class {
405902
406176
  remoteAdminSettings;
405903
406177
  latestApiRequest;
405904
406178
  lastModeSwitchTime = Date.now();
406179
+ approvedPlanPath;
405905
406180
  constructor(params) {
405906
406181
  this.sessionId = params.sessionId;
405907
406182
  this.clientVersion = params.clientVersion ?? "unknown";
406183
+ this.approvedPlanPath = void 0;
405908
406184
  this.embeddingModel = params.embeddingModel ?? DEFAULT_GEMINI_EMBEDDING_MODEL;
405909
406185
  this.fileSystemService = new StandardFileSystemService();
405910
406186
  this.sandbox = params.sandbox;
@@ -406138,6 +406414,7 @@ var Config = class {
406138
406414
  await this.contextManager.refresh();
406139
406415
  }
406140
406416
  await this.geminiClient.initialize();
406417
+ this.syncPlanModeTools();
406141
406418
  }
406142
406419
  getContentGenerator() {
406143
406420
  return this.contentGenerator;
@@ -406193,7 +406470,7 @@ var Config = class {
406193
406470
  return this.contentGenerator?.userTier;
406194
406471
  }
406195
406472
  getUserTierName() {
406196
- return void 0;
406473
+ return this.contentGenerator?.userTierName;
406197
406474
  }
406198
406475
  /**
406199
406476
  * Provides access to the BaseLlmClient for stateless LLM operations.
@@ -406524,9 +406801,37 @@ var Config = class {
406524
406801
  this.policyEngine.setApprovalMode(mode);
406525
406802
  const isPlanModeTransition = currentMode !== mode && (currentMode === ApprovalMode.PLAN || mode === ApprovalMode.PLAN);
406526
406803
  if (isPlanModeTransition) {
406804
+ this.syncPlanModeTools();
406527
406805
  this.updateSystemInstructionIfInitialized();
406528
406806
  }
406529
406807
  }
406808
+ /**
406809
+ * Synchronizes enter/exit plan mode tools based on current mode.
406810
+ */
406811
+ syncPlanModeTools() {
406812
+ const isPlanMode = this.getApprovalMode() === ApprovalMode.PLAN;
406813
+ const registry2 = this.getToolRegistry();
406814
+ if (isPlanMode) {
406815
+ if (registry2.getTool(ENTER_PLAN_MODE_TOOL_NAME)) {
406816
+ registry2.unregisterTool(ENTER_PLAN_MODE_TOOL_NAME);
406817
+ }
406818
+ if (!registry2.getTool(EXIT_PLAN_MODE_TOOL_NAME)) {
406819
+ registry2.registerTool(new ExitPlanModeTool(this, this.messageBus));
406820
+ }
406821
+ } else {
406822
+ if (registry2.getTool(EXIT_PLAN_MODE_TOOL_NAME)) {
406823
+ registry2.unregisterTool(EXIT_PLAN_MODE_TOOL_NAME);
406824
+ }
406825
+ if (!registry2.getTool(ENTER_PLAN_MODE_TOOL_NAME)) {
406826
+ registry2.registerTool(new EnterPlanModeTool(this, this.messageBus));
406827
+ }
406828
+ }
406829
+ if (this.geminiClient?.isInitialized()) {
406830
+ this.geminiClient.setTools().catch((err2) => {
406831
+ debugLogger.error("Failed to update tools", err2);
406832
+ });
406833
+ }
406834
+ }
406530
406835
  /**
406531
406836
  * Logs the duration of the current approval mode.
406532
406837
  */
@@ -406691,6 +406996,12 @@ var Config = class {
406691
406996
  isPlanEnabled() {
406692
406997
  return this.planEnabled;
406693
406998
  }
406999
+ getApprovedPlanPath() {
407000
+ return this.approvedPlanPath;
407001
+ }
407002
+ setApprovedPlanPath(path82) {
407003
+ this.approvedPlanPath = path82;
407004
+ }
406694
407005
  isAgentsEnabled() {
406695
407006
  return this.enableAgents;
406696
407007
  }
@@ -407011,6 +407322,7 @@ var Config = class {
407011
407322
  }
407012
407323
  if (this.isPlanEnabled()) {
407013
407324
  registerCoreTool(ExitPlanModeTool, this);
407325
+ registerCoreTool(EnterPlanModeTool, this);
407014
407326
  }
407015
407327
  this.registerSubAgentTools(registry2);
407016
407328
  await registry2.discoverAllTools();