@adhdev/daemon-standalone 0.9.76-rc.42 → 0.9.76-rc.43

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.
@@ -20690,7 +20690,7 @@ var init_acp = __esm({
20690
20690
  }
20691
20691
  });
20692
20692
 
20693
- // ../daemon-core/node_modules/readdirp/index.js
20693
+ // ../../node_modules/readdirp/esm/index.js
20694
20694
  function readdirp(root, options = {}) {
20695
20695
  let type2 = options.entryType || options.type;
20696
20696
  if (type2 === "both")
@@ -20707,13 +20707,13 @@ function readdirp(root, options = {}) {
20707
20707
  options.root = root;
20708
20708
  return new ReaddirpStream(options);
20709
20709
  }
20710
- var import_promises, import_node_path, import_node_stream, EntryTypes, defaultOptions, RECURSIVE_ERROR_CODE, NORMAL_FLOW_ERRORS, ALL_TYPES, DIR_TYPES, FILE_TYPES, isNormalFlowError, wantBigintFsStats, emptyFn, normalizeFilter, ReaddirpStream;
20711
- var init_readdirp = __esm({
20712
- "../daemon-core/node_modules/readdirp/index.js"() {
20710
+ var import_promises, import_node_stream, import_node_path, EntryTypes, defaultOptions, RECURSIVE_ERROR_CODE, NORMAL_FLOW_ERRORS, ALL_TYPES, DIR_TYPES, FILE_TYPES, isNormalFlowError, wantBigintFsStats, emptyFn, normalizeFilter, ReaddirpStream;
20711
+ var init_esm = __esm({
20712
+ "../../node_modules/readdirp/esm/index.js"() {
20713
20713
  "use strict";
20714
20714
  import_promises = require("fs/promises");
20715
- import_node_path = require("path");
20716
20715
  import_node_stream = require("stream");
20716
+ import_node_path = require("path");
20717
20717
  EntryTypes = {
20718
20718
  FILE_TYPE: "files",
20719
20719
  DIR_TYPE: "directories",
@@ -20768,20 +20768,6 @@ var init_readdirp = __esm({
20768
20768
  return emptyFn;
20769
20769
  };
20770
20770
  ReaddirpStream = class extends import_node_stream.Readable {
20771
- parents;
20772
- reading;
20773
- parent;
20774
- _stat;
20775
- _maxDepth;
20776
- _wantsDir;
20777
- _wantsFile;
20778
- _wantsEverything;
20779
- _root;
20780
- _isDirent;
20781
- _statsProp;
20782
- _rdOptions;
20783
- _fileFilter;
20784
- _directoryFilter;
20785
20771
  constructor(options = {}) {
20786
20772
  super({
20787
20773
  objectMode: true,
@@ -20798,7 +20784,7 @@ var init_readdirp = __esm({
20798
20784
  } else {
20799
20785
  this._stat = statMethod;
20800
20786
  }
20801
- this._maxDepth = opts.depth != null && Number.isSafeInteger(opts.depth) ? opts.depth : defaultOptions.depth;
20787
+ this._maxDepth = opts.depth ?? defaultOptions.depth;
20802
20788
  this._wantsDir = type2 ? DIR_TYPES.has(type2) : false;
20803
20789
  this._wantsFile = type2 ? FILE_TYPES.has(type2) : false;
20804
20790
  this._wantsEverything = type2 === EntryTypes.EVERYTHING_TYPE;
@@ -20929,17 +20915,17 @@ var init_readdirp = __esm({
20929
20915
  }
20930
20916
  });
20931
20917
 
20932
- // ../daemon-core/node_modules/chokidar/handler.js
20918
+ // ../../node_modules/chokidar/esm/handler.js
20933
20919
  function createFsWatchInstance(path27, options, listener, errHandler, emitRaw) {
20934
20920
  const handleEvent = (rawEvent, evPath) => {
20935
20921
  listener(path27);
20936
20922
  emitRaw(rawEvent, evPath, { watchedPath: path27 });
20937
20923
  if (evPath && path27 !== evPath) {
20938
- fsWatchBroadcast(sp.resolve(path27, evPath), KEY_LISTENERS, sp.join(path27, evPath));
20924
+ fsWatchBroadcast(sysPath.resolve(path27, evPath), KEY_LISTENERS, sysPath.join(path27, evPath));
20939
20925
  }
20940
20926
  };
20941
20927
  try {
20942
- return (0, import_node_fs.watch)(path27, {
20928
+ return (0, import_fs.watch)(path27, {
20943
20929
  persistent: options.persistent
20944
20930
  }, handleEvent);
20945
20931
  } catch (error48) {
@@ -20947,14 +20933,14 @@ function createFsWatchInstance(path27, options, listener, errHandler, emitRaw) {
20947
20933
  return void 0;
20948
20934
  }
20949
20935
  }
20950
- var import_node_fs, import_promises2, import_node_os2, sp, STR_DATA, STR_END, STR_CLOSE, EMPTY_FN, pl, isWindows, isMacos, isLinux, isFreeBSD, isIBMi, EVENTS, EV, THROTTLE_MODE_WATCH, statMethods, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, binaryExtensions, isBinaryPath, foreach, addAndConvert, clearItem, delFromSet, isEmptySet, FsWatchInstances, fsWatchBroadcast, setFsWatchListener, FsWatchFileInstances, setFsWatchFileListener, NodeFsHandler;
20936
+ var import_fs, import_promises2, sysPath, import_os, STR_DATA, STR_END, STR_CLOSE, EMPTY_FN, pl, isWindows, isMacos, isLinux, isFreeBSD, isIBMi, EVENTS, EV, THROTTLE_MODE_WATCH, statMethods, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, binaryExtensions, isBinaryPath, foreach, addAndConvert, clearItem, delFromSet, isEmptySet, FsWatchInstances, fsWatchBroadcast, setFsWatchListener, FsWatchFileInstances, setFsWatchFileListener, NodeFsHandler;
20951
20937
  var init_handler = __esm({
20952
- "../daemon-core/node_modules/chokidar/handler.js"() {
20938
+ "../../node_modules/chokidar/esm/handler.js"() {
20953
20939
  "use strict";
20954
- import_node_fs = require("fs");
20940
+ import_fs = require("fs");
20955
20941
  import_promises2 = require("fs/promises");
20956
- import_node_os2 = require("os");
20957
- sp = __toESM(require("path"), 1);
20942
+ sysPath = __toESM(require("path"), 1);
20943
+ import_os = require("os");
20958
20944
  STR_DATA = "data";
20959
20945
  STR_END = "end";
20960
20946
  STR_CLOSE = "close";
@@ -20965,7 +20951,7 @@ var init_handler = __esm({
20965
20951
  isMacos = pl === "darwin";
20966
20952
  isLinux = pl === "linux";
20967
20953
  isFreeBSD = pl === "freebsd";
20968
- isIBMi = (0, import_node_os2.type)() === "OS400";
20954
+ isIBMi = (0, import_os.type)() === "OS400";
20969
20955
  EVENTS = {
20970
20956
  ALL: "all",
20971
20957
  READY: "ready",
@@ -21247,7 +21233,7 @@ var init_handler = __esm({
21247
21233
  "zip",
21248
21234
  "zipx"
21249
21235
  ]);
21250
- isBinaryPath = (filePath) => binaryExtensions.has(sp.extname(filePath).slice(1).toLowerCase());
21236
+ isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
21251
21237
  foreach = (val, fn) => {
21252
21238
  if (val instanceof Set) {
21253
21239
  val.forEach(fn);
@@ -21355,7 +21341,7 @@ var init_handler = __esm({
21355
21341
  let cont = FsWatchFileInstances.get(fullPath);
21356
21342
  const copts = cont && cont.options;
21357
21343
  if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
21358
- (0, import_node_fs.unwatchFile)(fullPath);
21344
+ (0, import_fs.unwatchFile)(fullPath);
21359
21345
  cont = void 0;
21360
21346
  }
21361
21347
  if (cont) {
@@ -21366,7 +21352,7 @@ var init_handler = __esm({
21366
21352
  listeners: listener,
21367
21353
  rawEmitters: rawEmitter,
21368
21354
  options,
21369
- watcher: (0, import_node_fs.watchFile)(fullPath, options, (curr, prev) => {
21355
+ watcher: (0, import_fs.watchFile)(fullPath, options, (curr, prev) => {
21370
21356
  foreach(cont.rawEmitters, (rawEmitter2) => {
21371
21357
  rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
21372
21358
  });
@@ -21383,15 +21369,13 @@ var init_handler = __esm({
21383
21369
  delFromSet(cont, KEY_RAW, rawEmitter);
21384
21370
  if (isEmptySet(cont.listeners)) {
21385
21371
  FsWatchFileInstances.delete(fullPath);
21386
- (0, import_node_fs.unwatchFile)(fullPath);
21372
+ (0, import_fs.unwatchFile)(fullPath);
21387
21373
  cont.options = cont.watcher = void 0;
21388
21374
  Object.freeze(cont);
21389
21375
  }
21390
21376
  };
21391
21377
  };
21392
21378
  NodeFsHandler = class {
21393
- fsw;
21394
- _boundHandleError;
21395
21379
  constructor(fsW) {
21396
21380
  this.fsw = fsW;
21397
21381
  this._boundHandleError = (error48) => fsW._handleError(error48);
@@ -21404,11 +21388,11 @@ var init_handler = __esm({
21404
21388
  */
21405
21389
  _watchWithNodeFs(path27, listener) {
21406
21390
  const opts = this.fsw.options;
21407
- const directory = sp.dirname(path27);
21408
- const basename8 = sp.basename(path27);
21391
+ const directory = sysPath.dirname(path27);
21392
+ const basename8 = sysPath.basename(path27);
21409
21393
  const parent = this.fsw._getWatchedDir(directory);
21410
21394
  parent.add(basename8);
21411
- const absolutePath = sp.resolve(path27);
21395
+ const absolutePath = sysPath.resolve(path27);
21412
21396
  const options = {
21413
21397
  persistent: opts.persistent
21414
21398
  };
@@ -21439,8 +21423,8 @@ var init_handler = __esm({
21439
21423
  if (this.fsw.closed) {
21440
21424
  return;
21441
21425
  }
21442
- const dirname11 = sp.dirname(file2);
21443
- const basename8 = sp.basename(file2);
21426
+ const dirname11 = sysPath.dirname(file2);
21427
+ const basename8 = sysPath.basename(file2);
21444
21428
  const parent = this.fsw._getWatchedDir(dirname11);
21445
21429
  let prevStats = stats;
21446
21430
  if (parent.has(basename8))
@@ -21531,9 +21515,8 @@ var init_handler = __esm({
21531
21515
  this.fsw._symlinkPaths.set(full, true);
21532
21516
  }
21533
21517
  _handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
21534
- directory = sp.join(directory, "");
21535
- const throttleKey = target ? `${directory}:${target}` : directory;
21536
- throttler = this.fsw._throttle("readdir", throttleKey, 1e3);
21518
+ directory = sysPath.join(directory, "");
21519
+ throttler = this.fsw._throttle("readdir", directory, 1e3);
21537
21520
  if (!throttler)
21538
21521
  return;
21539
21522
  const previous = this.fsw._getWatchedDir(wh.path);
@@ -21550,7 +21533,7 @@ var init_handler = __esm({
21550
21533
  return;
21551
21534
  }
21552
21535
  const item = entry.path;
21553
- let path27 = sp.join(directory, item);
21536
+ let path27 = sysPath.join(directory, item);
21554
21537
  current.add(item);
21555
21538
  if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path27, item)) {
21556
21539
  return;
@@ -21561,7 +21544,7 @@ var init_handler = __esm({
21561
21544
  }
21562
21545
  if (item === target || !target && !previous.has(item)) {
21563
21546
  this.fsw._incrReadyCount();
21564
- path27 = sp.join(dir, sp.relative(dir, path27));
21547
+ path27 = sysPath.join(dir, sysPath.relative(dir, path27));
21565
21548
  this._addToNodeFs(path27, initialAdd, wh, depth + 1);
21566
21549
  }
21567
21550
  }).on(EV.ERROR, this._boundHandleError);
@@ -21598,12 +21581,12 @@ var init_handler = __esm({
21598
21581
  * @returns closer for the watcher instance.
21599
21582
  */
21600
21583
  async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath3) {
21601
- const parentDir = this.fsw._getWatchedDir(sp.dirname(dir));
21602
- const tracked = parentDir.has(sp.basename(dir));
21584
+ const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
21585
+ const tracked = parentDir.has(sysPath.basename(dir));
21603
21586
  if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
21604
21587
  this.fsw._emit(EV.ADD_DIR, dir, stats);
21605
21588
  }
21606
- parentDir.add(sp.basename(dir));
21589
+ parentDir.add(sysPath.basename(dir));
21607
21590
  this.fsw._getWatchedDir(dir);
21608
21591
  let throttler;
21609
21592
  let closer;
@@ -21653,7 +21636,7 @@ var init_handler = __esm({
21653
21636
  const follow = this.fsw.options.followSymlinks;
21654
21637
  let closer;
21655
21638
  if (stats.isDirectory()) {
21656
- const absPath = sp.resolve(path27);
21639
+ const absPath = sysPath.resolve(path27);
21657
21640
  const targetPath = follow ? await (0, import_promises2.realpath)(path27) : path27;
21658
21641
  if (this.fsw.closed)
21659
21642
  return;
@@ -21667,14 +21650,14 @@ var init_handler = __esm({
21667
21650
  const targetPath = follow ? await (0, import_promises2.realpath)(path27) : path27;
21668
21651
  if (this.fsw.closed)
21669
21652
  return;
21670
- const parent = sp.dirname(wh.watchPath);
21653
+ const parent = sysPath.dirname(wh.watchPath);
21671
21654
  this.fsw._getWatchedDir(parent).add(wh.watchPath);
21672
21655
  this.fsw._emit(EV.ADD, wh.watchPath, stats);
21673
21656
  closer = await this._handleDir(parent, stats, initialAdd, depth, path27, wh, targetPath);
21674
21657
  if (this.fsw.closed)
21675
21658
  return;
21676
21659
  if (targetPath !== void 0) {
21677
- this.fsw._symlinkPaths.set(sp.resolve(path27), targetPath);
21660
+ this.fsw._symlinkPaths.set(sysPath.resolve(path27), targetPath);
21678
21661
  }
21679
21662
  } else {
21680
21663
  closer = this._handleFile(wh.watchPath, stats, initialAdd);
@@ -21694,7 +21677,7 @@ var init_handler = __esm({
21694
21677
  }
21695
21678
  });
21696
21679
 
21697
- // ../daemon-core/node_modules/chokidar/index.js
21680
+ // ../../node_modules/chokidar/esm/index.js
21698
21681
  function arrify(item) {
21699
21682
  return Array.isArray(item) ? item : [item];
21700
21683
  }
@@ -21710,11 +21693,11 @@ function createPattern(matcher) {
21710
21693
  if (matcher.path === string4)
21711
21694
  return true;
21712
21695
  if (matcher.recursive) {
21713
- const relative5 = sp2.relative(matcher.path, string4);
21696
+ const relative5 = sysPath2.relative(matcher.path, string4);
21714
21697
  if (!relative5) {
21715
21698
  return false;
21716
21699
  }
21717
- return !relative5.startsWith("..") && !sp2.isAbsolute(relative5);
21700
+ return !relative5.startsWith("..") && !sysPath2.isAbsolute(relative5);
21718
21701
  }
21719
21702
  return false;
21720
21703
  };
@@ -21724,12 +21707,14 @@ function createPattern(matcher) {
21724
21707
  function normalizePath(path27) {
21725
21708
  if (typeof path27 !== "string")
21726
21709
  throw new Error("string expected");
21727
- path27 = sp2.normalize(path27);
21710
+ path27 = sysPath2.normalize(path27);
21728
21711
  path27 = path27.replace(/\\/g, "/");
21729
21712
  let prepend = false;
21730
21713
  if (path27.startsWith("//"))
21731
21714
  prepend = true;
21732
- path27 = path27.replace(DOUBLE_SLASH_RE, "/");
21715
+ const DOUBLE_SLASH_RE2 = /\/\//;
21716
+ while (path27.match(DOUBLE_SLASH_RE2))
21717
+ path27 = path27.replace(DOUBLE_SLASH_RE2, "/");
21733
21718
  if (prepend)
21734
21719
  path27 = "/" + path27;
21735
21720
  return path27;
@@ -21762,15 +21747,15 @@ function watch(paths, options = {}) {
21762
21747
  watcher.add(paths);
21763
21748
  return watcher;
21764
21749
  }
21765
- var import_node_events, import_node_fs2, import_promises3, sp2, SLASH, SLASH_SLASH, ONE_DOT, TWO_DOTS, STRING_TYPE, BACK_SLASH_RE, DOUBLE_SLASH_RE, DOT_RE, REPLACER_RE, isMatcherObject, unifyPaths, toUnix, normalizePathToUnix, normalizeIgnored, getAbsolutePath, EMPTY_SET, DirEntry, STAT_METHOD_F, STAT_METHOD_L, WatchHelper, FSWatcher;
21766
- var init_chokidar = __esm({
21767
- "../daemon-core/node_modules/chokidar/index.js"() {
21750
+ var import_fs2, import_promises3, import_events, sysPath2, SLASH, SLASH_SLASH, ONE_DOT, TWO_DOTS, STRING_TYPE, BACK_SLASH_RE, DOUBLE_SLASH_RE, DOT_RE, REPLACER_RE, isMatcherObject, unifyPaths, toUnix, normalizePathToUnix, normalizeIgnored, getAbsolutePath, EMPTY_SET, DirEntry, STAT_METHOD_F, STAT_METHOD_L, WatchHelper, FSWatcher;
21751
+ var init_esm2 = __esm({
21752
+ "../../node_modules/chokidar/esm/index.js"() {
21768
21753
  "use strict";
21769
- import_node_events = require("events");
21770
- import_node_fs2 = require("fs");
21754
+ import_fs2 = require("fs");
21771
21755
  import_promises3 = require("fs/promises");
21772
- sp2 = __toESM(require("path"), 1);
21773
- init_readdirp();
21756
+ import_events = require("events");
21757
+ sysPath2 = __toESM(require("path"), 1);
21758
+ init_esm();
21774
21759
  init_handler();
21775
21760
  SLASH = "/";
21776
21761
  SLASH_SLASH = "//";
@@ -21778,7 +21763,7 @@ var init_chokidar = __esm({
21778
21763
  TWO_DOTS = "..";
21779
21764
  STRING_TYPE = "string";
21780
21765
  BACK_SLASH_RE = /\\/g;
21781
- DOUBLE_SLASH_RE = /\/\//g;
21766
+ DOUBLE_SLASH_RE = /\/\//;
21782
21767
  DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
21783
21768
  REPLACER_RE = /^\.[/\\]/;
21784
21769
  isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
@@ -21795,31 +21780,30 @@ var init_chokidar = __esm({
21795
21780
  if (str2.startsWith(SLASH_SLASH)) {
21796
21781
  prepend = true;
21797
21782
  }
21798
- str2 = str2.replace(DOUBLE_SLASH_RE, SLASH);
21783
+ while (str2.match(DOUBLE_SLASH_RE)) {
21784
+ str2 = str2.replace(DOUBLE_SLASH_RE, SLASH);
21785
+ }
21799
21786
  if (prepend) {
21800
21787
  str2 = SLASH + str2;
21801
21788
  }
21802
21789
  return str2;
21803
21790
  };
21804
- normalizePathToUnix = (path27) => toUnix(sp2.normalize(toUnix(path27)));
21791
+ normalizePathToUnix = (path27) => toUnix(sysPath2.normalize(toUnix(path27)));
21805
21792
  normalizeIgnored = (cwd = "") => (path27) => {
21806
21793
  if (typeof path27 === "string") {
21807
- return normalizePathToUnix(sp2.isAbsolute(path27) ? path27 : sp2.join(cwd, path27));
21794
+ return normalizePathToUnix(sysPath2.isAbsolute(path27) ? path27 : sysPath2.join(cwd, path27));
21808
21795
  } else {
21809
21796
  return path27;
21810
21797
  }
21811
21798
  };
21812
21799
  getAbsolutePath = (path27, cwd) => {
21813
- if (sp2.isAbsolute(path27)) {
21800
+ if (sysPath2.isAbsolute(path27)) {
21814
21801
  return path27;
21815
21802
  }
21816
- return sp2.join(cwd, path27);
21803
+ return sysPath2.join(cwd, path27);
21817
21804
  };
21818
21805
  EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
21819
21806
  DirEntry = class {
21820
- path;
21821
- _removeWatcher;
21822
- items;
21823
21807
  constructor(dir, removeWatcher) {
21824
21808
  this.path = dir;
21825
21809
  this._removeWatcher = removeWatcher;
@@ -21844,7 +21828,7 @@ var init_chokidar = __esm({
21844
21828
  await (0, import_promises3.readdir)(dir);
21845
21829
  } catch (err) {
21846
21830
  if (this._removeWatcher) {
21847
- this._removeWatcher(sp2.dirname(dir), sp2.basename(dir));
21831
+ this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
21848
21832
  }
21849
21833
  }
21850
21834
  }
@@ -21871,19 +21855,12 @@ var init_chokidar = __esm({
21871
21855
  STAT_METHOD_F = "stat";
21872
21856
  STAT_METHOD_L = "lstat";
21873
21857
  WatchHelper = class {
21874
- fsw;
21875
- path;
21876
- watchPath;
21877
- fullWatchPath;
21878
- dirParts;
21879
- followSymlinks;
21880
- statMethod;
21881
21858
  constructor(path27, follow, fsw) {
21882
21859
  this.fsw = fsw;
21883
21860
  const watchPath = path27;
21884
21861
  this.path = path27 = path27.replace(REPLACER_RE, "");
21885
21862
  this.watchPath = watchPath;
21886
- this.fullWatchPath = sp2.resolve(watchPath);
21863
+ this.fullWatchPath = sysPath2.resolve(watchPath);
21887
21864
  this.dirParts = [];
21888
21865
  this.dirParts.forEach((parts) => {
21889
21866
  if (parts.length > 1)
@@ -21893,7 +21870,7 @@ var init_chokidar = __esm({
21893
21870
  this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
21894
21871
  }
21895
21872
  entryPath(entry) {
21896
- return sp2.join(this.watchPath, sp2.relative(this.watchPath, entry.fullPath));
21873
+ return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
21897
21874
  }
21898
21875
  filterPath(entry) {
21899
21876
  const { stats } = entry;
@@ -21906,25 +21883,7 @@ var init_chokidar = __esm({
21906
21883
  return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
21907
21884
  }
21908
21885
  };
21909
- FSWatcher = class extends import_node_events.EventEmitter {
21910
- closed;
21911
- options;
21912
- _closers;
21913
- _ignoredPaths;
21914
- _throttled;
21915
- _streams;
21916
- _symlinkPaths;
21917
- _watched;
21918
- _pendingWrites;
21919
- _pendingUnlinks;
21920
- _readyCount;
21921
- _emitReady;
21922
- _closePromise;
21923
- _userIgnored;
21924
- _readyEmitted;
21925
- _emitRaw;
21926
- _boundRemove;
21927
- _nodeFsHandler;
21886
+ FSWatcher = class extends import_events.EventEmitter {
21928
21887
  // Not indenting methods for history sake; for now.
21929
21888
  constructor(_opts = {}) {
21930
21889
  super();
@@ -22043,7 +22002,7 @@ var init_chokidar = __esm({
22043
22002
  return;
22044
22003
  results.forEach((item) => {
22045
22004
  if (item)
22046
- this.add(sp2.dirname(item), sp2.basename(_origAdd || item));
22005
+ this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
22047
22006
  });
22048
22007
  });
22049
22008
  return this;
@@ -22057,10 +22016,10 @@ var init_chokidar = __esm({
22057
22016
  const paths = unifyPaths(paths_);
22058
22017
  const { cwd } = this.options;
22059
22018
  paths.forEach((path27) => {
22060
- if (!sp2.isAbsolute(path27) && !this._closers.has(path27)) {
22019
+ if (!sysPath2.isAbsolute(path27) && !this._closers.has(path27)) {
22061
22020
  if (cwd)
22062
- path27 = sp2.join(cwd, path27);
22063
- path27 = sp2.resolve(path27);
22021
+ path27 = sysPath2.join(cwd, path27);
22022
+ path27 = sysPath2.resolve(path27);
22064
22023
  }
22065
22024
  this._closePath(path27);
22066
22025
  this._addIgnoredPath(path27);
@@ -22109,7 +22068,7 @@ var init_chokidar = __esm({
22109
22068
  getWatched() {
22110
22069
  const watchList = {};
22111
22070
  this._watched.forEach((entry, dir) => {
22112
- const key = this.options.cwd ? sp2.relative(this.options.cwd, dir) : dir;
22071
+ const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
22113
22072
  const index = key || ONE_DOT;
22114
22073
  watchList[index] = entry.getChildren().sort();
22115
22074
  });
@@ -22135,9 +22094,9 @@ var init_chokidar = __esm({
22135
22094
  return;
22136
22095
  const opts = this.options;
22137
22096
  if (isWindows)
22138
- path27 = sp2.normalize(path27);
22097
+ path27 = sysPath2.normalize(path27);
22139
22098
  if (opts.cwd)
22140
- path27 = sp2.relative(opts.cwd, path27);
22099
+ path27 = sysPath2.relative(opts.cwd, path27);
22141
22100
  const args = [path27];
22142
22101
  if (stats != null)
22143
22102
  args.push(stats);
@@ -22188,7 +22147,7 @@ var init_chokidar = __esm({
22188
22147
  return this;
22189
22148
  }
22190
22149
  if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
22191
- const fullPath = opts.cwd ? sp2.join(opts.cwd, path27) : path27;
22150
+ const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path27) : path27;
22192
22151
  let stats2;
22193
22152
  try {
22194
22153
  stats2 = await (0, import_promises3.stat)(fullPath);
@@ -22264,13 +22223,13 @@ var init_chokidar = __esm({
22264
22223
  const pollInterval = awf.pollInterval;
22265
22224
  let timeoutHandler;
22266
22225
  let fullPath = path27;
22267
- if (this.options.cwd && !sp2.isAbsolute(path27)) {
22268
- fullPath = sp2.join(this.options.cwd, path27);
22226
+ if (this.options.cwd && !sysPath2.isAbsolute(path27)) {
22227
+ fullPath = sysPath2.join(this.options.cwd, path27);
22269
22228
  }
22270
22229
  const now = /* @__PURE__ */ new Date();
22271
22230
  const writes = this._pendingWrites;
22272
22231
  function awaitWriteFinishFn(prevStat) {
22273
- (0, import_node_fs2.stat)(fullPath, (err, curStat) => {
22232
+ (0, import_fs2.stat)(fullPath, (err, curStat) => {
22274
22233
  if (err || !writes.has(path27)) {
22275
22234
  if (err && err.code !== "ENOENT")
22276
22235
  awfEmit(err);
@@ -22335,7 +22294,7 @@ var init_chokidar = __esm({
22335
22294
  * @param directory path of the directory
22336
22295
  */
22337
22296
  _getWatchedDir(directory) {
22338
- const dir = sp2.resolve(directory);
22297
+ const dir = sysPath2.resolve(directory);
22339
22298
  if (!this._watched.has(dir))
22340
22299
  this._watched.set(dir, new DirEntry(dir, this._boundRemove));
22341
22300
  return this._watched.get(dir);
@@ -22358,8 +22317,8 @@ var init_chokidar = __esm({
22358
22317
  * @param item base path of item/directory
22359
22318
  */
22360
22319
  _remove(directory, item, isDirectory) {
22361
- const path27 = sp2.join(directory, item);
22362
- const fullPath = sp2.resolve(path27);
22320
+ const path27 = sysPath2.join(directory, item);
22321
+ const fullPath = sysPath2.resolve(path27);
22363
22322
  isDirectory = isDirectory != null ? isDirectory : this._watched.has(path27) || this._watched.has(fullPath);
22364
22323
  if (!this._throttle("remove", path27, 100))
22365
22324
  return;
@@ -22377,7 +22336,7 @@ var init_chokidar = __esm({
22377
22336
  }
22378
22337
  let relPath = path27;
22379
22338
  if (this.options.cwd)
22380
- relPath = sp2.relative(this.options.cwd, path27);
22339
+ relPath = sysPath2.relative(this.options.cwd, path27);
22381
22340
  if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
22382
22341
  const event = this._pendingWrites.get(relPath).cancelWait();
22383
22342
  if (event === EVENTS.ADD)
@@ -22395,8 +22354,8 @@ var init_chokidar = __esm({
22395
22354
  */
22396
22355
  _closePath(path27) {
22397
22356
  this._closeFile(path27);
22398
- const dir = sp2.dirname(path27);
22399
- this._getWatchedDir(dir).remove(sp2.basename(path27));
22357
+ const dir = sysPath2.dirname(path27);
22358
+ this._getWatchedDir(dir).remove(sysPath2.basename(path27));
22400
22359
  }
22401
22360
  /**
22402
22361
  * Closes only file-specific watchers
@@ -25288,7 +25247,7 @@ function resolveWorktreePath(repoRoot, meshName, branch) {
25288
25247
  async function createWorktree(opts) {
25289
25248
  const { repoRoot, branch, baseBranch, meshName } = opts;
25290
25249
  const targetDir = opts.targetDir || resolveWorktreePath(repoRoot, meshName, branch);
25291
- if ((0, import_fs.existsSync)(targetDir)) {
25250
+ if ((0, import_fs3.existsSync)(targetDir)) {
25292
25251
  throw new Error(`Worktree target directory already exists: ${targetDir}`);
25293
25252
  }
25294
25253
  await (0, import_promises4.mkdir)(path4.dirname(targetDir), { recursive: true });
@@ -25318,7 +25277,7 @@ async function createWorktree(opts) {
25318
25277
  };
25319
25278
  }
25320
25279
  async function removeWorktree(repoRoot, worktreePath) {
25321
- if (!(0, import_fs.existsSync)(worktreePath)) {
25280
+ if (!(0, import_fs3.existsSync)(worktreePath)) {
25322
25281
  await pruneWorktrees(repoRoot);
25323
25282
  return { success: true, removedPath: worktreePath };
25324
25283
  }
@@ -25474,9 +25433,9 @@ function ensureMachineId(config2) {
25474
25433
  };
25475
25434
  }
25476
25435
  function getConfigDir() {
25477
- const dir = (0, import_path.join)((0, import_os.homedir)(), ".adhdev");
25478
- if (!(0, import_fs2.existsSync)(dir)) {
25479
- (0, import_fs2.mkdirSync)(dir, { recursive: true });
25436
+ const dir = (0, import_path.join)((0, import_os2.homedir)(), ".adhdev");
25437
+ if (!(0, import_fs4.existsSync)(dir)) {
25438
+ (0, import_fs4.mkdirSync)(dir, { recursive: true });
25480
25439
  }
25481
25440
  return dir;
25482
25441
  }
@@ -25485,7 +25444,7 @@ function getConfigPath() {
25485
25444
  }
25486
25445
  function migrateStateToStateFile(raw) {
25487
25446
  const statePath = (0, import_path.join)(getConfigDir(), "state.json");
25488
- if ((0, import_fs2.existsSync)(statePath)) return;
25447
+ if ((0, import_fs4.existsSync)(statePath)) return;
25489
25448
  const recentActivity = Array.isArray(raw.recentActivity) ? raw.recentActivity : [];
25490
25449
  const savedProviderSessions = Array.isArray(raw.savedProviderSessions) ? raw.savedProviderSessions : [];
25491
25450
  const legacySessionReads = isPlainObject2(raw.recentSessionReads) ? raw.recentSessionReads : {};
@@ -25505,11 +25464,11 @@ function migrateStateToStateFile(raw) {
25505
25464
  sessionReads: mergedReads,
25506
25465
  sessionReadMarkers: cleanedMarkers
25507
25466
  };
25508
- (0, import_fs2.writeFileSync)(statePath, JSON.stringify(state, null, 2), { encoding: "utf-8", mode: 384 });
25467
+ (0, import_fs4.writeFileSync)(statePath, JSON.stringify(state, null, 2), { encoding: "utf-8", mode: 384 });
25509
25468
  }
25510
25469
  function loadConfig() {
25511
25470
  const configPath = getConfigPath();
25512
- if (!(0, import_fs2.existsSync)(configPath)) {
25471
+ if (!(0, import_fs4.existsSync)(configPath)) {
25513
25472
  const initialized = ensureMachineId({ ...DEFAULT_CONFIG });
25514
25473
  try {
25515
25474
  saveConfig(initialized.config);
@@ -25518,7 +25477,7 @@ function loadConfig() {
25518
25477
  return initialized.config;
25519
25478
  }
25520
25479
  try {
25521
- const raw = (0, import_fs2.readFileSync)(configPath, "utf-8");
25480
+ const raw = (0, import_fs4.readFileSync)(configPath, "utf-8");
25522
25481
  const parsed = JSON.parse(raw);
25523
25482
  migrateStateToStateFile(parsed);
25524
25483
  const normalizedInput = normalizeConfig(parsed);
@@ -25540,12 +25499,12 @@ function saveConfig(config2) {
25540
25499
  const configPath = getConfigPath();
25541
25500
  const dir = getConfigDir();
25542
25501
  const normalized = normalizeConfig(config2);
25543
- if (!(0, import_fs2.existsSync)(dir)) {
25544
- (0, import_fs2.mkdirSync)(dir, { recursive: true, mode: 448 });
25502
+ if (!(0, import_fs4.existsSync)(dir)) {
25503
+ (0, import_fs4.mkdirSync)(dir, { recursive: true, mode: 448 });
25545
25504
  }
25546
- (0, import_fs2.writeFileSync)(configPath, JSON.stringify(normalized, null, 2), { encoding: "utf-8", mode: 384 });
25505
+ (0, import_fs4.writeFileSync)(configPath, JSON.stringify(normalized, null, 2), { encoding: "utf-8", mode: 384 });
25547
25506
  try {
25548
- (0, import_fs2.chmodSync)(configPath, 384);
25507
+ (0, import_fs4.chmodSync)(configPath, 384);
25549
25508
  } catch {
25550
25509
  }
25551
25510
  }
@@ -25577,9 +25536,9 @@ function getMeshConfigPath() {
25577
25536
  }
25578
25537
  function loadMeshConfig() {
25579
25538
  const path27 = getMeshConfigPath();
25580
- if (!(0, import_fs3.existsSync)(path27)) return { meshes: [] };
25539
+ if (!(0, import_fs5.existsSync)(path27)) return { meshes: [] };
25581
25540
  try {
25582
- const raw = JSON.parse((0, import_fs3.readFileSync)(path27, "utf-8"));
25541
+ const raw = JSON.parse((0, import_fs5.readFileSync)(path27, "utf-8"));
25583
25542
  if (!raw || !Array.isArray(raw.meshes)) return { meshes: [] };
25584
25543
  return raw;
25585
25544
  } catch {
@@ -25588,7 +25547,7 @@ function loadMeshConfig() {
25588
25547
  }
25589
25548
  function saveMeshConfig(config2) {
25590
25549
  const path27 = getMeshConfigPath();
25591
- (0, import_fs3.writeFileSync)(path27, JSON.stringify(config2, null, 2), { encoding: "utf-8", mode: 384 });
25550
+ (0, import_fs5.writeFileSync)(path27, JSON.stringify(config2, null, 2), { encoding: "utf-8", mode: 384 });
25592
25551
  }
25593
25552
  function normalizeRepoIdentity(remoteUrl) {
25594
25553
  let identity = remoteUrl.trim();
@@ -26548,7 +26507,7 @@ async function validateWorkspace(workspace) {
26548
26507
  cwd: normalizedWorkspace
26549
26508
  });
26550
26509
  }
26551
- await (0, import_promises5.access)(normalizedWorkspace, import_fs4.constants.R_OK);
26510
+ await (0, import_promises5.access)(normalizedWorkspace, import_fs6.constants.R_OK);
26552
26511
  } catch (error48) {
26553
26512
  if (error48 instanceof GitCommandError) throw error48;
26554
26513
  throw new GitCommandError("invalid_args", "Workspace must be an existing directory", {
@@ -28083,11 +28042,11 @@ function normalizeState(raw) {
28083
28042
  }
28084
28043
  function loadState() {
28085
28044
  const statePath = getStatePath();
28086
- if (!(0, import_fs5.existsSync)(statePath)) {
28045
+ if (!(0, import_fs7.existsSync)(statePath)) {
28087
28046
  return { ...DEFAULT_STATE };
28088
28047
  }
28089
28048
  try {
28090
- const raw = (0, import_fs5.readFileSync)(statePath, "utf-8");
28049
+ const raw = (0, import_fs7.readFileSync)(statePath, "utf-8");
28091
28050
  return normalizeState(JSON.parse(raw));
28092
28051
  } catch {
28093
28052
  return { ...DEFAULT_STATE };
@@ -28096,7 +28055,7 @@ function loadState() {
28096
28055
  function saveState(state) {
28097
28056
  const statePath = getStatePath();
28098
28057
  const normalized = normalizeState(state);
28099
- (0, import_fs5.writeFileSync)(statePath, JSON.stringify(normalized, null, 2), { encoding: "utf-8", mode: 384 });
28058
+ (0, import_fs7.writeFileSync)(statePath, JSON.stringify(normalized, null, 2), { encoding: "utf-8", mode: 384 });
28100
28059
  }
28101
28060
  function resetState() {
28102
28061
  saveState({ ...DEFAULT_STATE });
@@ -28118,13 +28077,13 @@ function findCliCommand(command) {
28118
28077
  const trimmed = String(command || "").trim();
28119
28078
  if (!trimmed) return null;
28120
28079
  if (path8.isAbsolute(trimmed) || trimmed.includes("/") || trimmed.includes("\\") || trimmed.startsWith("~")) {
28121
- const candidate = trimmed.startsWith("~") ? path8.join((0, import_os2.homedir)(), trimmed.slice(1)) : trimmed;
28080
+ const candidate = trimmed.startsWith("~") ? path8.join((0, import_os3.homedir)(), trimmed.slice(1)) : trimmed;
28122
28081
  const resolved = path8.isAbsolute(candidate) ? candidate : path8.resolve(candidate);
28123
- return (0, import_fs6.existsSync)(resolved) ? resolved : null;
28082
+ return (0, import_fs8.existsSync)(resolved) ? resolved : null;
28124
28083
  }
28125
28084
  try {
28126
28085
  const result = (0, import_child_process4.execSync)(
28127
- (0, import_os2.platform)() === "win32" ? `where ${trimmed}` : `which ${trimmed}`,
28086
+ (0, import_os3.platform)() === "win32" ? `where ${trimmed}` : `which ${trimmed}`,
28128
28087
  { encoding: "utf-8", timeout: 5e3, stdio: ["pipe", "pipe", "pipe"] }
28129
28088
  ).trim();
28130
28089
  return result.split("\n")[0] || null;
@@ -28145,21 +28104,21 @@ function getIdeVersion(cliCommand) {
28145
28104
  }
28146
28105
  }
28147
28106
  function checkPathExists(paths) {
28148
- const home = (0, import_os2.homedir)();
28107
+ const home = (0, import_os3.homedir)();
28149
28108
  for (const p of paths) {
28150
28109
  const normalized = p.startsWith("~") ? path8.join(home, p.slice(1)) : p;
28151
28110
  if (normalized.includes("*")) {
28152
28111
  const username = home.split(/[\\/]/).pop() || "";
28153
28112
  const resolved = normalized.replace("*", username);
28154
- if ((0, import_fs6.existsSync)(resolved)) return resolved;
28113
+ if ((0, import_fs8.existsSync)(resolved)) return resolved;
28155
28114
  } else {
28156
- if ((0, import_fs6.existsSync)(normalized)) return normalized;
28115
+ if ((0, import_fs8.existsSync)(normalized)) return normalized;
28157
28116
  }
28158
28117
  }
28159
28118
  return null;
28160
28119
  }
28161
28120
  async function detectIDEs(providerLoader) {
28162
- const os222 = (0, import_os2.platform)();
28121
+ const os222 = (0, import_os3.platform)();
28163
28122
  const results = [];
28164
28123
  for (const def of getMergedDefinitions()) {
28165
28124
  const cliPath = findCliCommand(providerLoader?.getIdeCliCommand(def.id, def.cli) || def.cli);
@@ -28167,7 +28126,7 @@ async function detectIDEs(providerLoader) {
28167
28126
  let resolvedCli = cliPath;
28168
28127
  if (!resolvedCli && appPath && os222 === "darwin") {
28169
28128
  const bundledCli = `${appPath}/Contents/Resources/app/bin/${def.cli}`;
28170
- if ((0, import_fs6.existsSync)(bundledCli)) resolvedCli = bundledCli;
28129
+ if ((0, import_fs8.existsSync)(bundledCli)) resolvedCli = bundledCli;
28171
28130
  }
28172
28131
  if (!resolvedCli && appPath && os222 === "win32") {
28173
28132
  const { dirname: dirname92 } = await import("path");
@@ -28180,7 +28139,7 @@ async function detectIDEs(providerLoader) {
28180
28139
  `${appDir}\\\\resources\\\\app\\\\bin\\\\${def.cli}.cmd`
28181
28140
  ];
28182
28141
  for (const c of candidates) {
28183
- if ((0, import_fs6.existsSync)(c)) {
28142
+ if ((0, import_fs8.existsSync)(c)) {
28184
28143
  resolvedCli = c;
28185
28144
  break;
28186
28145
  }
@@ -28224,7 +28183,7 @@ function resolveCommandPath(command) {
28224
28183
  if (isExplicitCommandPath(trimmed)) {
28225
28184
  const expanded = expandHome(trimmed);
28226
28185
  const candidate = path9.isAbsolute(expanded) ? expanded : path9.resolve(expanded);
28227
- return (0, import_fs7.existsSync)(candidate) ? candidate : null;
28186
+ return (0, import_fs9.existsSync)(candidate) ? candidate : null;
28228
28187
  }
28229
28188
  return null;
28230
28189
  }
@@ -32193,9 +32152,17 @@ async function handleResolveAction(h, args) {
32193
32152
  const targetState = targetInstance?.getState?.();
32194
32153
  const surfacedModal = targetState?.activeChat?.activeModal && Array.isArray(targetState.activeChat.activeModal.buttons) && targetState.activeChat.activeModal.buttons.some((candidate) => typeof candidate === "string" && candidate.trim()) ? targetState.activeChat.activeModal : null;
32195
32154
  const statusModal = status?.activeModal && Array.isArray(status.activeModal.buttons) && status.activeModal.buttons.some((candidate) => typeof candidate === "string" && candidate.trim()) ? status.activeModal : null;
32196
- const effectiveModal = statusModal || surfacedModal;
32197
- const effectiveStatus = status?.status === "waiting_approval" || targetState?.activeChat?.status === "waiting_approval" ? "waiting_approval" : status?.status;
32198
- LOG.info("Command", `[resolveAction] CLI PTY gate target=${String(args?.targetSessionId || "")} rawStatus=${String(status?.status || "")} effectiveStatus=${String(effectiveStatus || "")} statusModal=${statusModal ? "yes" : "no"} surfacedModal=${surfacedModal ? "yes" : "no"} instance=${targetInstance ? "yes" : "no"}`);
32155
+ const parsedStatus = !statusModal && !surfacedModal && typeof adapter.getScriptParsedStatus === "function" ? (() => {
32156
+ try {
32157
+ return parseMaybeJson(adapter.getScriptParsedStatus());
32158
+ } catch {
32159
+ return null;
32160
+ }
32161
+ })() : null;
32162
+ const parsedModal = parsedStatus?.status === "waiting_approval" && parsedStatus?.activeModal && Array.isArray(parsedStatus.activeModal.buttons) && parsedStatus.activeModal.buttons.some((candidate) => typeof candidate === "string" && candidate.trim()) ? parsedStatus.activeModal : null;
32163
+ const effectiveModal = statusModal || surfacedModal || parsedModal;
32164
+ const effectiveStatus = status?.status === "waiting_approval" || targetState?.activeChat?.status === "waiting_approval" || parsedStatus?.status === "waiting_approval" ? "waiting_approval" : status?.status;
32165
+ LOG.info("Command", `[resolveAction] CLI PTY gate target=${String(args?.targetSessionId || "")} rawStatus=${String(status?.status || "")} effectiveStatus=${String(effectiveStatus || "")} statusModal=${statusModal ? "yes" : "no"} surfacedModal=${surfacedModal ? "yes" : "no"} parsedModal=${parsedModal ? "yes" : "no"} instance=${targetInstance ? "yes" : "no"}`);
32199
32166
  if (!effectiveModal) {
32200
32167
  return { success: false, error: "Not in approval state" };
32201
32168
  }
@@ -33432,7 +33399,7 @@ function commandExists(command) {
33432
33399
  const trimmed = command.trim();
33433
33400
  if (!trimmed) return false;
33434
33401
  if (isExplicitCommand(trimmed)) {
33435
- return (0, import_fs8.existsSync)(expandExecutable(trimmed));
33402
+ return (0, import_fs10.existsSync)(expandExecutable(trimmed));
33436
33403
  }
33437
33404
  try {
33438
33405
  (0, import_child_process7.execFileSync)(process.platform === "win32" ? "where" : "which", [trimmed], {
@@ -33453,10 +33420,10 @@ function hasCliArg(args, flag) {
33453
33420
  }
33454
33421
  function ensureEmptyDelegatedMcpConfig(workspace) {
33455
33422
  const baseDir = path17.join(os13.tmpdir(), "adhdev-delegated-agent-empty-mcp");
33456
- (0, import_fs8.mkdirSync)(baseDir, { recursive: true });
33423
+ (0, import_fs10.mkdirSync)(baseDir, { recursive: true });
33457
33424
  const workspaceHash = crypto4.createHash("sha256").update(path17.resolve(workspace || os13.tmpdir())).digest("hex").slice(0, 16);
33458
33425
  const filePath = path17.join(baseDir, `${workspaceHash}.json`);
33459
- (0, import_fs8.writeFileSync)(filePath, JSON.stringify({ mcpServers: {} }, null, 2), "utf-8");
33426
+ (0, import_fs10.writeFileSync)(filePath, JSON.stringify({ mcpServers: {} }, null, 2), "utf-8");
33460
33427
  return filePath;
33461
33428
  }
33462
33429
  function buildCoordinatorDelegatedCliLaunchOptions(input) {
@@ -34543,7 +34510,7 @@ function addNodeCandidatesFromPath(pathValue, addCandidate) {
34543
34510
  function addNodeCandidatesFromNvm(homeDir, addCandidate) {
34544
34511
  const versionsDir = (0, import_path4.join)(homeDir, ".nvm", "versions", "node");
34545
34512
  try {
34546
- const versionDirs = (0, import_fs9.readdirSync)(versionsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareNodeVersionNamesDescending);
34513
+ const versionDirs = (0, import_fs11.readdirSync)(versionsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort(compareNodeVersionNamesDescending);
34547
34514
  for (const versionDir of versionDirs) {
34548
34515
  addCandidate((0, import_path4.join)(versionsDir, versionDir, "bin", "node"));
34549
34516
  }
@@ -34606,8 +34573,8 @@ function resolveAdhdevMcpEntryPath(explicitPath) {
34606
34573
  }
34607
34574
  function normalizeExistingPath(filePath) {
34608
34575
  try {
34609
- if (!(0, import_fs9.existsSync)(filePath)) return null;
34610
- return import_fs9.realpathSync.native(filePath);
34576
+ if (!(0, import_fs11.existsSync)(filePath)) return null;
34577
+ return import_fs11.realpathSync.native(filePath);
34611
34578
  } catch {
34612
34579
  return null;
34613
34580
  }
@@ -35672,7 +35639,7 @@ function runCommand(cmd, timeout = 1e4) {
35672
35639
  }
35673
35640
  }
35674
35641
  function findBinary2(name) {
35675
- const cmd = (0, import_os3.platform)() === "win32" ? `where ${name}` : `which ${name}`;
35642
+ const cmd = (0, import_os4.platform)() === "win32" ? `where ${name}` : `which ${name}`;
35676
35643
  const result = runCommand(cmd, 5e3);
35677
35644
  return result ? result.split("\n")[0] : null;
35678
35645
  }
@@ -35720,7 +35687,7 @@ function checkPathExists2(paths) {
35720
35687
  return null;
35721
35688
  }
35722
35689
  function getMacAppVersion(appPath) {
35723
- if ((0, import_os3.platform)() !== "darwin" || !appPath.endsWith(".app")) return null;
35690
+ if ((0, import_os4.platform)() !== "darwin" || !appPath.endsWith(".app")) return null;
35724
35691
  const plistPath = path222.join(appPath, "Contents", "Info.plist");
35725
35692
  if (!fs11.existsSync(plistPath)) return null;
35726
35693
  const raw = runCommand(`/usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" "${plistPath}"`);
@@ -35728,7 +35695,7 @@ function getMacAppVersion(appPath) {
35728
35695
  }
35729
35696
  async function detectAllVersions(loader2, archive) {
35730
35697
  const results = [];
35731
- const currentOs = (0, import_os3.platform)();
35698
+ const currentOs = (0, import_os4.platform)();
35732
35699
  for (const provider of loader2.getAll()) {
35733
35700
  const info = {
35734
35701
  type: provider.type,
@@ -39849,20 +39816,20 @@ async function shutdownDaemonComponents(components) {
39849
39816
  }
39850
39817
  cdpManagers.clear();
39851
39818
  }
39852
- var path4, import_promises4, import_fs, import_child_process, import_util3, import_os, import_path, import_fs2, import_crypto2, import_fs3, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs4, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs5, import_path3, import_child_process4, import_fs6, import_os2, path8, import_child_process5, os22, path9, import_fs7, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path17, crypto4, import_fs8, import_child_process7, os12, path16, crypto3, fs6, import_module, import_stream2, import_child_process8, import_child_process9, net2, os15, path19, fs7, path18, os14, fs8, path20, os16, import_child_process10, import_fs9, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path21, fs10, fs11, path222, os20, import_child_process13, import_os3, http2, fs15, path26, fs12, path23, fs13, path24, fs14, path25, os21, import_child_process14, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS2, DEFAULT_MESH_POLICY, init_repo_mesh_types, git_worktree_exports, execFileAsync2, WORKTREE_DIR_NAME, GIT_TIMEOUT_MS, GIT_MAX_BUFFER, init_git_worktree, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, SESSION_CLEANUP_MODES, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, WORKFLOW_SECTION, init_coordinator_prompt, LEVEL_NUM, LEVEL_LABEL, currentLevel, LOG_DIR, MAX_LOG_SIZE, MAX_LOG_DAYS, currentDate, currentLogFile, writeCount, RING_BUFFER_SIZE, ringBuffer, origConsoleLog, origConsoleError, origConsoleWarn, LOG, interceptorInstalled, LOG_PATH, init_logger, NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, DEFAULT_CONFIG2, currentConfig, init_debug_config, DEFAULT_BINDING_CANDIDATES, cachedBinding, cachedBindingError, GhosttyVtTerminalBackend, init_ghostty_vt_backend, TerminalCtor, XtermTerminalBackend, init_xterm_backend, DEFAULT_SCROLLBACK, loggedTerminalBackends, TerminalScreen, init_terminal_screen, init_spawn_env, cachedPty, NodePtyRuntimeTransport, NodePtyTransportFactory, init_pty_transport, buildCliSpawnEnv, init_provider_cli_shared, init_provider_cli_parse, init_provider_cli_config, init_provider_cli_runtime, provider_cli_adapter_exports, ProviderCliAdapter, init_provider_cli_adapter, execFileAsync, DEFAULT_TIMEOUT_MS, DEFAULT_MAX_BUFFER, GitCommandError, DEFAULT_MAX_FILES, DEFAULT_MAX_BYTES, summarizeGitStatus, InMemoryGitSnapshotStore, DEFAULT_GIT_WORKSPACE_POLL_INTERVAL_MS, MIN_GIT_WORKSPACE_POLL_INTERVAL_MS, GitWorkspaceMonitor, GIT_COMMAND_NAMES, SNAPSHOT_REASONS, FAILURE_REASONS, defaultSnapshotStore, defaultGitCommandServices, BUSY_STATUSES, TERMINAL_STATUSES, TurnSnapshotTracker, MAX_WORKSPACES, MAX_ACTIVITY, MAX_SAVED_SESSIONS, DEFAULT_STATE, BUILTIN_IDE_DEFINITIONS, registeredIDEs, LIVE_LIFECYCLES, DEFAULT_ACTIVE_CHAT_POLL_STATUSES, DEFAULT_CHAT_TAIL_RECENT_MESSAGE_GRACE_MS, LIVE_RUNTIME_LIFECYCLES, DaemonCdpManager, CdpDomHandlers, DEFAULT_MONITOR_CONFIG, StatusMonitor, BUILTIN_CHAT_MESSAGE_KINDS, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, HISTORY_DIR, RETAIN_DAYS, SAVED_HISTORY_INDEX_VERSION, SAVED_HISTORY_INDEX_FILE, SAVED_HISTORY_INDEX_LOCK_SUFFIX, SAVED_HISTORY_INDEX_LOCK_WAIT_MS, SAVED_HISTORY_INDEX_LOCK_STALE_MS, SAVED_HISTORY_INDEX_LOCK_POLL_MS, SAVED_HISTORY_ROLLUP_THRESHOLD_BYTES, savedHistorySessionCache, savedHistoryFileSummaryCache, savedHistoryBackgroundRefresh, savedHistoryRollupInFlight, ChatHistoryWriter, IDE_PROVIDER_SESSION_CAPABILITIES_BASE, EXTENSION_PROVIDER_SESSION_CAPABILITIES_BASE, ExtensionProviderInstance, VALID_STATUSES, VALID_ROLES, VALID_BUBBLE_STATES, VALID_TURN_STATUSES, DEFAULT_APPROVAL_POSITIVE_HINTS, IdeProviderInstance, DEFAULT_CDP_SCAN_INTERVAL_MS, DEFAULT_CDP_DISCOVERY_INTERVAL_MS, DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS, DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS, DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS, MIN_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, DEFAULT_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, MIN_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_READY_TIMEOUT_MS, STANDALONE_CDP_SCAN_INTERVAL_MS, DaemonCdpScanner, DaemonCdpInitializer, WORKING_STATUSES, FULL_STATUS_ACTIVE_CHAT_OPTIONS, LIVE_STATUS_ACTIVE_CHAT_OPTIONS, STATUS_MODAL_MESSAGE_LIMIT, STATUS_MODAL_BUTTON_LIMIT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, VALID_INPUT_MEDIA_TYPES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, COORDINATOR_DELEGATED_ENV_UNSETS, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, KNOWN_PROVIDER_FIELDS, VALUE_CONTROL_TYPES, ProviderLoader, _providerLoader, LOG_DIR2, MAX_FILE_SIZE, MAX_DAYS, SENSITIVE_KEYS, currentDate2, currentFile, writeCount2, SKIP_COMMANDS, DEFAULT_SERVER_NAME, DEFAULT_ADHDEV_MCP_COMMAND, HERMES_CLI_TYPE, HERMES_MCP_CONFIG_PATH, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHANNEL_NPM_TAG, CHANNEL_SERVER_URL, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter, DaemonStatusReporter, DEFAULT_DAEMON_PORT, DAEMON_WS_PATH, ProviderStreamAdapter, DaemonAgentStreamManager, AgentStreamPoller, ProviderInstanceManager, ARCHIVE_PATH, MAX_ENTRIES_PER_PROVIDER, VersionArchive, DEV_SERVER_PORT, DevServer, SessionHostRuntimeTransport, SessionHostPtyTransportFactory, DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, STARTUP_TIMEOUT_MS, STARTUP_POLL_MS, EXTENSION_CATALOG, SessionRegistry;
39819
+ var path4, import_promises4, import_fs3, import_child_process, import_util3, import_os2, import_path, import_fs4, import_crypto2, import_fs5, import_path2, import_crypto3, fs2, path10, os4, os8, os9, path14, import_child_process2, os10, path15, os11, import_child_process3, import_fs6, import_promises5, path, import_util4, import_promises6, path22, path32, fs, os5, path5, import_crypto4, path6, path7, import_fs7, import_path3, import_child_process4, import_fs8, import_os3, path8, import_child_process5, os22, path9, import_fs9, os32, import_child_process6, http, crypto2, fs3, path11, os52, fs4, os6, path12, import_crypto5, fs5, path13, os7, os13, path17, crypto4, import_fs10, import_child_process7, os12, path16, crypto3, fs6, import_module, import_stream2, import_child_process8, import_child_process9, net2, os15, path19, fs7, path18, os14, fs8, path20, os16, import_child_process10, import_fs11, import_module2, os17, import_path4, os18, import_child_process11, import_child_process12, fs9, os19, path21, fs10, fs11, path222, os20, import_child_process13, import_os4, http2, fs15, path26, fs12, path23, fs13, path24, fs14, path25, os21, import_child_process14, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __require2, __esm2, __export2, __copyProps2, __toCommonJS2, DEFAULT_MESH_POLICY, init_repo_mesh_types, git_worktree_exports, execFileAsync2, WORKTREE_DIR_NAME, GIT_TIMEOUT_MS, GIT_MAX_BUFFER, init_git_worktree, config_exports, DEFAULT_CONFIG, MACHINE_ID_PREFIX, init_config, mesh_config_exports, SESSION_CLEANUP_MODES, init_mesh_config, coordinator_prompt_exports, TOOLS_SECTION, WORKFLOW_SECTION, init_coordinator_prompt, LEVEL_NUM, LEVEL_LABEL, currentLevel, LOG_DIR, MAX_LOG_SIZE, MAX_LOG_DAYS, currentDate, currentLogFile, writeCount, RING_BUFFER_SIZE, ringBuffer, origConsoleLog, origConsoleError, origConsoleWarn, LOG, interceptorInstalled, LOG_PATH, init_logger, NORMAL_TRACE_BUFFER_SIZE, DEV_TRACE_BUFFER_SIZE, DEFAULT_CONFIG2, currentConfig, init_debug_config, DEFAULT_BINDING_CANDIDATES, cachedBinding, cachedBindingError, GhosttyVtTerminalBackend, init_ghostty_vt_backend, TerminalCtor, XtermTerminalBackend, init_xterm_backend, DEFAULT_SCROLLBACK, loggedTerminalBackends, TerminalScreen, init_terminal_screen, init_spawn_env, cachedPty, NodePtyRuntimeTransport, NodePtyTransportFactory, init_pty_transport, buildCliSpawnEnv, init_provider_cli_shared, init_provider_cli_parse, init_provider_cli_config, init_provider_cli_runtime, provider_cli_adapter_exports, ProviderCliAdapter, init_provider_cli_adapter, execFileAsync, DEFAULT_TIMEOUT_MS, DEFAULT_MAX_BUFFER, GitCommandError, DEFAULT_MAX_FILES, DEFAULT_MAX_BYTES, summarizeGitStatus, InMemoryGitSnapshotStore, DEFAULT_GIT_WORKSPACE_POLL_INTERVAL_MS, MIN_GIT_WORKSPACE_POLL_INTERVAL_MS, GitWorkspaceMonitor, GIT_COMMAND_NAMES, SNAPSHOT_REASONS, FAILURE_REASONS, defaultSnapshotStore, defaultGitCommandServices, BUSY_STATUSES, TERMINAL_STATUSES, TurnSnapshotTracker, MAX_WORKSPACES, MAX_ACTIVITY, MAX_SAVED_SESSIONS, DEFAULT_STATE, BUILTIN_IDE_DEFINITIONS, registeredIDEs, LIVE_LIFECYCLES, DEFAULT_ACTIVE_CHAT_POLL_STATUSES, DEFAULT_CHAT_TAIL_RECENT_MESSAGE_GRACE_MS, LIVE_RUNTIME_LIFECYCLES, DaemonCdpManager, CdpDomHandlers, DEFAULT_MONITOR_CONFIG, StatusMonitor, BUILTIN_CHAT_MESSAGE_KINDS, KNOWN_CHAT_MESSAGE_KINDS, CHAT_MESSAGE_KIND_ALIASES, HISTORY_DIR, RETAIN_DAYS, SAVED_HISTORY_INDEX_VERSION, SAVED_HISTORY_INDEX_FILE, SAVED_HISTORY_INDEX_LOCK_SUFFIX, SAVED_HISTORY_INDEX_LOCK_WAIT_MS, SAVED_HISTORY_INDEX_LOCK_STALE_MS, SAVED_HISTORY_INDEX_LOCK_POLL_MS, SAVED_HISTORY_ROLLUP_THRESHOLD_BYTES, savedHistorySessionCache, savedHistoryFileSummaryCache, savedHistoryBackgroundRefresh, savedHistoryRollupInFlight, ChatHistoryWriter, IDE_PROVIDER_SESSION_CAPABILITIES_BASE, EXTENSION_PROVIDER_SESSION_CAPABILITIES_BASE, ExtensionProviderInstance, VALID_STATUSES, VALID_ROLES, VALID_BUBBLE_STATES, VALID_TURN_STATUSES, DEFAULT_APPROVAL_POSITIVE_HINTS, IdeProviderInstance, DEFAULT_CDP_SCAN_INTERVAL_MS, DEFAULT_CDP_DISCOVERY_INTERVAL_MS, DEFAULT_STATUS_INITIAL_REPORT_DELAY_MS, DEFAULT_STATUS_SERVER_REPORT_INTERVAL_MS, DEFAULT_STATUS_P2P_REPORT_INTERVAL_MS, MIN_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, DEFAULT_MACHINE_RUNTIME_SUBSCRIPTION_INTERVAL_MS, MIN_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_DIAGNOSTICS_SUBSCRIPTION_INTERVAL_MS, DEFAULT_SESSION_HOST_READY_TIMEOUT_MS, STANDALONE_CDP_SCAN_INTERVAL_MS, DaemonCdpScanner, DaemonCdpInitializer, WORKING_STATUSES, FULL_STATUS_ACTIVE_CHAT_OPTIONS, LIVE_STATUS_ACTIVE_CHAT_OPTIONS, STATUS_MODAL_MESSAGE_LIMIT, STATUS_MODAL_BUTTON_LIMIT, IDE_SESSION_CAPABILITIES, EXTENSION_SESSION_CAPABILITIES, PTY_SESSION_CAPABILITIES, CLI_CHAT_SESSION_CAPABILITIES, ACP_SESSION_CAPABILITIES, VALID_INPUT_MEDIA_TYPES, globalStore, RECENT_SEND_WINDOW_MS, READ_CHAT_PROVIDER_EVAL_TIMEOUT_MS, recentSendByTarget, DEFAULT_DEBUG_SANITIZE_OPTIONS, SECRET_KEY_PATTERN, KEY_TO_VK, COMMAND_DEBUG_LEVELS, DaemonCommandHandler, CachedDatabaseSync, CliProviderInstance, AcpProviderInstance, chalkModule, chalkApi, COORDINATOR_DELEGATED_ENV_UNSETS, DaemonCliManager, VALID_CAPABILITY_MEDIA_TYPES, KNOWN_PROVIDER_FIELDS, VALUE_CONTROL_TYPES, ProviderLoader, _providerLoader, LOG_DIR2, MAX_FILE_SIZE, MAX_DAYS, SENSITIVE_KEYS, currentDate2, currentFile, writeCount2, SKIP_COMMANDS, DEFAULT_SERVER_NAME, DEFAULT_ADHDEV_MCP_COMMAND, HERMES_CLI_TYPE, HERMES_MCP_CONFIG_PATH, READ_DEBUG_ENABLED, recentReadDebugSignatureBySession, UPGRADE_HELPER_ENV, CHANNEL_NPM_TAG, CHANNEL_SERVER_URL, CHAT_COMMANDS, READ_DEBUG_ENABLED2, DaemonCommandRouter, DaemonStatusReporter, DEFAULT_DAEMON_PORT, DAEMON_WS_PATH, ProviderStreamAdapter, DaemonAgentStreamManager, AgentStreamPoller, ProviderInstanceManager, ARCHIVE_PATH, MAX_ENTRIES_PER_PROVIDER, VersionArchive, DEV_SERVER_PORT, DevServer, SessionHostRuntimeTransport, SessionHostPtyTransportFactory, DEFAULT_SESSION_HOST_APP_NAME, DEFAULT_STANDALONE_SESSION_HOST_APP_NAME, STARTUP_TIMEOUT_MS, STARTUP_POLL_MS, EXTENSION_CATALOG, SessionRegistry;
39853
39820
  var init_dist2 = __esm({
39854
39821
  "../daemon-core/dist/index.mjs"() {
39855
39822
  "use strict";
39856
39823
  path4 = __toESM(require("path"), 1);
39857
39824
  import_promises4 = require("fs/promises");
39858
- import_fs = require("fs");
39825
+ import_fs3 = require("fs");
39859
39826
  import_child_process = require("child_process");
39860
39827
  import_util3 = require("util");
39861
- import_os = require("os");
39828
+ import_os2 = require("os");
39862
39829
  import_path = require("path");
39863
- import_fs2 = require("fs");
39830
+ import_fs4 = require("fs");
39864
39831
  import_crypto2 = require("crypto");
39865
- import_fs3 = require("fs");
39832
+ import_fs5 = require("fs");
39866
39833
  import_path2 = require("path");
39867
39834
  import_crypto3 = require("crypto");
39868
39835
  fs2 = __toESM(require("fs"), 1);
@@ -39878,7 +39845,7 @@ var init_dist2 = __esm({
39878
39845
  init_dist();
39879
39846
  os11 = __toESM(require("os"), 1);
39880
39847
  import_child_process3 = require("child_process");
39881
- import_fs4 = require("fs");
39848
+ import_fs6 = require("fs");
39882
39849
  import_promises5 = require("fs/promises");
39883
39850
  path = __toESM(require("path"), 1);
39884
39851
  import_util4 = require("util");
@@ -39891,16 +39858,16 @@ var init_dist2 = __esm({
39891
39858
  import_crypto4 = require("crypto");
39892
39859
  path6 = __toESM(require("path"), 1);
39893
39860
  path7 = __toESM(require("path"), 1);
39894
- import_fs5 = require("fs");
39861
+ import_fs7 = require("fs");
39895
39862
  import_path3 = require("path");
39896
39863
  import_child_process4 = require("child_process");
39897
- import_fs6 = require("fs");
39898
- import_os2 = require("os");
39864
+ import_fs8 = require("fs");
39865
+ import_os3 = require("os");
39899
39866
  path8 = __toESM(require("path"), 1);
39900
39867
  import_child_process5 = require("child_process");
39901
39868
  os22 = __toESM(require("os"), 1);
39902
39869
  path9 = __toESM(require("path"), 1);
39903
- import_fs7 = require("fs");
39870
+ import_fs9 = require("fs");
39904
39871
  os32 = __toESM(require("os"), 1);
39905
39872
  import_child_process6 = require("child_process");
39906
39873
  init_wrapper();
@@ -39919,7 +39886,7 @@ var init_dist2 = __esm({
39919
39886
  os13 = __toESM(require("os"), 1);
39920
39887
  path17 = __toESM(require("path"), 1);
39921
39888
  crypto4 = __toESM(require("crypto"), 1);
39922
- import_fs8 = require("fs");
39889
+ import_fs10 = require("fs");
39923
39890
  import_child_process7 = require("child_process");
39924
39891
  init_source();
39925
39892
  os12 = __toESM(require("os"), 1);
@@ -39937,13 +39904,13 @@ var init_dist2 = __esm({
39937
39904
  fs7 = __toESM(require("fs"), 1);
39938
39905
  path18 = __toESM(require("path"), 1);
39939
39906
  os14 = __toESM(require("os"), 1);
39940
- init_chokidar();
39907
+ init_esm2();
39941
39908
  fs8 = __toESM(require("fs"), 1);
39942
39909
  path20 = __toESM(require("path"), 1);
39943
39910
  os16 = __toESM(require("os"), 1);
39944
39911
  init_js_yaml();
39945
39912
  import_child_process10 = require("child_process");
39946
- import_fs9 = require("fs");
39913
+ import_fs11 = require("fs");
39947
39914
  import_module2 = require("module");
39948
39915
  os17 = __toESM(require("os"), 1);
39949
39916
  import_path4 = require("path");
@@ -39958,7 +39925,7 @@ var init_dist2 = __esm({
39958
39925
  path222 = __toESM(require("path"), 1);
39959
39926
  os20 = __toESM(require("os"), 1);
39960
39927
  import_child_process13 = require("child_process");
39961
- import_os3 = require("os");
39928
+ import_os4 = require("os");
39962
39929
  http2 = __toESM(require("http"), 1);
39963
39930
  fs15 = __toESM(require("fs"), 1);
39964
39931
  path26 = __toESM(require("path"), 1);
@@ -42028,7 +41995,14 @@ ${lastSnapshot}`;
42028
41995
  })() : null;
42029
41996
  const parsedSessionStatus = typeof parsedStatusBeforeSend?.status === "string" ? String(parsedStatusBeforeSend.status) : "";
42030
41997
  if (!allowInputDuringGeneration && (parsedSessionStatus === "generating" || parsedSessionStatus === "long_generating")) {
42031
- throw new Error(`${this.cliName} is still processing the previous prompt`);
41998
+ const parsedModal = parsedStatusBeforeSend?.activeModal ?? parsedStatusBeforeSend?.modal ?? null;
41999
+ const parsedHasActionableModal = Boolean(
42000
+ parsedModal && Array.isArray(parsedModal.buttons) && parsedModal.buttons.some((candidate) => typeof candidate === "string" && candidate.trim())
42001
+ );
42002
+ const terminalLooksIdle = this.currentStatus === "idle" && this.runDetectStatus(this.recentOutputBuffer) === "idle" && !this.isWaitingForResponse && !this.currentTurnScope && !this.hasActionableApproval() && !parsedHasActionableModal;
42003
+ if (!terminalLooksIdle) {
42004
+ throw new Error(`${this.cliName} is still processing the previous prompt`);
42005
+ }
42032
42006
  }
42033
42007
  if (this.isWaitingForResponse && !allowInputDuringGeneration) {
42034
42008
  if (!this.clearStaleIdleResponseGuard("send_message_guard")) {
@@ -53387,7 +53361,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
53387
53361
  entries.push({
53388
53362
  version: version2,
53389
53363
  detectedAt: (/* @__PURE__ */ new Date()).toISOString(),
53390
- os: (0, import_os3.platform)()
53364
+ os: (0, import_os4.platform)()
53391
53365
  });
53392
53366
  if (entries.length > MAX_ENTRIES_PER_PROVIDER) {
53393
53367
  this.history[type2] = entries.slice(-MAX_ENTRIES_PER_PROVIDER);
@@ -57484,9 +57458,14 @@ async function meshCheckpoint(ctx, args) {
57484
57458
  async function meshApprove(ctx, args) {
57485
57459
  const node = await findNodeWithRefresh(ctx, args.node_id);
57486
57460
  if (isLocalTransport(ctx.transport)) {
57461
+ const cached2 = meshSessionProviderMetadata.get(meshSessionCacheKey(args.node_id, args.session_id));
57462
+ const providerSessionId = cached2?.providerSessionId;
57487
57463
  const result = await commandForNode(ctx, node, "resolve_action", {
57488
57464
  sessionId: args.session_id,
57489
57465
  targetSessionId: args.session_id,
57466
+ workspace: node.workspace,
57467
+ ...cached2?.providerType ? { agentType: cached2.providerType, providerType: cached2.providerType } : {},
57468
+ ...providerSessionId ? { providerSessionId } : {},
57490
57469
  action: args.action === "reject" ? "reject" : "approve"
57491
57470
  });
57492
57471
  return JSON.stringify(result, null, 2);
@@ -57961,7 +57940,7 @@ startMcpServer(parseArgs(process.argv)).catch((err) => {
57961
57940
  });
57962
57941
  /*! Bundled license information:
57963
57942
 
57964
- chokidar/index.js:
57943
+ chokidar/esm/index.js:
57965
57944
  (*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
57966
57945
 
57967
57946
  js-yaml/dist/js-yaml.mjs: