omnius 1.0.145 → 1.0.146

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1421,8 +1421,8 @@ async function vramSnapshotPerDevice() {
1421
1421
  if (_nvSmiAvailable === false)
1422
1422
  return [];
1423
1423
  try {
1424
- const out = await new Promise((resolve55, reject) => {
1425
- exec("nvidia-smi --query-gpu=index,uuid,memory.total,memory.used,memory.free --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => err ? reject(err) : resolve55(stdout));
1424
+ const out = await new Promise((resolve56, reject) => {
1425
+ exec("nvidia-smi --query-gpu=index,uuid,memory.total,memory.used,memory.free --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => err ? reject(err) : resolve56(stdout));
1426
1426
  });
1427
1427
  _nvSmiAvailable = true;
1428
1428
  const devices = [];
@@ -2174,7 +2174,7 @@ var init_model_broker = __esm({
2174
2174
  this._reservedBySession.set(spec.sessionKey, slot.info.id);
2175
2175
  return Promise.resolve(slot);
2176
2176
  }
2177
- return new Promise((resolve55, reject) => {
2177
+ return new Promise((resolve56, reject) => {
2178
2178
  if (this._slotQueue.length >= this.queueCapacity) {
2179
2179
  const newPrio = spec.priority ?? 0;
2180
2180
  let victim = -1;
@@ -2202,7 +2202,7 @@ var init_model_broker = __esm({
2202
2202
  return;
2203
2203
  }
2204
2204
  }
2205
- const entry = { spec, resolve: resolve55, reject, enqueuedAt: Date.now() };
2205
+ const entry = { spec, resolve: resolve56, reject, enqueuedAt: Date.now() };
2206
2206
  if (spec.signal) {
2207
2207
  const onAbort = () => {
2208
2208
  const idx = this._slotQueue.indexOf(entry);
@@ -4322,8 +4322,8 @@ var init_shell = __esm({
4322
4322
  yield pending2.shift();
4323
4323
  continue;
4324
4324
  }
4325
- await new Promise((resolve55) => {
4326
- wake = resolve55;
4325
+ await new Promise((resolve56) => {
4326
+ wake = resolve56;
4327
4327
  });
4328
4328
  }
4329
4329
  if (finalError)
@@ -4415,7 +4415,7 @@ exit $__omnius_exit
4415
4415
  }
4416
4416
  const shellBin = isWin2 ? "cmd.exe" : "bash";
4417
4417
  const shellArgs = isWin2 ? ["/d", "/s", "/c", wrappedCommand] : ["-c", wrappedCommand];
4418
- return new Promise((resolve55) => {
4418
+ return new Promise((resolve56) => {
4419
4419
  const child = spawn(shellBin, shellArgs, {
4420
4420
  cwd: this.currentCwd,
4421
4421
  env: {
@@ -4471,7 +4471,7 @@ exit $__omnius_exit
4471
4471
  if (exitFlushTimer)
4472
4472
  clearTimeout(exitFlushTimer);
4473
4473
  captureFinalCwd();
4474
- resolve55(result);
4474
+ resolve56(result);
4475
4475
  };
4476
4476
  const timer = setTimeout(() => {
4477
4477
  killed = true;
@@ -6948,7 +6948,7 @@ ${JSON.stringify(extracted, null, 2)}`);
6948
6948
  return null;
6949
6949
  }
6950
6950
  runProcess(cmd, args, timeoutMs) {
6951
- return new Promise((resolve55, reject) => {
6951
+ return new Promise((resolve56, reject) => {
6952
6952
  const proc = execFile3(cmd, args, {
6953
6953
  timeout: timeoutMs,
6954
6954
  maxBuffer: 10 * 1024 * 1024,
@@ -6958,7 +6958,7 @@ ${JSON.stringify(extracted, null, 2)}`);
6958
6958
  reject(new Error(`Process timeout after ${timeoutMs}ms`));
6959
6959
  return;
6960
6960
  }
6961
- resolve55({
6961
+ resolve56({
6962
6962
  stdout: String(stdout),
6963
6963
  stderr: String(stderr),
6964
6964
  exitCode: error ? error.code ?? 1 : 0
@@ -7978,7 +7978,7 @@ function findPython() {
7978
7978
  }
7979
7979
  function runCarbonylPython(args, timeoutMs) {
7980
7980
  const py = venvPython(CARBONYL_VENV);
7981
- return new Promise((resolve55, reject) => {
7981
+ return new Promise((resolve56, reject) => {
7982
7982
  const child = spawn2(py, ["-c", CARBONYL_DRIVER_PY], {
7983
7983
  stdio: ["pipe", "pipe", "pipe"],
7984
7984
  env: { ...process.env, PYTHONUNBUFFERED: "1" }
@@ -8006,7 +8006,7 @@ function runCarbonylPython(args, timeoutMs) {
8006
8006
  clearTimeout(timer);
8007
8007
  const text = stdout.trim().split("\n").pop() ?? "";
8008
8008
  try {
8009
- resolve55(JSON.parse(text));
8009
+ resolve56(JSON.parse(text));
8010
8010
  } catch {
8011
8011
  reject(new Error((stderr || stdout || "carbonyl_browser returned no JSON").slice(0, 2e3)));
8012
8012
  }
@@ -8828,8 +8828,8 @@ async function withTopicLock(topicFile, fn) {
8828
8828
  const prev = _writeLocks.get(topicFile) ?? Promise.resolve();
8829
8829
  let release = () => {
8830
8830
  };
8831
- const current = new Promise((resolve55) => {
8832
- release = resolve55;
8831
+ const current = new Promise((resolve56) => {
8832
+ release = resolve56;
8833
8833
  });
8834
8834
  _writeLocks.set(topicFile, prev.then(() => current));
8835
8835
  try {
@@ -19266,7 +19266,7 @@ var init_custom_tool = __esm({
19266
19266
  }
19267
19267
  /** Execute a single shell command and return output */
19268
19268
  runCommand(command) {
19269
- return new Promise((resolve55) => {
19269
+ return new Promise((resolve56) => {
19270
19270
  const child = spawn5("bash", ["-c", command], {
19271
19271
  cwd: this.workingDir,
19272
19272
  env: { ...process.env, CI: "true", NO_COLOR: "1" },
@@ -19291,11 +19291,11 @@ var init_custom_tool = __esm({
19291
19291
  child.kill("SIGTERM");
19292
19292
  } catch {
19293
19293
  }
19294
- resolve55({ success: false, output: stdout, error: "Command timed out after 60s" });
19294
+ resolve56({ success: false, output: stdout, error: "Command timed out after 60s" });
19295
19295
  }, 6e4);
19296
19296
  child.on("close", (code8) => {
19297
19297
  clearTimeout(timer);
19298
- resolve55({
19298
+ resolve56({
19299
19299
  success: code8 === 0,
19300
19300
  output: stdout + (stderr && code8 === 0 ? `
19301
19301
  STDERR:
@@ -19305,7 +19305,7 @@ ${stderr}` : ""),
19305
19305
  });
19306
19306
  child.on("error", (err) => {
19307
19307
  clearTimeout(timer);
19308
- resolve55({ success: false, output: stdout, error: err.message });
19308
+ resolve56({ success: false, output: stdout, error: err.message });
19309
19309
  });
19310
19310
  });
19311
19311
  }
@@ -21427,7 +21427,7 @@ import { writeFile as writeFile9, mkdtemp, rm as rm2, readdir as readdir4, stat
21427
21427
  import { join as join30 } from "node:path";
21428
21428
  import { tmpdir as tmpdir4 } from "node:os";
21429
21429
  function runProcess(cmd, args, options2) {
21430
- return new Promise((resolve55) => {
21430
+ return new Promise((resolve56) => {
21431
21431
  const proc = spawn6(cmd, args, {
21432
21432
  cwd: options2.cwd,
21433
21433
  timeout: options2.timeout,
@@ -21459,7 +21459,7 @@ function runProcess(cmd, args, options2) {
21459
21459
  proc.on("error", (err) => {
21460
21460
  const errCode2 = err.code || "";
21461
21461
  const reason = errCode2 === "ENOENT" ? `interpreter "${cmd}" not found in PATH — install it or use a different language` : errCode2 === "EACCES" ? `interpreter "${cmd}" exists but is not executable (check permissions)` : err.message;
21462
- resolve55({
21462
+ resolve56({
21463
21463
  stdout,
21464
21464
  stderr: stderr || `[spawn error] ${reason}`,
21465
21465
  exitCode: 1,
@@ -21471,7 +21471,7 @@ function runProcess(cmd, args, options2) {
21471
21471
  if (signal === "SIGTERM" || signal === "SIGKILL") {
21472
21472
  timedOut = true;
21473
21473
  }
21474
- resolve55({
21474
+ resolve56({
21475
21475
  stdout,
21476
21476
  stderr,
21477
21477
  exitCode: code8 ?? (timedOut ? 124 : 1),
@@ -31517,8 +31517,8 @@ var init_multiaddr = __esm({
31517
31517
  // ../node_modules/p-defer/index.js
31518
31518
  function pDefer() {
31519
31519
  const deferred = {};
31520
- deferred.promise = new Promise((resolve55, reject) => {
31521
- deferred.resolve = resolve55;
31520
+ deferred.promise = new Promise((resolve56, reject) => {
31521
+ deferred.resolve = resolve56;
31522
31522
  deferred.reject = reject;
31523
31523
  });
31524
31524
  return deferred;
@@ -31650,12 +31650,12 @@ function _pushable(getNext, options2) {
31650
31650
  if (ended) {
31651
31651
  return { done: true };
31652
31652
  }
31653
- return await new Promise((resolve55, reject) => {
31653
+ return await new Promise((resolve56, reject) => {
31654
31654
  onNext = (next) => {
31655
31655
  onNext = null;
31656
31656
  buffer2.push(next);
31657
31657
  try {
31658
- resolve55(getNext(buffer2));
31658
+ resolve56(getNext(buffer2));
31659
31659
  } catch (err) {
31660
31660
  reject(err);
31661
31661
  }
@@ -31731,7 +31731,7 @@ function _pushable(getNext, options2) {
31731
31731
  let cancel;
31732
31732
  let listener;
31733
31733
  if (signal != null) {
31734
- cancel = new Promise((resolve55, reject) => {
31734
+ cancel = new Promise((resolve56, reject) => {
31735
31735
  listener = () => {
31736
31736
  reject(new AbortError2());
31737
31737
  };
@@ -31823,7 +31823,7 @@ function pTimeout(promise, options2) {
31823
31823
  } = options2;
31824
31824
  let timer;
31825
31825
  let abortHandler;
31826
- const wrappedPromise = new Promise((resolve55, reject) => {
31826
+ const wrappedPromise = new Promise((resolve56, reject) => {
31827
31827
  if (typeof milliseconds !== "number" || Math.sign(milliseconds) !== 1) {
31828
31828
  throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${milliseconds}\``);
31829
31829
  }
@@ -31837,7 +31837,7 @@ function pTimeout(promise, options2) {
31837
31837
  };
31838
31838
  signal.addEventListener("abort", abortHandler, { once: true });
31839
31839
  }
31840
- promise.then(resolve55, reject);
31840
+ promise.then(resolve56, reject);
31841
31841
  if (milliseconds === Number.POSITIVE_INFINITY) {
31842
31842
  return;
31843
31843
  }
@@ -31845,7 +31845,7 @@ function pTimeout(promise, options2) {
31845
31845
  timer = customTimers.setTimeout.call(void 0, () => {
31846
31846
  if (fallback) {
31847
31847
  try {
31848
- resolve55(fallback());
31848
+ resolve56(fallback());
31849
31849
  } catch (error) {
31850
31850
  reject(error);
31851
31851
  }
@@ -31855,7 +31855,7 @@ function pTimeout(promise, options2) {
31855
31855
  promise.cancel();
31856
31856
  }
31857
31857
  if (message2 === false) {
31858
- resolve55();
31858
+ resolve56();
31859
31859
  } else if (message2 instanceof Error) {
31860
31860
  reject(message2);
31861
31861
  } else {
@@ -31893,7 +31893,7 @@ var init_p_timeout = __esm({
31893
31893
  // ../node_modules/p-event/index.js
31894
31894
  function pEventMultiple(emitter, event, options2) {
31895
31895
  let cancel;
31896
- const returnValue = new Promise((resolve55, reject) => {
31896
+ const returnValue = new Promise((resolve56, reject) => {
31897
31897
  options2 = {
31898
31898
  rejectionEvents: ["error"],
31899
31899
  multiArgs: false,
@@ -31924,7 +31924,7 @@ function pEventMultiple(emitter, event, options2) {
31924
31924
  items.push(value2);
31925
31925
  if (options2.count === items.length) {
31926
31926
  cancel();
31927
- resolve55(items);
31927
+ resolve56(items);
31928
31928
  }
31929
31929
  };
31930
31930
  const rejectHandler = (...arguments_) => {
@@ -31955,7 +31955,7 @@ function pEventMultiple(emitter, event, options2) {
31955
31955
  }, { once: true });
31956
31956
  }
31957
31957
  if (options2.resolveImmediately) {
31958
- resolve55(items);
31958
+ resolve56(items);
31959
31959
  }
31960
31960
  });
31961
31961
  returnValue.cancel = cancel;
@@ -32082,7 +32082,7 @@ async function raceSignal(promise, signal, opts) {
32082
32082
  try {
32083
32083
  return await Promise.race([
32084
32084
  promise,
32085
- new Promise((resolve55, reject) => {
32085
+ new Promise((resolve56, reject) => {
32086
32086
  listener = () => {
32087
32087
  reject(translateError(signal));
32088
32088
  };
@@ -37815,10 +37815,10 @@ function createDelay({ clearTimeout: defaultClear, setTimeout: defaultSet } = {}
37815
37815
  signal.removeEventListener("abort", signalListener);
37816
37816
  }
37817
37817
  };
37818
- const delayPromise = new Promise((resolve55, reject) => {
37818
+ const delayPromise = new Promise((resolve56, reject) => {
37819
37819
  settle = () => {
37820
37820
  cleanup();
37821
- resolve55(value2);
37821
+ resolve56(value2);
37822
37822
  };
37823
37823
  rejectFunction = reject;
37824
37824
  timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);
@@ -39283,7 +39283,7 @@ async function raceEvent(emitter, eventName, signal, opts) {
39283
39283
  if (signal?.aborted === true) {
39284
39284
  return Promise.reject(error);
39285
39285
  }
39286
- return new Promise((resolve55, reject) => {
39286
+ return new Promise((resolve56, reject) => {
39287
39287
  function removeListeners() {
39288
39288
  removeListener(signal, "abort", abortListener);
39289
39289
  removeListener(emitter, eventName, eventListener);
@@ -39300,7 +39300,7 @@ async function raceEvent(emitter, eventName, signal, opts) {
39300
39300
  return;
39301
39301
  }
39302
39302
  removeListeners();
39303
- resolve55(evt);
39303
+ resolve56(evt);
39304
39304
  };
39305
39305
  const errorEventListener = (evt) => {
39306
39306
  removeListeners();
@@ -39807,7 +39807,7 @@ var init_channel = __esm({
39807
39807
  name: requestEvent.name,
39808
39808
  identifier: requestEvent.identifier
39809
39809
  });
39810
- await new Promise((resolve55) => {
39810
+ await new Promise((resolve56) => {
39811
39811
  const releaseEventListener = (event2) => {
39812
39812
  if (event2?.data == null) {
39813
39813
  return;
@@ -39819,7 +39819,7 @@ var init_channel = __esm({
39819
39819
  };
39820
39820
  if (releaseEvent.type === releaseType && releaseEvent.identifier === requestEvent.identifier) {
39821
39821
  channel.removeEventListener("message", releaseEventListener);
39822
- resolve55();
39822
+ resolve56();
39823
39823
  }
39824
39824
  };
39825
39825
  channel.addEventListener("message", releaseEventListener);
@@ -39881,11 +39881,11 @@ var init_cluster = __esm({
39881
39881
  name: requestEvent.name,
39882
39882
  identifier: requestEvent.identifier
39883
39883
  });
39884
- await new Promise((resolve55) => {
39884
+ await new Promise((resolve56) => {
39885
39885
  const releaseEventListener = (releaseEvent) => {
39886
39886
  if (releaseEvent.type === releaseType && releaseEvent.identifier === requestEvent.identifier) {
39887
39887
  worker2.removeListener("message", releaseEventListener);
39888
- resolve55();
39888
+ resolve56();
39889
39889
  }
39890
39890
  };
39891
39891
  worker2.on("message", releaseEventListener);
@@ -39970,7 +39970,7 @@ var init_channel2 = __esm({
39970
39970
  identifier: id,
39971
39971
  name: this.name
39972
39972
  });
39973
- return new Promise((resolve55, reject) => {
39973
+ return new Promise((resolve56, reject) => {
39974
39974
  const abortListener = () => {
39975
39975
  this.channel.postMessage({
39976
39976
  type: abortType,
@@ -39988,7 +39988,7 @@ var init_channel2 = __esm({
39988
39988
  if (event.data?.type === grantType) {
39989
39989
  this.channel.removeEventListener("message", listener);
39990
39990
  options2?.signal?.removeEventListener("abort", abortListener);
39991
- resolve55(() => {
39991
+ resolve56(() => {
39992
39992
  this.channel.postMessage({
39993
39993
  type: releaseType,
39994
39994
  identifier: id,
@@ -40053,7 +40053,7 @@ var init_cluster2 = __esm({
40053
40053
  identifier: id,
40054
40054
  name: this.name
40055
40055
  });
40056
- return new Promise((resolve55, reject) => {
40056
+ return new Promise((resolve56, reject) => {
40057
40057
  const abortListener = () => {
40058
40058
  process.send?.({
40059
40059
  type: abortType,
@@ -40071,7 +40071,7 @@ var init_cluster2 = __esm({
40071
40071
  if (event.type === grantType) {
40072
40072
  process.removeListener("message", listener);
40073
40073
  options2?.signal?.removeEventListener("abort", abortListener);
40074
- resolve55(() => {
40074
+ resolve56(() => {
40075
40075
  process.send?.({
40076
40076
  type: releaseType,
40077
40077
  identifier: id,
@@ -40220,8 +40220,8 @@ function getImplementation(opts) {
40220
40220
  async function createReleasable(queue, options2) {
40221
40221
  let res;
40222
40222
  let rej;
40223
- const p2 = new Promise((resolve55, reject) => {
40224
- res = resolve55;
40223
+ const p2 = new Promise((resolve56, reject) => {
40224
+ res = resolve56;
40225
40225
  rej = reject;
40226
40226
  });
40227
40227
  const listener = () => {
@@ -40231,10 +40231,10 @@ async function createReleasable(queue, options2) {
40231
40231
  once: true
40232
40232
  });
40233
40233
  queue.add(async () => {
40234
- await new Promise((resolve55) => {
40234
+ await new Promise((resolve56) => {
40235
40235
  res(() => {
40236
40236
  options2?.signal?.removeEventListener("abort", listener);
40237
- resolve55();
40237
+ resolve56();
40238
40238
  });
40239
40239
  });
40240
40240
  }, {
@@ -47946,7 +47946,7 @@ var init_dist3 = __esm({
47946
47946
  // Assign unique ID if not provided
47947
47947
  id: options2.id ?? (this.#idAssigner++).toString()
47948
47948
  };
47949
- return new Promise((resolve55, reject) => {
47949
+ return new Promise((resolve56, reject) => {
47950
47950
  const taskSymbol = /* @__PURE__ */ Symbol(`task-${options2.id}`);
47951
47951
  this.#queue.enqueue(async () => {
47952
47952
  this.#pending++;
@@ -47984,7 +47984,7 @@ var init_dist3 = __esm({
47984
47984
  })]);
47985
47985
  }
47986
47986
  const result = await operation;
47987
- resolve55(result);
47987
+ resolve56(result);
47988
47988
  this.emit("completed", result);
47989
47989
  } catch (error) {
47990
47990
  reject(error);
@@ -48141,13 +48141,13 @@ var init_dist3 = __esm({
48141
48141
  });
48142
48142
  }
48143
48143
  async #onEvent(event, filter2) {
48144
- return new Promise((resolve55) => {
48144
+ return new Promise((resolve56) => {
48145
48145
  const listener = () => {
48146
48146
  if (filter2 && !filter2()) {
48147
48147
  return;
48148
48148
  }
48149
48149
  this.off(event, listener);
48150
- resolve55();
48150
+ resolve56();
48151
48151
  };
48152
48152
  this.on(event, listener);
48153
48153
  });
@@ -53283,7 +53283,7 @@ async function onAttemptFailure({ error, attemptNumber, retriesConsumed, startTi
53283
53283
  const finalDelay = Math.min(delayTime, remainingTime);
53284
53284
  options2.signal?.throwIfAborted();
53285
53285
  if (finalDelay > 0) {
53286
- await new Promise((resolve55, reject) => {
53286
+ await new Promise((resolve56, reject) => {
53287
53287
  const onAbort = () => {
53288
53288
  clearTimeout(timeoutToken);
53289
53289
  options2.signal?.removeEventListener("abort", onAbort);
@@ -53291,7 +53291,7 @@ async function onAttemptFailure({ error, attemptNumber, retriesConsumed, startTi
53291
53291
  };
53292
53292
  const timeoutToken = setTimeout(() => {
53293
53293
  options2.signal?.removeEventListener("abort", onAbort);
53294
- resolve55();
53294
+ resolve56();
53295
53295
  }, finalDelay);
53296
53296
  if (options2.unref) {
53297
53297
  timeoutToken.unref?.();
@@ -55368,12 +55368,12 @@ var init_connection2 = __esm({
55368
55368
  for (let i2 = 0; i2 < middleware.length; i2++) {
55369
55369
  const mw = middleware[i2];
55370
55370
  stream.log.trace("running middleware", i2, mw);
55371
- await new Promise((resolve55, reject) => {
55371
+ await new Promise((resolve56, reject) => {
55372
55372
  try {
55373
55373
  const result = mw(stream, connection, (s2, c8) => {
55374
55374
  stream = s2;
55375
55375
  connection = c8;
55376
- resolve55();
55376
+ resolve56();
55377
55377
  });
55378
55378
  if (result instanceof Promise) {
55379
55379
  result.catch(reject);
@@ -60372,7 +60372,7 @@ async function randomDelay() {
60372
60372
  const min = 200;
60373
60373
  const max = 1e3;
60374
60374
  const delay3 = Math.random() * (max - min) + min;
60375
- await new Promise((resolve55) => setTimeout(resolve55, delay3));
60375
+ await new Promise((resolve56) => setTimeout(resolve56, delay3));
60376
60376
  }
60377
60377
  function DsName(name10) {
60378
60378
  return new Key(keyPrefix + name10);
@@ -67428,11 +67428,11 @@ function __metadata(metadataKey, metadataValue) {
67428
67428
  }
67429
67429
  function __awaiter(thisArg, _arguments, P2, generator) {
67430
67430
  function adopt(value2) {
67431
- return value2 instanceof P2 ? value2 : new P2(function(resolve55) {
67432
- resolve55(value2);
67431
+ return value2 instanceof P2 ? value2 : new P2(function(resolve56) {
67432
+ resolve56(value2);
67433
67433
  });
67434
67434
  }
67435
- return new (P2 || (P2 = Promise))(function(resolve55, reject) {
67435
+ return new (P2 || (P2 = Promise))(function(resolve56, reject) {
67436
67436
  function fulfilled(value2) {
67437
67437
  try {
67438
67438
  step(generator.next(value2));
@@ -67448,7 +67448,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
67448
67448
  }
67449
67449
  }
67450
67450
  function step(result) {
67451
- result.done ? resolve55(result.value) : adopt(result.value).then(fulfilled, rejected);
67451
+ result.done ? resolve56(result.value) : adopt(result.value).then(fulfilled, rejected);
67452
67452
  }
67453
67453
  step((generator = generator.apply(thisArg, _arguments || [])).next());
67454
67454
  });
@@ -67639,14 +67639,14 @@ function __asyncValues(o2) {
67639
67639
  }, i2);
67640
67640
  function verb(n2) {
67641
67641
  i2[n2] = o2[n2] && function(v) {
67642
- return new Promise(function(resolve55, reject) {
67643
- v = o2[n2](v), settle(resolve55, reject, v.done, v.value);
67642
+ return new Promise(function(resolve56, reject) {
67643
+ v = o2[n2](v), settle(resolve56, reject, v.done, v.value);
67644
67644
  });
67645
67645
  };
67646
67646
  }
67647
- function settle(resolve55, reject, d2, v) {
67647
+ function settle(resolve56, reject, d2, v) {
67648
67648
  Promise.resolve(v).then(function(v2) {
67649
- resolve55({ value: v2, done: d2 });
67649
+ resolve56({ value: v2, done: d2 });
67650
67650
  }, reject);
67651
67651
  }
67652
67652
  }
@@ -73174,11 +73174,11 @@ function __metadata2(metadataKey, metadataValue) {
73174
73174
  }
73175
73175
  function __awaiter2(thisArg, _arguments, P2, generator) {
73176
73176
  function adopt(value2) {
73177
- return value2 instanceof P2 ? value2 : new P2(function(resolve55) {
73178
- resolve55(value2);
73177
+ return value2 instanceof P2 ? value2 : new P2(function(resolve56) {
73178
+ resolve56(value2);
73179
73179
  });
73180
73180
  }
73181
- return new (P2 || (P2 = Promise))(function(resolve55, reject) {
73181
+ return new (P2 || (P2 = Promise))(function(resolve56, reject) {
73182
73182
  function fulfilled(value2) {
73183
73183
  try {
73184
73184
  step(generator.next(value2));
@@ -73194,7 +73194,7 @@ function __awaiter2(thisArg, _arguments, P2, generator) {
73194
73194
  }
73195
73195
  }
73196
73196
  function step(result) {
73197
- result.done ? resolve55(result.value) : adopt(result.value).then(fulfilled, rejected);
73197
+ result.done ? resolve56(result.value) : adopt(result.value).then(fulfilled, rejected);
73198
73198
  }
73199
73199
  step((generator = generator.apply(thisArg, _arguments || [])).next());
73200
73200
  });
@@ -73372,14 +73372,14 @@ function __asyncValues2(o2) {
73372
73372
  }, i2);
73373
73373
  function verb(n2) {
73374
73374
  i2[n2] = o2[n2] && function(v) {
73375
- return new Promise(function(resolve55, reject) {
73376
- v = o2[n2](v), settle(resolve55, reject, v.done, v.value);
73375
+ return new Promise(function(resolve56, reject) {
73376
+ v = o2[n2](v), settle(resolve56, reject, v.done, v.value);
73377
73377
  });
73378
73378
  };
73379
73379
  }
73380
- function settle(resolve55, reject, d2, v) {
73380
+ function settle(resolve56, reject, d2, v) {
73381
73381
  Promise.resolve(v).then(function(v2) {
73382
- resolve55({ value: v2, done: d2 });
73382
+ resolve56({ value: v2, done: d2 });
73383
73383
  }, reject);
73384
73384
  }
73385
73385
  }
@@ -91789,10 +91789,10 @@ var require_axios = __commonJS({
91789
91789
  }
91790
91790
  };
91791
91791
  var CanceledError$1 = CanceledError;
91792
- function settle(resolve55, reject, response) {
91792
+ function settle(resolve56, reject, response) {
91793
91793
  const validateStatus = response.config.validateStatus;
91794
91794
  if (!response.status || !validateStatus || validateStatus(response.status)) {
91795
- resolve55(response);
91795
+ resolve56(response);
91796
91796
  } else {
91797
91797
  reject(
91798
91798
  new AxiosError$1(
@@ -92384,7 +92384,7 @@ var require_axios = __commonJS({
92384
92384
  }
92385
92385
  var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
92386
92386
  var wrapAsync = (asyncExecutor) => {
92387
- return new Promise((resolve55, reject) => {
92387
+ return new Promise((resolve56, reject) => {
92388
92388
  let onDone;
92389
92389
  let isDone;
92390
92390
  const done = (value2, isRejected) => {
@@ -92394,7 +92394,7 @@ var require_axios = __commonJS({
92394
92394
  };
92395
92395
  const _resolve = (value2) => {
92396
92396
  done(value2);
92397
- resolve55(value2);
92397
+ resolve56(value2);
92398
92398
  };
92399
92399
  const _reject = (reason) => {
92400
92400
  done(reason, true);
@@ -92441,7 +92441,7 @@ var require_axios = __commonJS({
92441
92441
  }
92442
92442
  };
92443
92443
  var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
92444
- return wrapAsync(async function dispatchHttpRequest(resolve55, reject, onDone) {
92444
+ return wrapAsync(async function dispatchHttpRequest(resolve56, reject, onDone) {
92445
92445
  let { data, lookup, family, httpVersion = 1, http2Options } = config;
92446
92446
  const { responseType, responseEncoding } = config;
92447
92447
  const method = config.method.toUpperCase();
@@ -92531,7 +92531,7 @@ var require_axios = __commonJS({
92531
92531
  }
92532
92532
  let convertedData;
92533
92533
  if (method !== "GET") {
92534
- return settle(resolve55, reject, {
92534
+ return settle(resolve56, reject, {
92535
92535
  status: 405,
92536
92536
  statusText: "method not allowed",
92537
92537
  headers: {},
@@ -92553,7 +92553,7 @@ var require_axios = __commonJS({
92553
92553
  } else if (responseType === "stream") {
92554
92554
  convertedData = stream__default["default"].Readable.from(convertedData);
92555
92555
  }
92556
- return settle(resolve55, reject, {
92556
+ return settle(resolve56, reject, {
92557
92557
  data: convertedData,
92558
92558
  status: 200,
92559
92559
  statusText: "OK",
@@ -92794,7 +92794,7 @@ var require_axios = __commonJS({
92794
92794
  };
92795
92795
  if (responseType === "stream") {
92796
92796
  response.data = responseStream;
92797
- settle(resolve55, reject, response);
92797
+ settle(resolve56, reject, response);
92798
92798
  } else {
92799
92799
  const responseBuffer = [];
92800
92800
  let totalResponseBytes = 0;
@@ -92844,7 +92844,7 @@ var require_axios = __commonJS({
92844
92844
  } catch (err) {
92845
92845
  return reject(AxiosError$1.from(err, null, config, response.request, response));
92846
92846
  }
92847
- settle(resolve55, reject, response);
92847
+ settle(resolve56, reject, response);
92848
92848
  });
92849
92849
  }
92850
92850
  abortEmitter.once("abort", (err) => {
@@ -93094,7 +93094,7 @@ var require_axios = __commonJS({
93094
93094
  };
93095
93095
  var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
93096
93096
  var xhrAdapter = isXHRAdapterSupported && function(config) {
93097
- return new Promise(function dispatchXhrRequest(resolve55, reject) {
93097
+ return new Promise(function dispatchXhrRequest(resolve56, reject) {
93098
93098
  const _config3 = resolveConfig(config);
93099
93099
  let requestData = _config3.data;
93100
93100
  const requestHeaders = AxiosHeaders$1.from(_config3.headers).normalize();
@@ -93129,7 +93129,7 @@ var require_axios = __commonJS({
93129
93129
  };
93130
93130
  settle(
93131
93131
  function _resolve(value2) {
93132
- resolve55(value2);
93132
+ resolve56(value2);
93133
93133
  done();
93134
93134
  },
93135
93135
  function _reject(err) {
@@ -93521,8 +93521,8 @@ var require_axios = __commonJS({
93521
93521
  config
93522
93522
  );
93523
93523
  !isStreamResponse && unsubscribe && unsubscribe();
93524
- return await new Promise((resolve55, reject) => {
93525
- settle(resolve55, reject, {
93524
+ return await new Promise((resolve56, reject) => {
93525
+ settle(resolve56, reject, {
93526
93526
  data: responseData,
93527
93527
  headers: AxiosHeaders$1.from(response.headers),
93528
93528
  status: response.status,
@@ -93926,8 +93926,8 @@ var require_axios = __commonJS({
93926
93926
  throw new TypeError("executor must be a function.");
93927
93927
  }
93928
93928
  let resolvePromise;
93929
- this.promise = new Promise(function promiseExecutor(resolve55) {
93930
- resolvePromise = resolve55;
93929
+ this.promise = new Promise(function promiseExecutor(resolve56) {
93930
+ resolvePromise = resolve56;
93931
93931
  });
93932
93932
  const token = this;
93933
93933
  this.promise.then((cancel) => {
@@ -93940,9 +93940,9 @@ var require_axios = __commonJS({
93940
93940
  });
93941
93941
  this.promise.then = (onfulfilled) => {
93942
93942
  let _resolve;
93943
- const promise = new Promise((resolve55) => {
93944
- token.subscribe(resolve55);
93945
- _resolve = resolve55;
93943
+ const promise = new Promise((resolve56) => {
93944
+ token.subscribe(resolve56);
93945
+ _resolve = resolve56;
93946
93946
  }).then(onfulfilled);
93947
93947
  promise.cancel = function reject() {
93948
93948
  token.unsubscribe(_resolve);
@@ -94170,8 +94170,8 @@ var require_util = __commonJS({
94170
94170
  }
94171
94171
  const duration = backoff.duration();
94172
94172
  log22(`Promise rejected attempt #${backoff.attempts}, retrying in ${duration}ms: ${e2.message}`);
94173
- await new Promise((resolve55) => {
94174
- setTimeout(resolve55, duration);
94173
+ await new Promise((resolve56) => {
94174
+ setTimeout(resolve56, duration);
94175
94175
  });
94176
94176
  return retryPromise(fn, attempts, backoff);
94177
94177
  }
@@ -94276,7 +94276,7 @@ var require_util = __commonJS({
94276
94276
  return resolver;
94277
94277
  }
94278
94278
  async function retrieveTlsAlpnCertificate(host, port, timeout2 = 3e4) {
94279
- return new Promise((resolve55, reject) => {
94279
+ return new Promise((resolve56, reject) => {
94280
94280
  let result;
94281
94281
  const socket = tls2.connect({
94282
94282
  host,
@@ -94299,7 +94299,7 @@ var require_util = __commonJS({
94299
94299
  });
94300
94300
  socket.on("end", () => {
94301
94301
  if (result) {
94302
- return resolve55(result.toString());
94302
+ return resolve56(result.toString());
94303
94303
  }
94304
94304
  return reject(new Error("TLS ALPN lookup failed to retrieve certificate"));
94305
94305
  });
@@ -94440,8 +94440,8 @@ var require_axios2 = __commonJS({
94440
94440
  retryAfter = retryDefaultDelay * config.retryAttempt;
94441
94441
  log22(`Unable to locate or parse retry-after response header, waiting ${retryAfter} seconds`);
94442
94442
  }
94443
- await new Promise((resolve55) => {
94444
- setTimeout(resolve55, retryAfter * 1e3);
94443
+ await new Promise((resolve56) => {
94444
+ setTimeout(resolve56, retryAfter * 1e3);
94445
94445
  });
94446
94446
  return instance(config);
94447
94447
  }
@@ -113670,10 +113670,10 @@ function createDelay2({ clearTimeout: defaultClear, setTimeout: defaultSet } = {
113670
113670
  signal.removeEventListener("abort", signalListener);
113671
113671
  }
113672
113672
  };
113673
- const delayPromise = new Promise((resolve55, reject) => {
113673
+ const delayPromise = new Promise((resolve56, reject) => {
113674
113674
  settle = () => {
113675
113675
  cleanup();
113676
- resolve55(value2);
113676
+ resolve56(value2);
113677
113677
  };
113678
113678
  rejectFunction = reject;
113679
113679
  timeoutId = (defaultSet ?? setTimeout)(settle, milliseconds);
@@ -120475,9 +120475,9 @@ var require_dispatcher_base = __commonJS({
120475
120475
  }
120476
120476
  close(callback) {
120477
120477
  if (callback === void 0) {
120478
- return new Promise((resolve55, reject) => {
120478
+ return new Promise((resolve56, reject) => {
120479
120479
  this.close((err, data) => {
120480
- return err ? reject(err) : resolve55(data);
120480
+ return err ? reject(err) : resolve56(data);
120481
120481
  });
120482
120482
  });
120483
120483
  }
@@ -120515,9 +120515,9 @@ var require_dispatcher_base = __commonJS({
120515
120515
  err = null;
120516
120516
  }
120517
120517
  if (callback === void 0) {
120518
- return new Promise((resolve55, reject) => {
120518
+ return new Promise((resolve56, reject) => {
120519
120519
  this.destroy(err, (err2, data) => {
120520
- return err2 ? reject(err2) : resolve55(data);
120520
+ return err2 ? reject(err2) : resolve56(data);
120521
120521
  });
120522
120522
  });
120523
120523
  }
@@ -123994,8 +123994,8 @@ var require_promise = __commonJS({
123994
123994
  function createDeferredPromise2() {
123995
123995
  let res;
123996
123996
  let rej;
123997
- const promise = new Promise((resolve55, reject) => {
123998
- res = resolve55;
123997
+ const promise = new Promise((resolve56, reject) => {
123998
+ res = resolve56;
123999
123999
  rej = reject;
124000
124000
  });
124001
124001
  return { promise, resolve: res, reject: rej };
@@ -125296,12 +125296,12 @@ upgrade: ${upgrade}\r
125296
125296
  cb();
125297
125297
  }
125298
125298
  }
125299
- const waitForDrain = () => new Promise((resolve55, reject) => {
125299
+ const waitForDrain = () => new Promise((resolve56, reject) => {
125300
125300
  assert(callback === null);
125301
125301
  if (socket[kError]) {
125302
125302
  reject(socket[kError]);
125303
125303
  } else {
125304
- callback = resolve55;
125304
+ callback = resolve56;
125305
125305
  }
125306
125306
  });
125307
125307
  socket.on("close", onDrain).on("drain", onDrain);
@@ -126146,12 +126146,12 @@ var require_client_h2 = __commonJS({
126146
126146
  cb();
126147
126147
  }
126148
126148
  }
126149
- const waitForDrain = () => new Promise((resolve55, reject) => {
126149
+ const waitForDrain = () => new Promise((resolve56, reject) => {
126150
126150
  assert(callback === null);
126151
126151
  if (socket[kError]) {
126152
126152
  reject(socket[kError]);
126153
126153
  } else {
126154
- callback = resolve55;
126154
+ callback = resolve56;
126155
126155
  }
126156
126156
  });
126157
126157
  h2stream.on("close", onDrain).on("drain", onDrain);
@@ -126462,16 +126462,16 @@ var require_client2 = __commonJS({
126462
126462
  return this[kNeedDrain] < 2;
126463
126463
  }
126464
126464
  [kClose]() {
126465
- return new Promise((resolve55) => {
126465
+ return new Promise((resolve56) => {
126466
126466
  if (this[kSize]) {
126467
- this[kClosedResolve] = resolve55;
126467
+ this[kClosedResolve] = resolve56;
126468
126468
  } else {
126469
- resolve55(null);
126469
+ resolve56(null);
126470
126470
  }
126471
126471
  });
126472
126472
  }
126473
126473
  [kDestroy](err) {
126474
- return new Promise((resolve55) => {
126474
+ return new Promise((resolve56) => {
126475
126475
  const requests = this[kQueue].splice(this[kPendingIdx]);
126476
126476
  for (let i2 = 0; i2 < requests.length; i2++) {
126477
126477
  const request = requests[i2];
@@ -126482,7 +126482,7 @@ var require_client2 = __commonJS({
126482
126482
  this[kClosedResolve]();
126483
126483
  this[kClosedResolve] = null;
126484
126484
  }
126485
- resolve55(null);
126485
+ resolve56(null);
126486
126486
  };
126487
126487
  if (this[kHTTPContext]) {
126488
126488
  this[kHTTPContext].destroy(err, callback);
@@ -126887,8 +126887,8 @@ var require_pool_base = __commonJS({
126887
126887
  }
126888
126888
  return Promise.all(closeAll);
126889
126889
  } else {
126890
- return new Promise((resolve55) => {
126891
- this[kClosedResolve] = resolve55;
126890
+ return new Promise((resolve56) => {
126891
+ this[kClosedResolve] = resolve56;
126892
126892
  });
126893
126893
  }
126894
126894
  }
@@ -127980,10 +127980,10 @@ var require_socks5_proxy_agent = __commonJS({
127980
127980
  const proxyHost = this[kProxyUrl].hostname;
127981
127981
  const proxyPort = parseInt(this[kProxyUrl].port) || 1080;
127982
127982
  debug("creating SOCKS5 connection to", proxyHost, proxyPort);
127983
- const socket = await new Promise((resolve55, reject) => {
127983
+ const socket = await new Promise((resolve56, reject) => {
127984
127984
  const onConnect = () => {
127985
127985
  socket2.removeListener("error", onError);
127986
- resolve55(socket2);
127986
+ resolve56(socket2);
127987
127987
  };
127988
127988
  const onError = (err) => {
127989
127989
  socket2.removeListener("connect", onConnect);
@@ -128002,14 +128002,14 @@ var require_socks5_proxy_agent = __commonJS({
128002
128002
  socket.destroy();
128003
128003
  });
128004
128004
  await socks5Client.handshake();
128005
- await new Promise((resolve55, reject) => {
128005
+ await new Promise((resolve56, reject) => {
128006
128006
  const timeout2 = setTimeout(() => {
128007
128007
  reject(new Error("SOCKS5 authentication timeout"));
128008
128008
  }, 5e3);
128009
128009
  const onAuthenticated = () => {
128010
128010
  clearTimeout(timeout2);
128011
128011
  socks5Client.removeListener("error", onError);
128012
- resolve55();
128012
+ resolve56();
128013
128013
  };
128014
128014
  const onError = (err) => {
128015
128015
  clearTimeout(timeout2);
@@ -128018,14 +128018,14 @@ var require_socks5_proxy_agent = __commonJS({
128018
128018
  };
128019
128019
  if (socks5Client.state === "authenticated") {
128020
128020
  clearTimeout(timeout2);
128021
- resolve55();
128021
+ resolve56();
128022
128022
  } else {
128023
128023
  socks5Client.once("authenticated", onAuthenticated);
128024
128024
  socks5Client.once("error", onError);
128025
128025
  }
128026
128026
  });
128027
128027
  await socks5Client.connect(targetHost, targetPort);
128028
- await new Promise((resolve55, reject) => {
128028
+ await new Promise((resolve56, reject) => {
128029
128029
  const timeout2 = setTimeout(() => {
128030
128030
  reject(new Error("SOCKS5 connection timeout"));
128031
128031
  }, 5e3);
@@ -128033,7 +128033,7 @@ var require_socks5_proxy_agent = __commonJS({
128033
128033
  debug("SOCKS5 tunnel established to", targetHost, targetPort, "via", info);
128034
128034
  clearTimeout(timeout2);
128035
128035
  socks5Client.removeListener("error", onError);
128036
- resolve55();
128036
+ resolve56();
128037
128037
  };
128038
128038
  const onError = (err) => {
128039
128039
  clearTimeout(timeout2);
@@ -128074,8 +128074,8 @@ var require_socks5_proxy_agent = __commonJS({
128074
128074
  servername: targetHost,
128075
128075
  ...connectOpts.tls || {}
128076
128076
  });
128077
- await new Promise((resolve55, reject) => {
128078
- finalSocket.once("secureConnect", resolve55);
128077
+ await new Promise((resolve56, reject) => {
128078
+ finalSocket.once("secureConnect", resolve56);
128079
128079
  finalSocket.once("error", reject);
128080
128080
  });
128081
128081
  }
@@ -129100,7 +129100,7 @@ var require_readable = __commonJS({
129100
129100
  if (this._readableState.closeEmitted) {
129101
129101
  return Promise.resolve(null);
129102
129102
  }
129103
- return new Promise((resolve55, reject) => {
129103
+ return new Promise((resolve56, reject) => {
129104
129104
  if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) {
129105
129105
  this.destroy(new AbortError6());
129106
129106
  }
@@ -129114,11 +129114,11 @@ var require_readable = __commonJS({
129114
129114
  if (signal.aborted) {
129115
129115
  reject(signal.reason ?? new AbortError6());
129116
129116
  } else {
129117
- resolve55(null);
129117
+ resolve56(null);
129118
129118
  }
129119
129119
  });
129120
129120
  } else {
129121
- this.on("close", resolve55);
129121
+ this.on("close", resolve56);
129122
129122
  }
129123
129123
  this.on("error", noop2).on("data", () => {
129124
129124
  if (this[kBytesRead] > limit) {
@@ -129146,7 +129146,7 @@ var require_readable = __commonJS({
129146
129146
  }
129147
129147
  function consume(stream, type) {
129148
129148
  assert(!stream[kConsume]);
129149
- return new Promise((resolve55, reject) => {
129149
+ return new Promise((resolve56, reject) => {
129150
129150
  if (isUnusable(stream)) {
129151
129151
  const rState = stream._readableState;
129152
129152
  if (rState.destroyed && rState.closeEmitted === false) {
@@ -129161,7 +129161,7 @@ var require_readable = __commonJS({
129161
129161
  stream[kConsume] = {
129162
129162
  type,
129163
129163
  stream,
129164
- resolve: resolve55,
129164
+ resolve: resolve56,
129165
129165
  reject,
129166
129166
  length: 0,
129167
129167
  body: []
@@ -129235,18 +129235,18 @@ var require_readable = __commonJS({
129235
129235
  return buffer2;
129236
129236
  }
129237
129237
  function consumeEnd(consume2, encoding) {
129238
- const { type, body, resolve: resolve55, stream, length: length4 } = consume2;
129238
+ const { type, body, resolve: resolve56, stream, length: length4 } = consume2;
129239
129239
  try {
129240
129240
  if (type === "text") {
129241
- resolve55(chunksDecode(body, length4, encoding));
129241
+ resolve56(chunksDecode(body, length4, encoding));
129242
129242
  } else if (type === "json") {
129243
- resolve55(JSON.parse(chunksDecode(body, length4, encoding)));
129243
+ resolve56(JSON.parse(chunksDecode(body, length4, encoding)));
129244
129244
  } else if (type === "arrayBuffer") {
129245
- resolve55(chunksConcat(body, length4).buffer);
129245
+ resolve56(chunksConcat(body, length4).buffer);
129246
129246
  } else if (type === "blob") {
129247
- resolve55(new Blob(body, { type: stream[kContentType] }));
129247
+ resolve56(new Blob(body, { type: stream[kContentType] }));
129248
129248
  } else if (type === "bytes") {
129249
- resolve55(chunksConcat(body, length4));
129249
+ resolve56(chunksConcat(body, length4));
129250
129250
  }
129251
129251
  consumeFinish(consume2);
129252
129252
  } catch (err) {
@@ -129436,9 +129436,9 @@ var require_api_request = __commonJS({
129436
129436
  };
129437
129437
  function request(opts, callback) {
129438
129438
  if (callback === void 0) {
129439
- return new Promise((resolve55, reject) => {
129439
+ return new Promise((resolve56, reject) => {
129440
129440
  request.call(this, opts, (err, data) => {
129441
- return err ? reject(err) : resolve55(data);
129441
+ return err ? reject(err) : resolve56(data);
129442
129442
  });
129443
129443
  });
129444
129444
  }
@@ -129650,9 +129650,9 @@ var require_api_stream = __commonJS({
129650
129650
  };
129651
129651
  function stream(opts, factory, callback) {
129652
129652
  if (callback === void 0) {
129653
- return new Promise((resolve55, reject) => {
129653
+ return new Promise((resolve56, reject) => {
129654
129654
  stream.call(this, opts, factory, (err, data) => {
129655
- return err ? reject(err) : resolve55(data);
129655
+ return err ? reject(err) : resolve56(data);
129656
129656
  });
129657
129657
  });
129658
129658
  }
@@ -129940,9 +129940,9 @@ var require_api_upgrade = __commonJS({
129940
129940
  };
129941
129941
  function upgrade(opts, callback) {
129942
129942
  if (callback === void 0) {
129943
- return new Promise((resolve55, reject) => {
129943
+ return new Promise((resolve56, reject) => {
129944
129944
  upgrade.call(this, opts, (err, data) => {
129945
- return err ? reject(err) : resolve55(data);
129945
+ return err ? reject(err) : resolve56(data);
129946
129946
  });
129947
129947
  });
129948
129948
  }
@@ -130035,9 +130035,9 @@ var require_api_connect = __commonJS({
130035
130035
  };
130036
130036
  function connect3(opts, callback) {
130037
130037
  if (callback === void 0) {
130038
- return new Promise((resolve55, reject) => {
130038
+ return new Promise((resolve56, reject) => {
130039
130039
  connect3.call(this, opts, (err, data) => {
130040
- return err ? reject(err) : resolve55(data);
130040
+ return err ? reject(err) : resolve56(data);
130041
130041
  });
130042
130042
  });
130043
130043
  }
@@ -131311,7 +131311,7 @@ var require_snapshot_recorder = __commonJS({
131311
131311
  "../node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
131312
131312
  "use strict";
131313
131313
  var { writeFile: writeFile24, readFile: readFile23, mkdir: mkdir20 } = __require("node:fs/promises");
131314
- var { dirname: dirname43, resolve: resolve55 } = __require("node:path");
131314
+ var { dirname: dirname43, resolve: resolve56 } = __require("node:path");
131315
131315
  var { setTimeout: setTimeout3, clearTimeout: clearTimeout3 } = __require("node:timers");
131316
131316
  var { InvalidArgumentError, UndiciError } = require_errors2();
131317
131317
  var { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require_snapshot_utils();
@@ -131512,7 +131512,7 @@ var require_snapshot_recorder = __commonJS({
131512
131512
  throw new InvalidArgumentError("Snapshot path is required");
131513
131513
  }
131514
131514
  try {
131515
- const data = await readFile23(resolve55(path12), "utf8");
131515
+ const data = await readFile23(resolve56(path12), "utf8");
131516
131516
  const parsed = JSON.parse(data);
131517
131517
  if (Array.isArray(parsed)) {
131518
131518
  this.#snapshots.clear();
@@ -131541,7 +131541,7 @@ var require_snapshot_recorder = __commonJS({
131541
131541
  if (!path12) {
131542
131542
  throw new InvalidArgumentError("Snapshot path is required");
131543
131543
  }
131544
- const resolvedPath = resolve55(path12);
131544
+ const resolvedPath = resolve56(path12);
131545
131545
  await mkdir20(dirname43(resolvedPath), { recursive: true });
131546
131546
  const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({
131547
131547
  hash,
@@ -138383,7 +138383,7 @@ var require_fetch = __commonJS({
138383
138383
  const agent = fetchParams.controller.dispatcher;
138384
138384
  const path12 = url.pathname + url.search;
138385
138385
  const hasTrailingQuestionMark = url.search.length === 0 && url.href[url.href.length - url.hash.length - 1] === "?";
138386
- return new Promise((resolve55, reject) => agent.dispatch(
138386
+ return new Promise((resolve56, reject) => agent.dispatch(
138387
138387
  {
138388
138388
  path: hasTrailingQuestionMark ? `${path12}?` : path12,
138389
138389
  origin: url.origin,
@@ -138463,7 +138463,7 @@ var require_fetch = __commonJS({
138463
138463
  }
138464
138464
  }
138465
138465
  const onError = this.onError.bind(this);
138466
- resolve55({
138466
+ resolve56({
138467
138467
  status,
138468
138468
  statusText,
138469
138469
  headersList,
@@ -138516,7 +138516,7 @@ var require_fetch = __commonJS({
138516
138516
  headersList.append(headerName, String(value2), true);
138517
138517
  }
138518
138518
  }
138519
- resolve55({
138519
+ resolve56({
138520
138520
  status,
138521
138521
  statusText: STATUS_CODES2[status],
138522
138522
  headersList,
@@ -138532,7 +138532,7 @@ var require_fetch = __commonJS({
138532
138532
  for (let i2 = 0; i2 < rawHeaders.length; i2 += 2) {
138533
138533
  headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i2]), rawHeaders[i2 + 1].toString("latin1"), true);
138534
138534
  }
138535
- resolve55({
138535
+ resolve56({
138536
138536
  status,
138537
138537
  statusText: STATUS_CODES2[status],
138538
138538
  headersList,
@@ -143134,7 +143134,7 @@ function toBytes(data) {
143134
143134
  throw new InvalidParametersError("Unsupported data type");
143135
143135
  }
143136
143136
  async function readResponse2(stream, options2) {
143137
- return new Promise((resolve55, reject) => {
143137
+ return new Promise((resolve56, reject) => {
143138
143138
  let readHeaders2 = false;
143139
143139
  const parser2 = new HTTPParser("RESPONSE");
143140
143140
  parser2[HTTPParser.kOnHeadersComplete] = (info) => {
@@ -143143,7 +143143,7 @@ async function readResponse2(stream, options2) {
143143
143143
  for (let i2 = 0; i2 < info.headers.length; i2 += 2) {
143144
143144
  headers.push([info.headers[i2], info.headers[i2 + 1]]);
143145
143145
  }
143146
- resolve55(new Response2(null, {
143146
+ resolve56(new Response2(null, {
143147
143147
  status: info.statusCode,
143148
143148
  statusText: info.statusMessage,
143149
143149
  headers: new Headers(headers)
@@ -217371,11 +217371,11 @@ var init_mdns = __esm({
217371
217371
  clearInterval(this._queryInterval);
217372
217372
  this._queryInterval = null;
217373
217373
  }
217374
- await new Promise((resolve55) => {
217374
+ await new Promise((resolve56) => {
217375
217375
  if (this.mdns != null) {
217376
- this.mdns.destroy(resolve55);
217376
+ this.mdns.destroy(resolve56);
217377
217377
  } else {
217378
- resolve55();
217378
+ resolve56();
217379
217379
  }
217380
217380
  });
217381
217381
  this.mdns = void 0;
@@ -218305,9 +218305,9 @@ var init_listener2 = __esm({
218305
218305
  return;
218306
218306
  }
218307
218307
  const netConfig = this.status.netConfig;
218308
- await new Promise((resolve55, reject) => {
218308
+ await new Promise((resolve56, reject) => {
218309
218309
  this.server.once("error", reject);
218310
- this.server.listen(netConfig, resolve55);
218310
+ this.server.listen(netConfig, resolve56);
218311
218311
  });
218312
218312
  this.status = { ...this.status, code: TCPListenerStatusCode.ACTIVE };
218313
218313
  this.log("listening on %s", this.server.address());
@@ -218400,7 +218400,7 @@ var init_tcp = __esm({
218400
218400
  options2.signal.throwIfAborted();
218401
218401
  options2.onProgress?.(new CustomProgressEvent("tcp:open-connection"));
218402
218402
  let rawSocket;
218403
- return new Promise((resolve55, reject) => {
218403
+ return new Promise((resolve56, reject) => {
218404
218404
  const start2 = Date.now();
218405
218405
  const cOpts = multiaddrToNetConfig(ma, {
218406
218406
  ...this.opts.dialOpts ?? {},
@@ -218442,7 +218442,7 @@ var init_tcp = __esm({
218442
218442
  reject(err);
218443
218443
  return;
218444
218444
  }
218445
- resolve55(rawSocket);
218445
+ resolve56(rawSocket);
218446
218446
  };
218447
218447
  rawSocket.on("error", onError);
218448
218448
  rawSocket.on("timeout", onTimeout);
@@ -222830,14 +222830,14 @@ ${key.data.toString("base64")}
222830
222830
  };
222831
222831
  var Pbkdf2Provider = class extends core__namespace.Pbkdf2Provider {
222832
222832
  async onDeriveBits(algorithm, baseKey, length4) {
222833
- return new Promise((resolve55, reject) => {
222833
+ return new Promise((resolve56, reject) => {
222834
222834
  const salt = core__namespace.BufferSourceConverter.toArrayBuffer(algorithm.salt);
222835
222835
  const hash = algorithm.hash.name.replace("-", "");
222836
222836
  crypto14.pbkdf2(getCryptoKey(baseKey).data, buffer2.Buffer.from(salt), algorithm.iterations, length4 >> 3, hash, (err, derivedBits) => {
222837
222837
  if (err) {
222838
222838
  reject(err);
222839
222839
  } else {
222840
- resolve55(new Uint8Array(derivedBits).buffer);
222840
+ resolve56(new Uint8Array(derivedBits).buffer);
222841
222841
  }
222842
222842
  });
222843
222843
  });
@@ -223527,7 +223527,7 @@ var init_tls = __esm({
223527
223527
  socket.emit("error", new HandshakeTimeoutError());
223528
223528
  };
223529
223529
  options2?.signal?.addEventListener("abort", onAbort);
223530
- return new Promise((resolve55, reject) => {
223530
+ return new Promise((resolve56, reject) => {
223531
223531
  const verifyRemote = () => {
223532
223532
  const remote = socket.getPeerCertificate();
223533
223533
  verifyPeerCertificate(remote.raw, options2?.remotePeer, log22).then((remotePeer) => {
@@ -223542,7 +223542,7 @@ var init_tls = __esm({
223542
223542
  reject(err);
223543
223543
  }
223544
223544
  }
223545
- resolve55({
223545
+ resolve56({
223546
223546
  remotePeer,
223547
223547
  connection: toMessageStream2(connection, socket),
223548
223548
  streamMuxer
@@ -229785,12 +229785,12 @@ var require_parser2 = __commonJS({
229785
229785
  };
229786
229786
  Parser2.prototype.parseStringPromise = function(str) {
229787
229787
  return new Promise(/* @__PURE__ */ (function(_this) {
229788
- return function(resolve55, reject) {
229788
+ return function(resolve56, reject) {
229789
229789
  return _this.parseString(str, function(err, value2) {
229790
229790
  if (err) {
229791
229791
  return reject(err);
229792
229792
  } else {
229793
- return resolve55(value2);
229793
+ return resolve56(value2);
229794
229794
  }
229795
229795
  });
229796
229796
  };
@@ -230116,7 +230116,7 @@ function initRequest(url, init2) {
230116
230116
  }
230117
230117
  }
230118
230118
  async function fetch3(url, init2 = {}) {
230119
- return new Promise((resolve55, reject) => {
230119
+ return new Promise((resolve56, reject) => {
230120
230120
  const request = initRequest(new URL(url), init2);
230121
230121
  if (init2.body != null) {
230122
230122
  request.write(init2.body);
@@ -230135,7 +230135,7 @@ async function fetch3(url, init2 = {}) {
230135
230135
  body += chunk.toString();
230136
230136
  });
230137
230137
  response.on("end", () => {
230138
- resolve55(body);
230138
+ resolve56(body);
230139
230139
  });
230140
230140
  response.on("error", (err) => {
230141
230141
  reject(err);
@@ -230283,7 +230283,7 @@ var init_broadcast_advert = __esm({
230283
230283
  // ../node_modules/freeport-promise/dist/src/index.js
230284
230284
  import { createServer } from "net";
230285
230285
  async function freeport() {
230286
- return await new Promise((resolve55, reject) => {
230286
+ return await new Promise((resolve56, reject) => {
230287
230287
  const server2 = createServer();
230288
230288
  let port = 0;
230289
230289
  server2.once("listening", () => {
@@ -230298,7 +230298,7 @@ async function freeport() {
230298
230298
  server2.close();
230299
230299
  });
230300
230300
  server2.once("close", () => {
230301
- resolve55(port);
230301
+ resolve56(port);
230302
230302
  });
230303
230303
  server2.once("error", reject);
230304
230304
  server2.listen(0, "127.0.0.1");
@@ -230362,7 +230362,7 @@ async function createLocation(ssdp, advert) {
230362
230362
  advert.location = {};
230363
230363
  await Promise.all(ssdp.sockets.map(async (socket) => Promise.all(findAllInterfaces(socket.type === "udp4" && advert.ipv4, socket.type === "udp6" && advert.ipv6).map(async (iface) => {
230364
230364
  await freeport().then(async (port) => {
230365
- await new Promise((resolve55, reject) => {
230365
+ await new Promise((resolve56, reject) => {
230366
230366
  let location = "http://";
230367
230367
  if (socket.type === "udp6") {
230368
230368
  location += `[${iface.address}]`;
@@ -230376,7 +230376,7 @@ async function createLocation(ssdp, advert) {
230376
230376
  });
230377
230377
  const addr = socket.address();
230378
230378
  server2.listen(port, addr.address, () => {
230379
- resolve55();
230379
+ resolve56();
230380
230380
  });
230381
230381
  server2.on("error", (err) => {
230382
230382
  reject(err);
@@ -230386,9 +230386,9 @@ async function createLocation(ssdp, advert) {
230386
230386
  });
230387
230387
  }))));
230388
230388
  return async () => {
230389
- await Promise.all(servers.map(async (server2) => new Promise((resolve55, reject) => {
230389
+ await Promise.all(servers.map(async (server2) => new Promise((resolve56, reject) => {
230390
230390
  server2.close();
230391
- resolve55();
230391
+ resolve56();
230392
230392
  })));
230393
230393
  };
230394
230394
  }
@@ -230581,10 +230581,10 @@ function parseAdvertOptions(ssdp, options2) {
230581
230581
  }, options2);
230582
230582
  const details = opts.details;
230583
230583
  opts.details = async () => {
230584
- return new Promise((resolve55, reject) => {
230584
+ return new Promise((resolve56, reject) => {
230585
230585
  try {
230586
230586
  const builder = new import_xml2js3.default.Builder();
230587
- resolve55(builder.buildObject(details));
230587
+ resolve56(builder.buildObject(details));
230588
230588
  } catch (error) {
230589
230589
  reject(error);
230590
230590
  }
@@ -230663,7 +230663,7 @@ import { createSocket } from "node:dgram";
230663
230663
  async function createSockets(ssdp, signal) {
230664
230664
  const sockets = [];
230665
230665
  await Promise.allSettled((ssdp.options.sockets ?? []).map(async (options2) => {
230666
- return new Promise((resolve55, reject) => {
230666
+ return new Promise((resolve56, reject) => {
230667
230667
  const socket = createSocket({
230668
230668
  type: options2.type ?? "udp4",
230669
230669
  ipv6Only: options2.type === "udp6",
@@ -230687,7 +230687,7 @@ async function createSockets(ssdp, signal) {
230687
230687
  socket.setMulticastTTL(options2.maxHops);
230688
230688
  }
230689
230689
  sockets.push(socket);
230690
- resolve55();
230690
+ resolve56();
230691
230691
  } catch (error) {
230692
230692
  error.message = `Adding membership ${options2.broadcast?.address} failed - ${error.message}`;
230693
230693
  reject(error);
@@ -230852,14 +230852,14 @@ var init_utils37 = __esm({
230852
230852
  // ../node_modules/@achingbrain/ssdp/dist/src/send-ssdp-message.js
230853
230853
  function sendSsdpMessage(ssdp, status, headers, remote) {
230854
230854
  Promise.all(ssdp.sockets.map(async (socket) => {
230855
- await new Promise((resolve55, reject) => {
230855
+ await new Promise((resolve56, reject) => {
230856
230856
  if (socket.closed) {
230857
- resolve55();
230857
+ resolve56();
230858
230858
  return;
230859
230859
  }
230860
230860
  const recipient = remote ?? socket.options.broadcast;
230861
230861
  if (recipient != null && addressFamilyMismatch(recipient, socket)) {
230862
- resolve55();
230862
+ resolve56();
230863
230863
  return;
230864
230864
  }
230865
230865
  if (headers.LOCATION != null) {
@@ -230884,7 +230884,7 @@ function sendSsdpMessage(ssdp, status, headers, remote) {
230884
230884
  reject(error);
230885
230885
  return;
230886
230886
  }
230887
- resolve55();
230887
+ resolve56();
230888
230888
  });
230889
230889
  });
230890
230890
  })).catch((err) => {
@@ -230941,9 +230941,9 @@ var init_ssdp = __esm({
230941
230941
  async stop() {
230942
230942
  await adverts.stopAll();
230943
230943
  await Promise.all(this.sockets.map(async (socket) => {
230944
- await new Promise((resolve55) => {
230944
+ await new Promise((resolve56) => {
230945
230945
  socket.on("close", () => {
230946
- resolve55();
230946
+ resolve56();
230947
230947
  });
230948
230948
  socket.close();
230949
230949
  socket.closed = true;
@@ -233534,12 +233534,12 @@ var init_RTCSctpTransport = __esm({
233534
233534
 
233535
233535
  // ../node_modules/node-datachannel/dist/esm/polyfill/RTCPeerConnection.mjs
233536
233536
  function createDeferredPromise() {
233537
- let resolve55, reject;
233537
+ let resolve56, reject;
233538
233538
  const promise = new Promise(function(_resolve, _reject) {
233539
- resolve55 = _resolve;
233539
+ resolve56 = _resolve;
233540
233540
  reject = _reject;
233541
233541
  });
233542
- promise.resolve = resolve55;
233542
+ promise.resolve = resolve56;
233543
233543
  promise.reject = reject;
233544
233544
  return promise;
233545
233545
  }
@@ -233856,14 +233856,14 @@ var init_RTCPeerConnection = __esm({
233856
233856
  throw new DOMException("Not implemented");
233857
233857
  }
233858
233858
  getStats() {
233859
- return new Promise((resolve55) => {
233859
+ return new Promise((resolve56) => {
233860
233860
  const report2 = /* @__PURE__ */ new Map();
233861
233861
  const cp2 = __privateGet9(this, _peerConnection)?.getSelectedCandidatePair();
233862
233862
  const bytesSent = __privateGet9(this, _peerConnection)?.bytesSent();
233863
233863
  const bytesReceived = __privateGet9(this, _peerConnection)?.bytesReceived();
233864
233864
  const rtt = __privateGet9(this, _peerConnection)?.rtt();
233865
233865
  if (!cp2) {
233866
- return resolve55(report2);
233866
+ return resolve56(report2);
233867
233867
  }
233868
233868
  const localIdRs = getRandomString(8);
233869
233869
  const localId = "RTCIceCandidate_" + localIdRs;
@@ -233918,7 +233918,7 @@ var init_RTCPeerConnection = __esm({
233918
233918
  dataChannelsOpened: __privateGet9(this, _dataChannels).size,
233919
233919
  dataChannelsClosed: __privateGet9(this, _dataChannelsClosed)
233920
233920
  });
233921
- return resolve55(report2);
233921
+ return resolve56(report2);
233922
233922
  });
233923
233923
  }
233924
233924
  getTransceivers() {
@@ -234749,14 +234749,14 @@ var init_get_port = __esm({
234749
234749
  }
234750
234750
  return results;
234751
234751
  };
234752
- checkAvailablePort = (options2) => new Promise((resolve55, reject) => {
234752
+ checkAvailablePort = (options2) => new Promise((resolve56, reject) => {
234753
234753
  const server2 = net3.createServer();
234754
234754
  server2.unref();
234755
234755
  server2.on("error", reject);
234756
234756
  server2.listen(options2, () => {
234757
234757
  const { port } = server2.address();
234758
234758
  server2.close(() => {
234759
- resolve55(port);
234759
+ resolve56(port);
234760
234760
  });
234761
234761
  });
234762
234762
  });
@@ -234829,12 +234829,12 @@ var resolveValue, sleep2, validateOptions, createTimeoutError, handleFallback, h
234829
234829
  var init_p_wait_for = __esm({
234830
234830
  "../node_modules/p-wait-for/index.js"() {
234831
234831
  resolveValue = /* @__PURE__ */ Symbol("resolveValue");
234832
- sleep2 = (ms, signal) => new Promise((resolve55, reject) => {
234832
+ sleep2 = (ms, signal) => new Promise((resolve56, reject) => {
234833
234833
  if (signal?.aborted) {
234834
234834
  reject(signal.reason);
234835
234835
  return;
234836
234836
  }
234837
- const timeout2 = setTimeout(resolve55, ms);
234837
+ const timeout2 = setTimeout(resolve56, ms);
234838
234838
  if (signal) {
234839
234839
  signal.addEventListener("abort", () => {
234840
234840
  clearTimeout(timeout2);
@@ -239808,10 +239808,10 @@ var init_listener5 = __esm({
239808
239808
  ...config,
239809
239809
  ipv6Only: config.type === "ip6"
239810
239810
  });
239811
- await new Promise((resolve55, reject) => {
239811
+ await new Promise((resolve56, reject) => {
239812
239812
  const onListening = () => {
239813
239813
  removeListeners();
239814
- resolve55();
239814
+ resolve56();
239815
239815
  };
239816
239816
  const onError = (err) => {
239817
239817
  this.metrics.errors?.increment({ [`${this.addr} listen_error`]: true });
@@ -250271,41 +250271,41 @@ var require_queue = __commonJS({
250271
250271
  queue.drained = drained;
250272
250272
  return queue;
250273
250273
  function push(value2) {
250274
- var p2 = new Promise(function(resolve55, reject) {
250274
+ var p2 = new Promise(function(resolve56, reject) {
250275
250275
  pushCb(value2, function(err, result) {
250276
250276
  if (err) {
250277
250277
  reject(err);
250278
250278
  return;
250279
250279
  }
250280
- resolve55(result);
250280
+ resolve56(result);
250281
250281
  });
250282
250282
  });
250283
250283
  p2.catch(noop2);
250284
250284
  return p2;
250285
250285
  }
250286
250286
  function unshift(value2) {
250287
- var p2 = new Promise(function(resolve55, reject) {
250287
+ var p2 = new Promise(function(resolve56, reject) {
250288
250288
  unshiftCb(value2, function(err, result) {
250289
250289
  if (err) {
250290
250290
  reject(err);
250291
250291
  return;
250292
250292
  }
250293
- resolve55(result);
250293
+ resolve56(result);
250294
250294
  });
250295
250295
  });
250296
250296
  p2.catch(noop2);
250297
250297
  return p2;
250298
250298
  }
250299
250299
  function drained() {
250300
- var p2 = new Promise(function(resolve55) {
250300
+ var p2 = new Promise(function(resolve56) {
250301
250301
  process.nextTick(function() {
250302
250302
  if (queue.idle()) {
250303
- resolve55();
250303
+ resolve56();
250304
250304
  } else {
250305
250305
  var previousDrain = queue.drain;
250306
250306
  queue.drain = function() {
250307
250307
  if (typeof previousDrain === "function") previousDrain();
250308
- resolve55();
250308
+ resolve56();
250309
250309
  queue.drain = previousDrain;
250310
250310
  };
250311
250311
  }
@@ -250791,9 +250791,9 @@ var require_stream4 = __commonJS({
250791
250791
  });
250792
250792
  }
250793
250793
  _getStat(filepath) {
250794
- return new Promise((resolve55, reject) => {
250794
+ return new Promise((resolve56, reject) => {
250795
250795
  this._stat(filepath, this._fsStatSettings, (error, stats) => {
250796
- return error === null ? resolve55(stats) : reject(error);
250796
+ return error === null ? resolve56(stats) : reject(error);
250797
250797
  });
250798
250798
  });
250799
250799
  }
@@ -250817,10 +250817,10 @@ var require_async6 = __commonJS({
250817
250817
  this._readerStream = new stream_1.default(this._settings);
250818
250818
  }
250819
250819
  dynamic(root, options2) {
250820
- return new Promise((resolve55, reject) => {
250820
+ return new Promise((resolve56, reject) => {
250821
250821
  this._walkAsync(root, options2, (error, entries) => {
250822
250822
  if (error === null) {
250823
- resolve55(entries);
250823
+ resolve56(entries);
250824
250824
  } else {
250825
250825
  reject(error);
250826
250826
  }
@@ -250830,10 +250830,10 @@ var require_async6 = __commonJS({
250830
250830
  async static(patterns, options2) {
250831
250831
  const entries = [];
250832
250832
  const stream = this._readerStream.static(patterns, options2);
250833
- return new Promise((resolve55, reject) => {
250833
+ return new Promise((resolve56, reject) => {
250834
250834
  stream.once("error", reject);
250835
250835
  stream.on("data", (entry) => entries.push(entry));
250836
- stream.once("end", () => resolve55(entries));
250836
+ stream.once("end", () => resolve56(entries));
250837
250837
  });
250838
250838
  }
250839
250839
  };
@@ -251675,7 +251675,7 @@ async function retryAsyncOperation(fn, maxRetries, delayMs) {
251675
251675
  return await fn();
251676
251676
  } catch (error) {
251677
251677
  if (i2 < maxRetries - 1) {
251678
- await new Promise((resolve55) => setTimeout(resolve55, delayMs));
251678
+ await new Promise((resolve56) => setTimeout(resolve56, delayMs));
251679
251679
  } else {
251680
251680
  throw error;
251681
251681
  }
@@ -251696,11 +251696,11 @@ var init_lib3 = __esm({
251696
251696
  // File is locked, add data for later
251697
251697
  #add(data) {
251698
251698
  this.#nextData = data;
251699
- this.#nextPromise ||= new Promise((resolve55, reject) => {
251700
- this.#next = [resolve55, reject];
251699
+ this.#nextPromise ||= new Promise((resolve56, reject) => {
251700
+ this.#next = [resolve56, reject];
251701
251701
  });
251702
- return new Promise((resolve55, reject) => {
251703
- this.#nextPromise?.then(resolve55).catch(reject);
251702
+ return new Promise((resolve56, reject) => {
251703
+ this.#nextPromise?.then(resolve56).catch(reject);
251704
251704
  });
251705
251705
  }
251706
251706
  // File isn't locked, write data
@@ -252231,7 +252231,7 @@ Justification: ${justification || "(none provided)"}`,
252231
252231
  })();
252232
252232
  const ipfsResult = await Promise.race([
252233
252233
  ipfsPromise,
252234
- new Promise((resolve55) => setTimeout(() => resolve55(null), 2e3))
252234
+ new Promise((resolve56) => setTimeout(() => resolve56(null), 2e3))
252235
252235
  ]);
252236
252236
  if (ipfsResult && ipfsResult.success) {
252237
252237
  const cidData = JSON.parse(ipfsResult.output);
@@ -252752,7 +252752,7 @@ print("__OMNIUS_REPL_READY__")
252752
252752
  return;
252753
252753
  const sockId = randomBytes11(8).toString("hex");
252754
252754
  this.ipcPath = join33(tmpdir5(), `omnius-repl-ipc-${sockId}.sock`);
252755
- return new Promise((resolve55, reject) => {
252755
+ return new Promise((resolve56, reject) => {
252756
252756
  this.ipcServer = createServer2((conn) => {
252757
252757
  let buffer2 = new Uint8Array(0);
252758
252758
  conn.on("data", (chunk) => {
@@ -252768,7 +252768,7 @@ print("__OMNIUS_REPL_READY__")
252768
252768
  });
252769
252769
  });
252770
252770
  this.ipcServer.on("error", reject);
252771
- this.ipcServer.listen(this.ipcPath, () => resolve55());
252771
+ this.ipcServer.listen(this.ipcPath, () => resolve56());
252772
252772
  });
252773
252773
  }
252774
252774
  async processIpcBuffer(conn, input) {
@@ -252831,9 +252831,9 @@ print("__OMNIUS_REPL_READY__")
252831
252831
  }
252832
252832
  // ── Code execution ─────────────────────────────────────────────────────
252833
252833
  executeCode(code8, isInit = false) {
252834
- return new Promise((resolve55) => {
252834
+ return new Promise((resolve56) => {
252835
252835
  if (!this.proc?.stdin || !this.proc?.stdout || !this.proc?.stderr) {
252836
- resolve55({ success: false, output: "REPL process not available", error: "No process", durationMs: 0 });
252836
+ resolve56({ success: false, output: "REPL process not available", error: "No process", durationMs: 0 });
252837
252837
  return;
252838
252838
  }
252839
252839
  const sentinel = `__OMNIUS_SENTINEL_${randomBytes11(6).toString("hex")}__`;
@@ -252843,7 +252843,7 @@ print("__OMNIUS_REPL_READY__")
252843
252843
  const timeout2 = setTimeout(() => {
252844
252844
  if (!resolved) {
252845
252845
  resolved = true;
252846
- resolve55({
252846
+ resolve56({
252847
252847
  success: false,
252848
252848
  output: stdout || "Execution timed out",
252849
252849
  error: `Timeout after ${this.execTimeout / 1e3}s`,
@@ -252860,13 +252860,13 @@ print("__OMNIUS_REPL_READY__")
252860
252860
  if (isInit) {
252861
252861
  const ready = cleanOutput.includes("__OMNIUS_REPL_READY__");
252862
252862
  const displayOutput = cleanOutput.replace("__OMNIUS_REPL_READY__", "").trim();
252863
- resolve55({
252863
+ resolve56({
252864
252864
  success: ready,
252865
252865
  output: displayOutput || "REPL initialized",
252866
252866
  durationMs: 0
252867
252867
  });
252868
252868
  } else {
252869
- resolve55({
252869
+ resolve56({
252870
252870
  success: true,
252871
252871
  output: cleanOutput || "(no output)",
252872
252872
  durationMs: 0
@@ -252875,7 +252875,7 @@ print("__OMNIUS_REPL_READY__")
252875
252875
  }
252876
252876
  if (stdout.length > 2e5) {
252877
252877
  cleanup();
252878
- resolve55({
252878
+ resolve56({
252879
252879
  success: true,
252880
252880
  output: stdout.slice(0, 2e5) + "\n[output truncated at 200KB]",
252881
252881
  durationMs: 0
@@ -259281,7 +259281,7 @@ async function launchComfyBackground(args) {
259281
259281
  if (child.exitCode !== null) {
259282
259282
  throw new Error(`ComfyUI bootstrap exited with code ${child.exitCode} before becoming reachable.`);
259283
259283
  }
259284
- await new Promise((resolve55) => setTimeout(resolve55, 1e3));
259284
+ await new Promise((resolve56) => setTimeout(resolve56, 1e3));
259285
259285
  }
259286
259286
  child.kill("SIGTERM");
259287
259287
  throw new Error("ComfyUI did not become reachable within 4 minutes.");
@@ -259316,7 +259316,7 @@ async function comfyPollHistory(client, promptId, onProgress) {
259316
259316
  if (onProgress && attempt % 5 === 0) {
259317
259317
  onProgress({ stage: "generate", message: `ComfyUI rendering prompt ${promptId.slice(0, 8)} (attempt ${attempt})` });
259318
259318
  }
259319
- await new Promise((resolve55) => setTimeout(resolve55, 3e3));
259319
+ await new Promise((resolve56) => setTimeout(resolve56, 3e3));
259320
259320
  }
259321
259321
  throw new Error(`ComfyUI prompt ${promptId} did not complete within 30 minutes.`);
259322
259322
  }
@@ -259382,23 +259382,23 @@ async function muxAudioIntoVideo(args) {
259382
259382
  "1:a:0",
259383
259383
  args.outputPath
259384
259384
  ];
259385
- return await new Promise((resolve55) => {
259385
+ return await new Promise((resolve56) => {
259386
259386
  const child = spawn10(ffmpegBin(), argv, { stdio: ["ignore", "pipe", "pipe"] });
259387
259387
  let stderr = "";
259388
259388
  child.stderr?.on("data", (chunk) => {
259389
259389
  stderr += chunk.toString();
259390
259390
  });
259391
- child.on("error", (err) => resolve55({ ok: false, error: String(err.message || err) }));
259391
+ child.on("error", (err) => resolve56({ ok: false, error: String(err.message || err) }));
259392
259392
  child.on("close", (code8) => {
259393
259393
  if (code8 === 0)
259394
- resolve55({ ok: true });
259394
+ resolve56({ ok: true });
259395
259395
  else
259396
- resolve55({ ok: false, error: `ffmpeg exited with code ${code8}: ${stderr.slice(0, 400)}` });
259396
+ resolve56({ ok: false, error: `ffmpeg exited with code ${code8}: ${stderr.slice(0, 400)}` });
259397
259397
  });
259398
259398
  });
259399
259399
  }
259400
259400
  async function ffmpegExtractFirstFrame(videoPath, thumbnailPath) {
259401
- return await new Promise((resolve55) => {
259401
+ return await new Promise((resolve56) => {
259402
259402
  const child = spawn10(ffmpegBin(), [
259403
259403
  "-hide_banner",
259404
259404
  "-loglevel",
@@ -259412,8 +259412,8 @@ async function ffmpegExtractFirstFrame(videoPath, thumbnailPath) {
259412
259412
  "2",
259413
259413
  thumbnailPath
259414
259414
  ], { stdio: ["ignore", "ignore", "ignore"] });
259415
- child.on("error", () => resolve55(false));
259416
- child.on("close", (code8) => resolve55(code8 === 0));
259415
+ child.on("error", () => resolve56(false));
259416
+ child.on("close", (code8) => resolve56(code8 === 0));
259417
259417
  });
259418
259418
  }
259419
259419
  function outputPath2(repoRoot) {
@@ -279843,7 +279843,7 @@ ${lanes.join("\n")}
279843
279843
  pollingIntervalQueue(pollingInterval).pollScheduled = host.setTimeout(pollingInterval === 250 ? pollLowPollingIntervalQueue : pollPollingIntervalQueue, pollingInterval, pollingInterval === 250 ? "pollLowPollingIntervalQueue" : "pollPollingIntervalQueue", pollingIntervalQueue(pollingInterval));
279844
279844
  }
279845
279845
  }
279846
- function createUseFsEventsOnParentDirectoryWatchFile(fsWatch4, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
279846
+ function createUseFsEventsOnParentDirectoryWatchFile(fsWatch5, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp) {
279847
279847
  const fileWatcherCallbacks = createMultiMap();
279848
279848
  const fileTimestamps = fsWatchWithTimestamp ? /* @__PURE__ */ new Map() : void 0;
279849
279849
  const dirWatchers = /* @__PURE__ */ new Map();
@@ -279870,7 +279870,7 @@ ${lanes.join("\n")}
279870
279870
  };
279871
279871
  }
279872
279872
  function createDirectoryWatcher(dirName, dirPath, fallbackOptions) {
279873
- const watcher = fsWatch4(
279873
+ const watcher = fsWatch5(
279874
279874
  dirName,
279875
279875
  1,
279876
279876
  (eventName, relativeFileName) => {
@@ -280324,7 +280324,7 @@ ${lanes.join("\n")}
280324
280324
  void 0
280325
280325
  );
280326
280326
  case 4:
280327
- return fsWatch4(
280327
+ return fsWatch5(
280328
280328
  fileName,
280329
280329
  0,
280330
280330
  createFsWatchCallbackForFileWatcherCallback(fileName, callback, getModifiedTime3),
@@ -280335,7 +280335,7 @@ ${lanes.join("\n")}
280335
280335
  );
280336
280336
  case 5:
280337
280337
  if (!nonPollingWatchFile) {
280338
- nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch4, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
280338
+ nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch5, useCaseSensitiveFileNames2, getModifiedTime3, fsWatchWithTimestamp);
280339
280339
  }
280340
280340
  return nonPollingWatchFile(fileName, callback, pollingInterval, getFallbackOptions(options2));
280341
280341
  default:
@@ -280390,7 +280390,7 @@ ${lanes.join("\n")}
280390
280390
  }
280391
280391
  function watchDirectory(directoryName, callback, recursive2, options2) {
280392
280392
  if (fsSupportsRecursiveFsWatch) {
280393
- return fsWatch4(
280393
+ return fsWatch5(
280394
280394
  directoryName,
280395
280395
  1,
280396
280396
  createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options2, useCaseSensitiveFileNames2, getCurrentDirectory),
@@ -280444,7 +280444,7 @@ ${lanes.join("\n")}
280444
280444
  void 0
280445
280445
  );
280446
280446
  case 0:
280447
- return fsWatch4(
280447
+ return fsWatch5(
280448
280448
  directoryName,
280449
280449
  1,
280450
280450
  createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options2, useCaseSensitiveFileNames2, getCurrentDirectory),
@@ -280486,7 +280486,7 @@ ${lanes.join("\n")}
280486
280486
  (cb) => pollingWatchFileWorker(fileName, cb, pollingInterval, options2)
280487
280487
  );
280488
280488
  }
280489
- function fsWatch4(fileOrDirectory, entryKind, callback, recursive2, fallbackPollingInterval, fallbackOptions) {
280489
+ function fsWatch5(fileOrDirectory, entryKind, callback, recursive2, fallbackPollingInterval, fallbackOptions) {
280490
280490
  return createSingleWatcherPerName(
280491
280491
  recursive2 ? fsWatchesRecursive : fsWatches,
280492
280492
  useCaseSensitiveFileNames2,
@@ -396347,7 +396347,7 @@ ${lanes.join("\n")}
396347
396347
  }
396348
396348
  }
396349
396349
  function createImportCallExpressionAMD(arg, containsLexicalThis) {
396350
- const resolve55 = factory2.createUniqueName("resolve");
396350
+ const resolve56 = factory2.createUniqueName("resolve");
396351
396351
  const reject = factory2.createUniqueName("reject");
396352
396352
  const parameters = [
396353
396353
  factory2.createParameterDeclaration(
@@ -396356,7 +396356,7 @@ ${lanes.join("\n")}
396356
396356
  /*dotDotDotToken*/
396357
396357
  void 0,
396358
396358
  /*name*/
396359
- resolve55
396359
+ resolve56
396360
396360
  ),
396361
396361
  factory2.createParameterDeclaration(
396362
396362
  /*modifiers*/
@@ -396373,7 +396373,7 @@ ${lanes.join("\n")}
396373
396373
  factory2.createIdentifier("require"),
396374
396374
  /*typeArguments*/
396375
396375
  void 0,
396376
- [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve55, reject]
396376
+ [factory2.createArrayLiteralExpression([arg || factory2.createOmittedExpression()]), resolve56, reject]
396377
396377
  )
396378
396378
  )
396379
396379
  ]);
@@ -483284,8 +483284,8 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
483284
483284
  installPackage(options2) {
483285
483285
  this.packageInstallId++;
483286
483286
  const request = { kind: "installPackage", ...options2, id: this.packageInstallId };
483287
- const promise = new Promise((resolve55, reject) => {
483288
- (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve55, reject });
483287
+ const promise = new Promise((resolve56, reject) => {
483288
+ (this.packageInstalledPromise ?? (this.packageInstalledPromise = /* @__PURE__ */ new Map())).set(this.packageInstallId, { resolve: resolve56, reject });
483289
483289
  });
483290
483290
  this.installer.send(request);
483291
483291
  return promise;
@@ -485545,7 +485545,7 @@ var require_path_browserify = __commonJS({
485545
485545
  }
485546
485546
  var posix = {
485547
485547
  // path.resolve([from ...], to)
485548
- resolve: function resolve55() {
485548
+ resolve: function resolve56() {
485549
485549
  var resolvedPath = "";
485550
485550
  var resolvedAbsolute = false;
485551
485551
  var cwd4;
@@ -489736,12 +489736,12 @@ ${nodeLocation}` : message2;
489736
489736
  };
489737
489737
  var NodeRuntimeFileSystem = class {
489738
489738
  delete(path13) {
489739
- return new Promise((resolve55, reject) => {
489739
+ return new Promise((resolve56, reject) => {
489740
489740
  fs__namespace.rm(path13, { recursive: true }, (err) => {
489741
489741
  if (err)
489742
489742
  reject(err);
489743
489743
  else
489744
- resolve55();
489744
+ resolve56();
489745
489745
  });
489746
489746
  });
489747
489747
  }
@@ -489760,12 +489760,12 @@ ${nodeLocation}` : message2;
489760
489760
  }));
489761
489761
  }
489762
489762
  readFile(filePath, encoding = "utf-8") {
489763
- return new Promise((resolve55, reject) => {
489763
+ return new Promise((resolve56, reject) => {
489764
489764
  fs__namespace.readFile(filePath, encoding, (err, data) => {
489765
489765
  if (err)
489766
489766
  reject(err);
489767
489767
  else
489768
- resolve55(data);
489768
+ resolve56(data);
489769
489769
  });
489770
489770
  });
489771
489771
  }
@@ -489773,12 +489773,12 @@ ${nodeLocation}` : message2;
489773
489773
  return fs__namespace.readFileSync(filePath, encoding);
489774
489774
  }
489775
489775
  async writeFile(filePath, fileText) {
489776
- await new Promise((resolve55, reject) => {
489776
+ await new Promise((resolve56, reject) => {
489777
489777
  fs__namespace.writeFile(filePath, fileText, (err) => {
489778
489778
  if (err)
489779
489779
  reject(err);
489780
489780
  else
489781
- resolve55();
489781
+ resolve56();
489782
489782
  });
489783
489783
  });
489784
489784
  }
@@ -489792,12 +489792,12 @@ ${nodeLocation}` : message2;
489792
489792
  fs__namespace.mkdirSync(dirPath, { recursive: true });
489793
489793
  }
489794
489794
  move(srcPath, destPath) {
489795
- return new Promise((resolve55, reject) => {
489795
+ return new Promise((resolve56, reject) => {
489796
489796
  fs__namespace.rename(srcPath, destPath, (err) => {
489797
489797
  if (err)
489798
489798
  reject(err);
489799
489799
  else
489800
- resolve55();
489800
+ resolve56();
489801
489801
  });
489802
489802
  });
489803
489803
  }
@@ -489805,12 +489805,12 @@ ${nodeLocation}` : message2;
489805
489805
  fs__namespace.renameSync(srcPath, destPath);
489806
489806
  }
489807
489807
  copy(srcPath, destPath) {
489808
- return new Promise((resolve55, reject) => {
489808
+ return new Promise((resolve56, reject) => {
489809
489809
  fs__namespace.copyFile(srcPath, destPath, (err) => {
489810
489810
  if (err)
489811
489811
  reject(err);
489812
489812
  else
489813
- resolve55();
489813
+ resolve56();
489814
489814
  });
489815
489815
  });
489816
489816
  }
@@ -489818,15 +489818,15 @@ ${nodeLocation}` : message2;
489818
489818
  fs__namespace.copyFileSync(srcPath, destPath);
489819
489819
  }
489820
489820
  stat(path13) {
489821
- return new Promise((resolve55, reject) => {
489821
+ return new Promise((resolve56, reject) => {
489822
489822
  fs__namespace.stat(path13, (err, stat7) => {
489823
489823
  if (err) {
489824
489824
  if (err.code === "ENOENT" || err.code === "ENOTDIR")
489825
- resolve55(void 0);
489825
+ resolve56(void 0);
489826
489826
  else
489827
489827
  reject(err);
489828
489828
  } else {
489829
- resolve55(stat7);
489829
+ resolve56(stat7);
489830
489830
  }
489831
489831
  });
489832
489832
  });
@@ -516313,7 +516313,7 @@ function ensureLuxttsDaemon() {
516313
516313
  if (!existsSync44(venvPy) || !existsSync44(inferScript))
516314
516314
  return Promise.resolve(false);
516315
516315
  _luxttsStarting = true;
516316
- return new Promise((resolve55) => {
516316
+ return new Promise((resolve56) => {
516317
516317
  let settled = false;
516318
516318
  let timeout2;
516319
516319
  const finish = (ready) => {
@@ -516321,7 +516321,7 @@ function ensureLuxttsDaemon() {
516321
516321
  return;
516322
516322
  settled = true;
516323
516323
  clearTimeout(timeout2);
516324
- resolve55(ready);
516324
+ resolve56(ready);
516325
516325
  };
516326
516326
  timeout2 = setTimeout(() => {
516327
516327
  _luxttsStarting = false;
@@ -516387,7 +516387,7 @@ function ensureLuxttsDaemon() {
516387
516387
  });
516388
516388
  }
516389
516389
  function luxttsSynthesize(text, cloneRef, outputPath3, speed = 1) {
516390
- return new Promise((resolve55, reject) => {
516390
+ return new Promise((resolve56, reject) => {
516391
516391
  if (!_luxttsDaemon || !_luxttsReady) {
516392
516392
  reject(new Error("Daemon not ready"));
516393
516393
  return;
@@ -516401,7 +516401,7 @@ function luxttsSynthesize(text, cloneRef, outputPath3, speed = 1) {
516401
516401
  _luxttsPending.set(id, {
516402
516402
  resolve: (path12) => {
516403
516403
  clearTimeout(timeout2);
516404
- resolve55(path12 || outPath);
516404
+ resolve56(path12 || outPath);
516405
516405
  },
516406
516406
  reject: (err) => {
516407
516407
  clearTimeout(timeout2);
@@ -521924,7 +521924,7 @@ var init_transport5 = __esm({
521924
521924
  });
521925
521925
  }
521926
521926
  request(req2, timeoutMs = 3e4) {
521927
- return new Promise((resolve55, reject) => {
521927
+ return new Promise((resolve56, reject) => {
521928
521928
  if (!this.process || !this._connected) {
521929
521929
  return reject(new Error("Transport not connected"));
521930
521930
  }
@@ -521932,7 +521932,7 @@ var init_transport5 = __esm({
521932
521932
  this.pending.delete(req2.id);
521933
521933
  reject(new Error(`MCP request timeout after ${timeoutMs}ms: ${req2.method}`));
521934
521934
  }, timeoutMs);
521935
- this.pending.set(req2.id, { resolve: resolve55, reject, timer });
521935
+ this.pending.set(req2.id, { resolve: resolve56, reject, timer });
521936
521936
  const line = JSON.stringify(req2) + "\n";
521937
521937
  this.process.stdin?.write(line, (err) => {
521938
521938
  if (err) {
@@ -525129,7 +525129,7 @@ import { spawn as spawn21 } from "node:child_process";
525129
525129
  async function runShell(options2) {
525130
525130
  const { command, args = [], cwd: cwd4, env: env2, timeoutMs = DEFAULT_TIMEOUT_MS2 } = options2;
525131
525131
  const mergedEnv = env2 ? { ...process.env, ...env2 } : process.env;
525132
- return new Promise((resolve55) => {
525132
+ return new Promise((resolve56) => {
525133
525133
  const start2 = Date.now();
525134
525134
  let timedOut = false;
525135
525135
  const child = spawn21(command, args, {
@@ -525153,7 +525153,7 @@ async function runShell(options2) {
525153
525153
  clearTimeout(timer);
525154
525154
  const durationMs = Date.now() - start2;
525155
525155
  const exitCode = timedOut ? -1 : code8 ?? -1;
525156
- resolve55({
525156
+ resolve56({
525157
525157
  stdout,
525158
525158
  stderr,
525159
525159
  exitCode,
@@ -525165,7 +525165,7 @@ async function runShell(options2) {
525165
525165
  child.on("error", (err) => {
525166
525166
  clearTimeout(timer);
525167
525167
  const durationMs = Date.now() - start2;
525168
- resolve55({
525168
+ resolve56({
525169
525169
  stdout,
525170
525170
  stderr: stderr + err.message,
525171
525171
  exitCode: -1,
@@ -525280,7 +525280,7 @@ async function applyUnifiedDiff(patch) {
525280
525280
  }
525281
525281
  function runWithStdin(options2) {
525282
525282
  const { command, args, cwd: cwd4, stdin } = options2;
525283
- return new Promise((resolve55) => {
525283
+ return new Promise((resolve56) => {
525284
525284
  const child = spawn22(command, args, {
525285
525285
  cwd: cwd4,
525286
525286
  stdio: ["pipe", "pipe", "pipe"]
@@ -525297,10 +525297,10 @@ function runWithStdin(options2) {
525297
525297
  child.stdin.end();
525298
525298
  child.on("close", (code8) => {
525299
525299
  const exitCode = code8 ?? -1;
525300
- resolve55({ success: exitCode === 0, exitCode, stdout, stderr });
525300
+ resolve56({ success: exitCode === 0, exitCode, stdout, stderr });
525301
525301
  });
525302
525302
  child.on("error", (err) => {
525303
- resolve55({ success: false, exitCode: -1, stdout, stderr: err.message });
525303
+ resolve56({ success: false, exitCode: -1, stdout, stderr: err.message });
525304
525304
  });
525305
525305
  });
525306
525306
  }
@@ -528596,12 +528596,12 @@ async function maybeApplyInference(scan, options2, system) {
528596
528596
  }
528597
528597
  function makeSystem(overrides) {
528598
528598
  const base3 = {
528599
- runCommand: (command, args, timeoutMs) => new Promise((resolve55, reject) => {
528599
+ runCommand: (command, args, timeoutMs) => new Promise((resolve56, reject) => {
528600
528600
  execFile5(command, args, { encoding: "utf8", timeout: timeoutMs }, (err, stdout) => {
528601
528601
  if (err)
528602
528602
  reject(err);
528603
528603
  else
528604
- resolve55(stdout);
528604
+ resolve56(stdout);
528605
528605
  });
528606
528606
  }),
528607
528607
  readFile: async (path12) => fsReadFile(path12, "utf8"),
@@ -528627,7 +528627,7 @@ function makeSystem(overrides) {
528627
528627
  return false;
528628
528628
  }
528629
528629
  },
528630
- sleep: (ms) => new Promise((resolve55) => setTimeout(resolve55, ms)),
528630
+ sleep: (ms) => new Promise((resolve56) => setTimeout(resolve56, ms)),
528631
528631
  now: () => Date.now()
528632
528632
  };
528633
528633
  return { ...base3, ...overrides ?? {} };
@@ -529015,11 +529015,11 @@ function inferHomeFromProcUid(pid) {
529015
529015
  async function detectGpus() {
529016
529016
  if (_nvidiaSmiAvailable === false)
529017
529017
  return [];
529018
- return new Promise((resolve55) => {
529018
+ return new Promise((resolve56) => {
529019
529019
  exec2("nvidia-smi --query-gpu=index,uuid,name,memory.total,memory.free,utilization.gpu --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => {
529020
529020
  if (err) {
529021
529021
  _nvidiaSmiAvailable = false;
529022
- resolve55([]);
529022
+ resolve56([]);
529023
529023
  return;
529024
529024
  }
529025
529025
  _nvidiaSmiAvailable = true;
@@ -529040,7 +529040,7 @@ async function detectGpus() {
529040
529040
  utilization: Number(parts[5]) || 0
529041
529041
  });
529042
529042
  }
529043
- resolve55(gpus);
529043
+ resolve56(gpus);
529044
529044
  });
529045
529045
  });
529046
529046
  }
@@ -529113,11 +529113,11 @@ function snapshotNetwork() {
529113
529113
  async function findFreePort(start2) {
529114
529114
  let port = start2;
529115
529115
  for (; port < start2 + 1e3; port++) {
529116
- const free = await new Promise((resolve55) => {
529116
+ const free = await new Promise((resolve56) => {
529117
529117
  const probe = createServer3();
529118
- probe.once("error", () => resolve55(false));
529118
+ probe.once("error", () => resolve56(false));
529119
529119
  probe.listen(port, "127.0.0.1", () => {
529120
- probe.close(() => resolve55(true));
529120
+ probe.close(() => resolve56(true));
529121
529121
  });
529122
529122
  });
529123
529123
  if (free)
@@ -529492,7 +529492,7 @@ var init_ollama_pool = __esm({
529492
529492
  this.recordAffinity(agentId, pick.state.id);
529493
529493
  return this.buildSlot(pick, agentId);
529494
529494
  }
529495
- await new Promise((resolve55) => this.slotWaiters.push(resolve55));
529495
+ await new Promise((resolve56) => this.slotWaiters.push(resolve56));
529496
529496
  }
529497
529497
  }
529498
529498
  wakeNextSlotWaiter() {
@@ -546849,8 +546849,8 @@ ${notice}`;
546849
546849
  async waitIfPaused() {
546850
546850
  if (!this._paused)
546851
546851
  return true;
546852
- await new Promise((resolve55) => {
546853
- this._pauseResolve = resolve55;
546852
+ await new Promise((resolve56) => {
546853
+ this._pauseResolve = resolve56;
546854
546854
  });
546855
546855
  return !this.aborted;
546856
546856
  }
@@ -552577,14 +552577,14 @@ Full content available via: repl_exec(code="data = retrieve('${handleId}')") or
552577
552577
  waitForSudoPassword(timeoutMs = 12e4) {
552578
552578
  if (this._sudoPassword)
552579
552579
  return Promise.resolve(this._sudoPassword);
552580
- return new Promise((resolve55) => {
552580
+ return new Promise((resolve56) => {
552581
552581
  const timer = setTimeout(() => {
552582
552582
  this._sudoResolve = null;
552583
- resolve55(null);
552583
+ resolve56(null);
552584
552584
  }, timeoutMs);
552585
552585
  this._sudoResolve = (pw2) => {
552586
552586
  clearTimeout(timer);
552587
- resolve55(pw2);
552587
+ resolve56(pw2);
552588
552588
  };
552589
552589
  });
552590
552590
  }
@@ -553307,7 +553307,7 @@ Describe what you see and integrate this into your current approach.` : "[User s
553307
553307
  }
553308
553308
  async extractImageOcrText(tmpImgPath) {
553309
553309
  try {
553310
- const stdout = await new Promise((resolve55, reject) => {
553310
+ const stdout = await new Promise((resolve56, reject) => {
553311
553311
  _execFile("tesseract", [tmpImgPath, "stdout"], {
553312
553312
  encoding: "utf8",
553313
553313
  timeout: 15e3,
@@ -553317,7 +553317,7 @@ Describe what you see and integrate this into your current approach.` : "[User s
553317
553317
  reject(err);
553318
553318
  return;
553319
553319
  }
553320
- resolve55(out);
553320
+ resolve56(out);
553321
553321
  });
553322
553322
  });
553323
553323
  return stdout.trim();
@@ -556886,12 +556886,12 @@ var init_nexusBackend = __esm({
556886
556886
  const deadline = Date.now() + (request.timeoutMs ?? 12e4);
556887
556887
  try {
556888
556888
  while (!done && Date.now() < deadline) {
556889
- await new Promise((resolve55) => {
556889
+ await new Promise((resolve56) => {
556890
556890
  let resolved = false;
556891
556891
  const finish = () => {
556892
556892
  if (!resolved) {
556893
556893
  resolved = true;
556894
- resolve55();
556894
+ resolve56();
556895
556895
  }
556896
556896
  };
556897
556897
  let watcher = null;
@@ -561332,7 +561332,7 @@ async function transcribeFileViaWhisper(filePath, model) {
561332
561332
  const exe = process.platform === "win32" ? "python.exe" : "python3";
561333
561333
  const venvPython2 = join102(homedir32(), ".omnius", "venv", bin, exe);
561334
561334
  if (!existsSync87(venvPython2)) return null;
561335
- return new Promise((resolve55) => {
561335
+ return new Promise((resolve56) => {
561336
561336
  const child = spawn24(venvPython2, [script], {
561337
561337
  stdio: ["pipe", "pipe", "pipe"],
561338
561338
  env: process.env
@@ -561346,7 +561346,7 @@ async function transcribeFileViaWhisper(filePath, model) {
561346
561346
  child.kill("SIGTERM");
561347
561347
  } catch {
561348
561348
  }
561349
- resolve55(val ? parse3(val) : null);
561349
+ resolve56(val ? parse3(val) : null);
561350
561350
  };
561351
561351
  function parse3(raw) {
561352
561352
  try {
@@ -561366,10 +561366,10 @@ async function transcribeFileViaWhisper(filePath, model) {
561366
561366
  });
561367
561367
  child.once("error", () => stop2(null));
561368
561368
  child.once("close", () => {
561369
- if (out.trim()) resolve55(parse3(out));
561369
+ if (out.trim()) resolve56(parse3(out));
561370
561370
  else {
561371
561371
  void err;
561372
- resolve55(null);
561372
+ resolve56(null);
561373
561373
  }
561374
561374
  });
561375
561375
  timer = setTimeout(() => stop2(null), 12e4);
@@ -561456,9 +561456,9 @@ function ensureTranscribeCliBackground() {
561456
561456
  }
561457
561457
  try {
561458
561458
  const { exec: exec6 } = await import("node:child_process");
561459
- return new Promise((resolve55) => {
561459
+ return new Promise((resolve56) => {
561460
561460
  exec6("npm i -g transcribe-cli", { timeout: 18e4 }, (err) => {
561461
- resolve55(!err);
561461
+ resolve56(!err);
561462
561462
  });
561463
561463
  });
561464
561464
  } catch {
@@ -561548,7 +561548,7 @@ var init_listen = __esm({
561548
561548
  stdio: ["pipe", "pipe", "pipe"],
561549
561549
  env: { ...process.env }
561550
561550
  });
561551
- return new Promise((resolve55, reject) => {
561551
+ return new Promise((resolve56, reject) => {
561552
561552
  const timeout2 = setTimeout(() => {
561553
561553
  reject(new Error("Whisper fallback: model load timeout (5 min). First run downloads the model."));
561554
561554
  }, 3e5);
@@ -561564,7 +561564,7 @@ var init_listen = __esm({
561564
561564
  this._ready = true;
561565
561565
  clearTimeout(timeout2);
561566
561566
  this.emit("ready");
561567
- resolve55();
561567
+ resolve56();
561568
561568
  break;
561569
561569
  case "transcript":
561570
561570
  this.emit("transcript", {
@@ -561809,11 +561809,11 @@ var init_listen = __esm({
561809
561809
  this.liveTranscriber.on("error", (err) => {
561810
561810
  this.emit("error", err);
561811
561811
  });
561812
- await new Promise((resolve55, reject) => {
561812
+ await new Promise((resolve56, reject) => {
561813
561813
  const timeout2 = setTimeout(() => reject(new Error("Model load timeout (60s)")), 6e4);
561814
561814
  this.liveTranscriber.on("ready", () => {
561815
561815
  clearTimeout(timeout2);
561816
- resolve55();
561816
+ resolve56();
561817
561817
  });
561818
561818
  this.liveTranscriber.on("error", (err) => {
561819
561819
  clearTimeout(timeout2);
@@ -562039,11 +562039,11 @@ transcribe-cli error: ${transcribeCliError}` : "";
562039
562039
  sampleWidth: 2,
562040
562040
  chunkDuration: 3
562041
562041
  });
562042
- await new Promise((resolve55, reject) => {
562042
+ await new Promise((resolve56, reject) => {
562043
562043
  const timeout2 = setTimeout(() => reject(new Error("Model load timeout (60s)")), 6e4);
562044
562044
  transcriber.on("ready", () => {
562045
562045
  clearTimeout(timeout2);
562046
- resolve55();
562046
+ resolve56();
562047
562047
  });
562048
562048
  transcriber.on("error", (err) => {
562049
562049
  clearTimeout(timeout2);
@@ -570185,8 +570185,8 @@ var init_voice_session = __esm({
570185
570185
  socket.destroy();
570186
570186
  }
570187
570187
  });
570188
- await new Promise((resolve55, reject) => {
570189
- this.server.listen(port, "127.0.0.1", () => resolve55());
570188
+ await new Promise((resolve56, reject) => {
570189
+ this.server.listen(port, "127.0.0.1", () => resolve56());
570190
570190
  this.server.on("error", reject);
570191
570191
  });
570192
570192
  try {
@@ -570401,7 +570401,7 @@ var init_voice_session = __esm({
570401
570401
  }
570402
570402
  // ── Cloudflared tunnel ────────────────────────────────────────────────
570403
570403
  startCloudflared(port) {
570404
- return new Promise((resolve55, reject) => {
570404
+ return new Promise((resolve56, reject) => {
570405
570405
  const timeout2 = setTimeout(() => {
570406
570406
  reject(new Error("Cloudflared tunnel start timeout (30s)"));
570407
570407
  }, 3e4);
@@ -570419,7 +570419,7 @@ var init_voice_session = __esm({
570419
570419
  if (urlMatch && !urlFound) {
570420
570420
  urlFound = true;
570421
570421
  clearTimeout(timeout2);
570422
- resolve55(urlMatch[0]);
570422
+ resolve56(urlMatch[0]);
570423
570423
  }
570424
570424
  };
570425
570425
  this.cloudflaredProcess.stdout?.on("data", handleOutput);
@@ -570459,13 +570459,13 @@ var init_voice_session = __esm({
570459
570459
  }
570460
570460
  // ── Helpers ───────────────────────────────────────────────────────────
570461
570461
  findFreePort() {
570462
- return new Promise((resolve55, reject) => {
570462
+ return new Promise((resolve56, reject) => {
570463
570463
  const srv = createServer4();
570464
570464
  srv.listen(0, "127.0.0.1", () => {
570465
570465
  const addr = srv.address();
570466
570466
  if (addr && typeof addr === "object") {
570467
570467
  const port = addr.port;
570468
- srv.close(() => resolve55(port));
570468
+ srv.close(() => resolve56(port));
570469
570469
  } else {
570470
570470
  srv.close(() => reject(new Error("Could not find free port")));
570471
570471
  }
@@ -571343,11 +571343,11 @@ async function collectSystemMetricsAsync() {
571343
571343
  vramUtilization: 0
571344
571344
  };
571345
571345
  try {
571346
- const smi = await new Promise((resolve55, reject) => {
571346
+ const smi = await new Promise((resolve56, reject) => {
571347
571347
  exec3(
571348
571348
  "nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null",
571349
571349
  { encoding: "utf8", timeout: 3e3 },
571350
- (err, stdout) => err ? reject(err) : resolve55(stdout)
571350
+ (err, stdout) => err ? reject(err) : resolve56(stdout)
571351
571351
  );
571352
571352
  });
571353
571353
  const line = smi.trim().split("\n")[0];
@@ -571551,8 +571551,8 @@ var init_expose = __esm({
571551
571551
  if (this.server) throw new Error("Gateway already running");
571552
571552
  const port = await this.findFreePort();
571553
571553
  this.server = this.createProxyServer(port);
571554
- await new Promise((resolve55, reject) => {
571555
- this.server.listen(port, "127.0.0.1", () => resolve55());
571554
+ await new Promise((resolve56, reject) => {
571555
+ this.server.listen(port, "127.0.0.1", () => resolve56());
571556
571556
  this.server.on("error", reject);
571557
571557
  });
571558
571558
  let lastStartErr;
@@ -571622,8 +571622,8 @@ var init_expose = __esm({
571622
571622
  this._cloudflaredPid = state.pid;
571623
571623
  this._proxyPort = state.proxyPort;
571624
571624
  this.server = this.createProxyServer(state.proxyPort);
571625
- await new Promise((resolve55, reject) => {
571626
- this.server.listen(state.proxyPort, "127.0.0.1", () => resolve55());
571625
+ await new Promise((resolve56, reject) => {
571626
+ this.server.listen(state.proxyPort, "127.0.0.1", () => resolve56());
571627
571627
  this.server.on("error", reject);
571628
571628
  });
571629
571629
  this._stats.status = "active";
@@ -571648,8 +571648,8 @@ var init_expose = __esm({
571648
571648
  }
571649
571649
  this._cloudflaredPid = null;
571650
571650
  if (this.server) {
571651
- await new Promise((resolve55) => {
571652
- this.server.close(() => resolve55());
571651
+ await new Promise((resolve56) => {
571652
+ this.server.close(() => resolve56());
571653
571653
  });
571654
571654
  this.server = null;
571655
571655
  }
@@ -572050,7 +572050,7 @@ var init_expose = __esm({
572050
572050
  _proxyPort = 0;
572051
572051
  startCloudflared(port) {
572052
572052
  this._proxyPort = port;
572053
- return new Promise((resolve55, reject) => {
572053
+ return new Promise((resolve56, reject) => {
572054
572054
  const TUNNEL_TIMEOUT_MS = 6e4;
572055
572055
  const timeout2 = setTimeout(() => {
572056
572056
  reject(new Error("Cloudflared tunnel start timeout (60s). Slow network? Try again."));
@@ -572093,7 +572093,7 @@ var init_expose = __esm({
572093
572093
  this.cloudflaredProcess?.unref();
572094
572094
  this.cloudflaredProcess?.stdout?.destroy();
572095
572095
  this.cloudflaredProcess?.stderr?.destroy();
572096
- resolve55(urlMatch[0]);
572096
+ resolve56(urlMatch[0]);
572097
572097
  }
572098
572098
  };
572099
572099
  this.cloudflaredProcess.stdout?.on("data", handleOutput);
@@ -572214,13 +572214,13 @@ ${this.formatConnectionInfo()}`);
572214
572214
  }
572215
572215
  // ── Helpers ─────────────────────────────────────────────────────────────
572216
572216
  findFreePort() {
572217
- return new Promise((resolve55, reject) => {
572217
+ return new Promise((resolve56, reject) => {
572218
572218
  const srv = createServer5();
572219
572219
  srv.listen(0, "127.0.0.1", () => {
572220
572220
  const addr = srv.address();
572221
572221
  if (addr && typeof addr === "object") {
572222
572222
  const port = addr.port;
572223
- srv.close(() => resolve55(port));
572223
+ srv.close(() => resolve56(port));
572224
572224
  } else {
572225
572225
  srv.close(() => reject(new Error("Could not find free port")));
572226
572226
  }
@@ -573158,8 +573158,8 @@ var init_peer_mesh = __esm({
573158
573158
  this.wss.on("connection", (ws, req2) => {
573159
573159
  this.handleInboundConnection(ws, req2.url ?? "");
573160
573160
  });
573161
- await new Promise((resolve55, reject) => {
573162
- this.server.listen(port, "127.0.0.1", () => resolve55());
573161
+ await new Promise((resolve56, reject) => {
573162
+ this.server.listen(port, "127.0.0.1", () => resolve56());
573163
573163
  this.server.on("error", reject);
573164
573164
  });
573165
573165
  this.pingTimer = setInterval(() => this.pingAll(), PING_INTERVAL_MS);
@@ -573198,7 +573198,7 @@ var init_peer_mesh = __esm({
573198
573198
  this.wss = null;
573199
573199
  }
573200
573200
  if (this.server) {
573201
- await new Promise((resolve55) => this.server.close(() => resolve55()));
573201
+ await new Promise((resolve56) => this.server.close(() => resolve56()));
573202
573202
  this.server = null;
573203
573203
  }
573204
573204
  this.emit("stopped");
@@ -573212,7 +573212,7 @@ var init_peer_mesh = __esm({
573212
573212
  else if (!wsUrl.startsWith("ws://") && !wsUrl.startsWith("wss://")) wsUrl = `ws://${wsUrl}`;
573213
573213
  if (!wsUrl.includes("/p2p")) wsUrl += "/p2p";
573214
573214
  wsUrl += `?key=${encodeURIComponent(this._authKey)}`;
573215
- return new Promise((resolve55, reject) => {
573215
+ return new Promise((resolve56, reject) => {
573216
573216
  const ws = new import_websocket5.default(wsUrl, { handshakeTimeout: 1e4 });
573217
573217
  let resolved = false;
573218
573218
  const timeout2 = setTimeout(() => {
@@ -573252,7 +573252,7 @@ var init_peer_mesh = __esm({
573252
573252
  this.connections.set(peer.peerId, ws);
573253
573253
  this.setupPeerHandlers(ws, peer.peerId);
573254
573254
  this.emit("peer_connected", peer);
573255
- resolve55(peer);
573255
+ resolve56(peer);
573256
573256
  } else {
573257
573257
  this.handleMessage(msg, ws);
573258
573258
  }
@@ -573309,12 +573309,12 @@ var init_peer_mesh = __esm({
573309
573309
  throw new Error(`Peer ${peerId} not connected`);
573310
573310
  }
573311
573311
  const msgId = randomBytes22(8).toString("hex");
573312
- return new Promise((resolve55, reject) => {
573312
+ return new Promise((resolve56, reject) => {
573313
573313
  const timeout2 = setTimeout(() => {
573314
573314
  this.pendingRequests.delete(msgId);
573315
573315
  reject(new Error(`Inference timeout (${timeoutMs}ms)`));
573316
573316
  }, timeoutMs);
573317
- this.pendingRequests.set(msgId, { resolve: resolve55, reject, timeout: timeout2, chunks: [] });
573317
+ this.pendingRequests.set(msgId, { resolve: resolve56, reject, timeout: timeout2, chunks: [] });
573318
573318
  this.sendMsg(ws, "infer_request", request, msgId);
573319
573319
  });
573320
573320
  }
@@ -573531,13 +573531,13 @@ var init_peer_mesh = __esm({
573531
573531
  ws.send(JSON.stringify(msg));
573532
573532
  }
573533
573533
  findFreePort() {
573534
- return new Promise((resolve55, reject) => {
573534
+ return new Promise((resolve56, reject) => {
573535
573535
  const srv = createServer6();
573536
573536
  srv.listen(0, "127.0.0.1", () => {
573537
573537
  const addr = srv.address();
573538
573538
  if (addr && typeof addr === "object") {
573539
573539
  const port = addr.port;
573540
- srv.close(() => resolve55(port));
573540
+ srv.close(() => resolve56(port));
573541
573541
  } else {
573542
573542
  srv.close(() => reject(new Error("Could not find free port")));
573543
573543
  }
@@ -574164,7 +574164,7 @@ If you don't supply one within ${timeoutSec}s, I will fall back to a non-gated a
574164
574164
  fallbackBit.trim()
574165
574165
  ].join("\n")
574166
574166
  );
574167
- return new Promise((resolve55) => {
574167
+ return new Promise((resolve56) => {
574168
574168
  const timer = setTimeout(() => {
574169
574169
  const ref = pending;
574170
574170
  pending = null;
@@ -574173,13 +574173,13 @@ If you don't supply one within ${timeoutSec}s, I will fall back to a non-gated a
574173
574173
  `No HF token supplied within ${timeoutSec}s — falling back to a non-gated alternative for ${opts.model}.`
574174
574174
  );
574175
574175
  }
574176
- resolve55(null);
574176
+ resolve56(null);
574177
574177
  }, timeoutMs);
574178
574178
  if (typeof timer.unref === "function") timer.unref();
574179
574179
  pending = {
574180
574180
  model: opts.model,
574181
574181
  onMessage: opts.onMessage,
574182
- resolve: resolve55,
574182
+ resolve: resolve56,
574183
574183
  timer,
574184
574184
  startedAt: Date.now()
574185
574185
  };
@@ -574441,20 +574441,35 @@ __export(omnius_directory_exports, {
574441
574441
  saveSessionContext: () => saveSessionContext,
574442
574442
  saveSessionHistory: () => saveSessionHistory,
574443
574443
  sessionContextToHistoryBoxData: () => sessionContextToHistoryBoxData,
574444
+ stopOmniusGitignoreWatcher: () => stopOmniusGitignoreWatcher,
574444
574445
  writeIndexData: () => writeIndexData,
574445
574446
  writeIndexMeta: () => writeIndexMeta,
574446
574447
  writeTaskHandoff: () => writeTaskHandoff2
574447
574448
  });
574448
- import { appendFileSync as appendFileSync6, cpSync as cpSync2, existsSync as existsSync94, mkdirSync as mkdirSync53, readFileSync as readFileSync75, writeFileSync as writeFileSync48, readdirSync as readdirSync31, statSync as statSync36, unlinkSync as unlinkSync17, openSync as openSync2, closeSync as closeSync2, renameSync as renameSync4 } from "node:fs";
574449
- import { join as join110, relative as relative9, basename as basename21, dirname as dirname31 } from "node:path";
574449
+ import { appendFileSync as appendFileSync6, cpSync as cpSync2, existsSync as existsSync94, mkdirSync as mkdirSync53, readFileSync as readFileSync75, writeFileSync as writeFileSync48, readdirSync as readdirSync31, statSync as statSync36, unlinkSync as unlinkSync17, openSync as openSync2, closeSync as closeSync2, renameSync as renameSync4, watch as fsWatch2 } from "node:fs";
574450
+ import { join as join110, relative as relative9, basename as basename21, dirname as dirname31, resolve as resolve41 } from "node:path";
574450
574451
  import { homedir as homedir34 } from "node:os";
574451
574452
  import { createHash as createHash23 } from "node:crypto";
574453
+ function isGitRoot(dir) {
574454
+ const gitPath = join110(dir, ".git");
574455
+ if (!existsSync94(gitPath)) return false;
574456
+ try {
574457
+ const stat7 = statSync36(gitPath);
574458
+ if (stat7.isFile()) {
574459
+ return readFileSync75(gitPath, "utf-8").trim().startsWith("gitdir:");
574460
+ }
574461
+ if (!stat7.isDirectory()) return false;
574462
+ return existsSync94(join110(gitPath, "HEAD")) || existsSync94(join110(gitPath, "config")) || existsSync94(join110(gitPath, "commondir"));
574463
+ } catch {
574464
+ return false;
574465
+ }
574466
+ }
574452
574467
  function findGitRoot(startDir) {
574453
574468
  let dir = startDir;
574454
574469
  const visited = /* @__PURE__ */ new Set();
574455
574470
  while (dir && !visited.has(dir)) {
574456
574471
  visited.add(dir);
574457
- if (existsSync94(join110(dir, ".git"))) return dir;
574472
+ if (isGitRoot(dir)) return dir;
574458
574473
  const parent = join110(dir, "..");
574459
574474
  if (parent === dir) break;
574460
574475
  dir = parent;
@@ -574475,6 +574490,20 @@ function findNearestExistingGitignore(startDir, gitRoot) {
574475
574490
  }
574476
574491
  return null;
574477
574492
  }
574493
+ function candidateGitignoreDirs(startDir, gitRoot) {
574494
+ const dirs = [];
574495
+ let dir = startDir;
574496
+ const visited = /* @__PURE__ */ new Set();
574497
+ while (dir && !visited.has(dir)) {
574498
+ visited.add(dir);
574499
+ dirs.push(dir);
574500
+ if (dir === gitRoot) break;
574501
+ const parent = join110(dir, "..");
574502
+ if (parent === dir) break;
574503
+ dir = parent;
574504
+ }
574505
+ return dirs;
574506
+ }
574478
574507
  function normalizeIgnoreRule(rule) {
574479
574508
  return rule.trim().replace(/\\/g, "/").replace(/^\.\//, "").replace(/^\/+/, "").replace(/\/+$/, "");
574480
574509
  }
@@ -574502,6 +574531,47 @@ function ensureOmniusIgnored(repoRoot) {
574502
574531
  "utf-8"
574503
574532
  );
574504
574533
  }
574534
+ function watchForOmniusGitignore(repoRoot) {
574535
+ const gitRoot = findGitRoot(repoRoot);
574536
+ if (!gitRoot) return;
574537
+ const key = resolve41(repoRoot);
574538
+ if (gitignoreWatchers.has(key)) return;
574539
+ const watchers = [];
574540
+ for (const dir of candidateGitignoreDirs(repoRoot, gitRoot)) {
574541
+ try {
574542
+ const watcher = fsWatch2(dir, { persistent: false }, (_event, filename) => {
574543
+ if (String(filename ?? "") !== ".gitignore") return;
574544
+ try {
574545
+ ensureOmniusIgnored(repoRoot);
574546
+ } catch {
574547
+ }
574548
+ const timer = setTimeout(() => {
574549
+ try {
574550
+ ensureOmniusIgnored(repoRoot);
574551
+ } catch {
574552
+ }
574553
+ }, 50);
574554
+ timer.unref?.();
574555
+ });
574556
+ watchers.push(watcher);
574557
+ } catch {
574558
+ }
574559
+ }
574560
+ if (watchers.length > 0) gitignoreWatchers.set(key, watchers);
574561
+ }
574562
+ function stopOmniusGitignoreWatcher(repoRoot) {
574563
+ const keys = repoRoot ? [resolve41(repoRoot)] : Array.from(gitignoreWatchers.keys());
574564
+ for (const key of keys) {
574565
+ const watchers = gitignoreWatchers.get(key) ?? [];
574566
+ for (const watcher of watchers) {
574567
+ try {
574568
+ watcher.close();
574569
+ } catch {
574570
+ }
574571
+ }
574572
+ gitignoreWatchers.delete(key);
574573
+ }
574574
+ }
574505
574575
  function migrateLegacyDirectories(repoRoot, omniusPath) {
574506
574576
  for (const legacyDir of LEGACY_DIRS) {
574507
574577
  const legacyPath = join110(repoRoot, legacyDir);
@@ -574527,6 +574597,10 @@ function initOmniusDirectory(repoRoot) {
574527
574597
  ensureOmniusIgnored(repoRoot);
574528
574598
  } catch {
574529
574599
  }
574600
+ try {
574601
+ watchForOmniusGitignore(repoRoot);
574602
+ } catch {
574603
+ }
574530
574604
  return omniusPath;
574531
574605
  }
574532
574606
  function hasOmniusDirectory(repoRoot) {
@@ -575483,7 +575557,7 @@ function deleteUsageRecord(kind, value2, repoRoot) {
575483
575557
  remove(join110(repoRoot, OMNIUS_DIR, USAGE_HISTORY_FILE));
575484
575558
  }
575485
575559
  }
575486
- var OMNIUS_DIR, LEGACY_DIRS, SUBDIRS, CONTEXT_FILES, PENDING_TASK_FILE, HANDOFF_FILE, CONTEXT_SAVE_FILE, CONTEXT_LEDGER_FILE, MAX_CONTEXT_ENTRIES, MAX_SESSION_DIARY_ENTRIES, SAME_TASK_REPLACE_WINDOW_MS, LOCK_TIMEOUT_MS, LOCK_RETRY_MS, LOCK_RETRY_MAX, SESSIONS_DIR, SESSIONS_INDEX, SKIP_DIRS2, HOME_SKIP_DIRS, USAGE_HISTORY_FILE, MAX_HISTORY_RECORDS;
575560
+ var OMNIUS_DIR, LEGACY_DIRS, SUBDIRS, gitignoreWatchers, CONTEXT_FILES, PENDING_TASK_FILE, HANDOFF_FILE, CONTEXT_SAVE_FILE, CONTEXT_LEDGER_FILE, MAX_CONTEXT_ENTRIES, MAX_SESSION_DIARY_ENTRIES, SAME_TASK_REPLACE_WINDOW_MS, LOCK_TIMEOUT_MS, LOCK_RETRY_MS, LOCK_RETRY_MAX, SESSIONS_DIR, SESSIONS_INDEX, SKIP_DIRS2, HOME_SKIP_DIRS, USAGE_HISTORY_FILE, MAX_HISTORY_RECORDS;
575487
575561
  var init_omnius_directory = __esm({
575488
575562
  "packages/cli/src/tui/omnius-directory.ts"() {
575489
575563
  "use strict";
@@ -575491,6 +575565,7 @@ var init_omnius_directory = __esm({
575491
575565
  OMNIUS_DIR = ".omnius";
575492
575566
  LEGACY_DIRS = [".oa", ".open-agents"];
575493
575567
  SUBDIRS = ["memory", "index", "context", "history", "notes", "embedded", "provenance", "tools", "dreams"];
575568
+ gitignoreWatchers = /* @__PURE__ */ new Map();
575494
575569
  CONTEXT_FILES = [
575495
575570
  "AGENTS.md",
575496
575571
  "Omnius.md",
@@ -575967,8 +576042,8 @@ async function collectNetworkMetrics() {
575967
576042
  }
575968
576043
  if (plat === "darwin") {
575969
576044
  try {
575970
- const output = await new Promise((resolve55, reject) => {
575971
- exec4("netstat -ib 2>/dev/null | head -30", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => err ? reject(err) : resolve55(stdout));
576045
+ const output = await new Promise((resolve56, reject) => {
576046
+ exec4("netstat -ib 2>/dev/null | head -30", { encoding: "utf8", timeout: 3e3 }, (err, stdout) => err ? reject(err) : resolve56(stdout));
575972
576047
  });
575973
576048
  let rxBytes = 0, txBytes = 0;
575974
576049
  for (const line of output.split("\n")) {
@@ -576010,11 +576085,11 @@ async function collectGpuMetrics() {
576010
576085
  };
576011
576086
  if (_nvidiaSmiAvailable2 === false) return noGpu;
576012
576087
  try {
576013
- const smi = await new Promise((resolve55, reject) => {
576088
+ const smi = await new Promise((resolve56, reject) => {
576014
576089
  exec4(
576015
576090
  "nvidia-smi --query-gpu=index,uuid,utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null",
576016
576091
  { encoding: "utf8", timeout: 3e3 },
576017
- (err, stdout) => err ? reject(err) : resolve55(stdout)
576092
+ (err, stdout) => err ? reject(err) : resolve56(stdout)
576018
576093
  );
576019
576094
  });
576020
576095
  _nvidiaSmiAvailable2 = true;
@@ -576518,7 +576593,7 @@ __export(tui_tasks_renderer_exports, {
576518
576593
  setTuiTasksSession: () => setTuiTasksSession,
576519
576594
  teardownTuiTasks: () => teardownTuiTasks
576520
576595
  });
576521
- import { existsSync as existsSync95, readFileSync as readFileSync76, watch as fsWatch2 } from "node:fs";
576596
+ import { existsSync as existsSync95, readFileSync as readFileSync76, watch as fsWatch3 } from "node:fs";
576522
576597
  import { join as join111 } from "node:path";
576523
576598
  import { homedir as homedir35 } from "node:os";
576524
576599
  function setTasksRendererWriter(writer) {
@@ -576624,7 +576699,7 @@ function teardownTuiTasks() {
576624
576699
  function installWatcher() {
576625
576700
  if (!_activeSessionId) return;
576626
576701
  try {
576627
- _watcher = fsWatch2(todoDir2(), { persistent: false }, (_evt, fname) => {
576702
+ _watcher = fsWatch3(todoDir2(), { persistent: false }, (_evt, fname) => {
576628
576703
  if (!fname || !_activeSessionId) return;
576629
576704
  const expected = `${_activeSessionId.replace(/[^a-zA-Z0-9_.-]/g, "_")}.json`;
576630
576705
  if (fname !== expected) return;
@@ -577125,6 +577200,7 @@ var init_status_bar = __esm({
577125
577200
  _inferenceCount = 0;
577126
577201
  _totalInferenceDurationMs = 0;
577127
577202
  _peakTokensPerSecond = 0;
577203
+ _tokensPerSecond = 0;
577128
577204
  _successfulToolCalls = 0;
577129
577205
  _failedToolCalls = 0;
577130
577206
  _toolCallBreakdown = [];
@@ -578393,6 +578469,7 @@ var init_status_bar = __esm({
578393
578469
  if (this._streamStartTime === 0) this._streamStartTime = Date.now();
578394
578470
  const elapsedSec = (Date.now() - this._streamStartTime) / 1e3;
578395
578471
  const tokenRate = elapsedSec > 0.1 ? this._streamingTokens / elapsedSec : 0;
578472
+ if (tokenRate > 0) this._tokensPerSecond = tokenRate;
578396
578473
  this._brailleSpinner.setMetrics({ tokenRate, isStreaming: true });
578397
578474
  if (!this._streamThrottleTimer && this.active) {
578398
578475
  this._streamThrottleTimer = setTimeout(() => {
@@ -578413,6 +578490,7 @@ var init_status_bar = __esm({
578413
578490
  this.metrics.estimatedContextTokens = 0;
578414
578491
  this.metrics.lastPromptTokens = 0;
578415
578492
  this.metrics.lastCompletionTokens = 0;
578493
+ this._tokensPerSecond = 0;
578416
578494
  this.pushSpinnerContextMetrics();
578417
578495
  if (this.active) this.renderFooterPreserveCursor();
578418
578496
  }
@@ -579783,6 +579861,11 @@ ${CONTENT_BG_SEQ}`);
579783
579861
  if (n2 < 1e6) return `${Math.round(n2 / 1e3)}K`;
579784
579862
  return `${(n2 / 1e6).toFixed(1)}M`;
579785
579863
  }
579864
+ static formatTokensPerSecond(n2) {
579865
+ if (!Number.isFinite(n2) || n2 <= 0) return "0";
579866
+ if (n2 < 100) return n2.toFixed(1);
579867
+ return Math.round(n2).toLocaleString();
579868
+ }
579786
579869
  /** Build the metrics line string with adaptive compaction */
579787
579870
  buildMetricsLine() {
579788
579871
  const m2 = this.metrics;
@@ -579810,10 +579893,13 @@ ${CONTENT_BG_SEQ}`);
579810
579893
  m2.totalTokens > 0 ? m2.totalTokens - m2.promptTokens : m2.estimatedContextTokens * 0.3
579811
579894
  );
579812
579895
  const tokOutVal = Math.max(0, tokOutRaw);
579813
- const tokExpanded = pastel2(117, "↑") + c3.bold(tokInRaw.toLocaleString()) + " " + pastel2(151, "↓") + c3.bold(tokOutVal.toLocaleString());
579814
- const tokCompact = pastel2(117, "↑") + c3.bold(_StatusBar.compactNum(tokInRaw)) + " " + pastel2(151, "↓") + c3.bold(_StatusBar.compactNum(tokOutVal));
579815
- const tokExpW = 1 + tokInRaw.toLocaleString().length + 1 + 1 + tokOutVal.toLocaleString().length;
579816
- const tokCompW = 1 + _StatusBar.compactNum(tokInRaw).length + 1 + 1 + _StatusBar.compactNum(tokOutVal).length;
579896
+ const tpsStr = _StatusBar.formatTokensPerSecond(this._tokensPerSecond);
579897
+ const tpsExpanded = " " + pastel2(222, "t/s") + " " + c3.bold(tpsStr);
579898
+ const tpsW = 1 + 3 + 1 + tpsStr.length;
579899
+ const tokExpanded = pastel2(117, "↑") + c3.bold(tokInRaw.toLocaleString()) + " " + pastel2(151, "↓") + c3.bold(tokOutVal.toLocaleString()) + tpsExpanded;
579900
+ const tokCompact = pastel2(117, "↑") + c3.bold(_StatusBar.compactNum(tokInRaw)) + " " + pastel2(151, "↓") + c3.bold(_StatusBar.compactNum(tokOutVal)) + tpsExpanded;
579901
+ const tokExpW = 1 + tokInRaw.toLocaleString().length + 1 + 1 + tokOutVal.toLocaleString().length + tpsW;
579902
+ const tokCompW = 1 + _StatusBar.compactNum(tokInRaw).length + 1 + 1 + _StatusBar.compactNum(tokOutVal).length + tpsW;
579817
579903
  sections.push({
579818
579904
  expanded: tokExpanded,
579819
579905
  compact: tokCompact,
@@ -580866,6 +580952,9 @@ ${CONTENT_BG_SEQ}`);
580866
580952
  recordInference(durationMs, tokensPerSecond) {
580867
580953
  this._inferenceCount++;
580868
580954
  this._totalInferenceDurationMs += durationMs;
580955
+ if (Number.isFinite(tokensPerSecond) && tokensPerSecond > 0) {
580956
+ this._tokensPerSecond = tokensPerSecond;
580957
+ }
580869
580958
  if (tokensPerSecond > this._peakTokensPerSecond) {
580870
580959
  this._peakTokensPerSecond = tokensPerSecond;
580871
580960
  }
@@ -581029,7 +581118,7 @@ function tuiSelect(opts) {
581029
581118
  let maxVisible = opts.maxVisible ?? Math.max(3, termRows() - selectChrome);
581030
581119
  let scrollOffset = 0;
581031
581120
  let lastRenderedLines = 0;
581032
- return new Promise((resolve55) => {
581121
+ return new Promise((resolve56) => {
581033
581122
  const stdin = process.stdin;
581034
581123
  const hadRawMode = stdin.isRaw;
581035
581124
  const savedRlListeners = [];
@@ -581205,10 +581294,10 @@ ${tuiBgSeq()}`);
581205
581294
  render2();
581206
581295
  } else if (hasBreadcrumbs) {
581207
581296
  cleanup();
581208
- resolve55({ confirmed: false, key: "__back__", index: cursor });
581297
+ resolve56({ confirmed: false, key: "__back__", index: cursor });
581209
581298
  } else {
581210
581299
  cleanup();
581211
- resolve55({ confirmed: false, key: null, index: cursor });
581300
+ resolve56({ confirmed: false, key: null, index: cursor });
581212
581301
  }
581213
581302
  return;
581214
581303
  }
@@ -581238,7 +581327,7 @@ ${tuiBgSeq()}`);
581238
581327
  if (!isSkippable(itemIdx) && matchSet.has(itemIdx)) {
581239
581328
  cursor = itemIdx;
581240
581329
  cleanup();
581241
- resolve55({ confirmed: true, key: items[cursor].key, index: cursor });
581330
+ resolve56({ confirmed: true, key: items[cursor].key, index: cursor });
581242
581331
  return;
581243
581332
  } else if (!isSkippable(itemIdx)) {
581244
581333
  cursor = itemIdx;
@@ -581321,7 +581410,7 @@ ${tuiBgSeq()}`);
581321
581410
  items.splice(deletedIdx, 1);
581322
581411
  if (items.length === 0) {
581323
581412
  cleanup();
581324
- resolve55({ confirmed: false, key: null, index: -1 });
581413
+ resolve56({ confirmed: false, key: null, index: -1 });
581325
581414
  return;
581326
581415
  }
581327
581416
  updateFilter();
@@ -581407,7 +581496,7 @@ ${tuiBgSeq()}`);
581407
581496
  done: () => render2(),
581408
581497
  resolve: (result) => {
581409
581498
  cleanup();
581410
- resolve55(result);
581499
+ resolve56(result);
581411
581500
  },
581412
581501
  getInput: (prompt, prefill) => getInputFromUser(prompt, prefill),
581413
581502
  render: () => render2(),
@@ -581416,7 +581505,7 @@ ${tuiBgSeq()}`);
581416
581505
  if (consumed) return;
581417
581506
  }
581418
581507
  cleanup();
581419
- resolve55({ confirmed: true, key: items[cursor].key, index: cursor });
581508
+ resolve56({ confirmed: true, key: items[cursor].key, index: cursor });
581420
581509
  }
581421
581510
  } else if (seq === "\x1B" || seq === "\x1B\x1B") {
581422
581511
  if (filter2) {
@@ -581428,14 +581517,14 @@ ${tuiBgSeq()}`);
581428
581517
  render2();
581429
581518
  } else if (hasBreadcrumbs) {
581430
581519
  cleanup();
581431
- resolve55({ confirmed: false, key: "__back__", index: cursor });
581520
+ resolve56({ confirmed: false, key: "__back__", index: cursor });
581432
581521
  } else {
581433
581522
  cleanup();
581434
- resolve55({ confirmed: false, key: null, index: cursor });
581523
+ resolve56({ confirmed: false, key: null, index: cursor });
581435
581524
  }
581436
581525
  } else if (seq === "") {
581437
581526
  cleanup();
581438
- resolve55({ confirmed: false, key: null, index: cursor });
581527
+ resolve56({ confirmed: false, key: null, index: cursor });
581439
581528
  } else if (seq === "" || seq === "\b") {
581440
581529
  if (filter2.length > 0) {
581441
581530
  filter2 = filter2.slice(0, -1);
@@ -581452,7 +581541,7 @@ ${tuiBgSeq()}`);
581452
581541
  render2();
581453
581542
  } else if (hasBreadcrumbs) {
581454
581543
  cleanup();
581455
- resolve55({ confirmed: false, key: "__back__", index: cursor });
581544
+ resolve56({ confirmed: false, key: "__back__", index: cursor });
581456
581545
  }
581457
581546
  } else if (seq.length === 1 && seq.charCodeAt(0) >= 32 && seq.charCodeAt(0) < 127) {
581458
581547
  if (opts.onCustomKey && !isSkippable(cursor) && matchSet.has(cursor)) {
@@ -581460,7 +581549,7 @@ ${tuiBgSeq()}`);
581460
581549
  done: () => render2(),
581461
581550
  resolve: (result) => {
581462
581551
  cleanup();
581463
- resolve55(result);
581552
+ resolve56(result);
581464
581553
  },
581465
581554
  getInput: (prompt, prefill) => getInputFromUser(prompt, prefill),
581466
581555
  render: () => render2(),
@@ -581558,7 +581647,7 @@ ${tuiBgSeq()}`);
581558
581647
  setTitle,
581559
581648
  resolve: (result) => {
581560
581649
  cleanup();
581561
- resolve55(result);
581650
+ resolve56(result);
581562
581651
  }
581563
581652
  });
581564
581653
  if (typeof maybeCleanup === "function") {
@@ -581614,7 +581703,7 @@ import { homedir as homedir36 } from "node:os";
581614
581703
  import { execSync as execSync50, spawn as spawn27 } from "node:child_process";
581615
581704
  import { fileURLToPath as fileURLToPath14 } from "node:url";
581616
581705
  function execAsync(cmd, opts = {}) {
581617
- return new Promise((resolve55, reject) => {
581706
+ return new Promise((resolve56, reject) => {
581618
581707
  const child = spawn27("bash", ["-c", cmd], {
581619
581708
  stdio: ["ignore", "pipe", "pipe"],
581620
581709
  timeout: opts.timeout ?? 3e5,
@@ -581629,7 +581718,7 @@ function execAsync(cmd, opts = {}) {
581629
581718
  stderr += d2.toString();
581630
581719
  });
581631
581720
  onChildClose(child, (code8, signal) => {
581632
- if (code8 === 0) resolve55(stdout.trim());
581721
+ if (code8 === 0) resolve56(stdout.trim());
581633
581722
  else reject(new Error(`Exit ${code8}${signal ? ` (signal: ${signal})` : ""}: ${stderr.slice(0, 500)}`));
581634
581723
  });
581635
581724
  onChildError(child, reject);
@@ -582379,7 +582468,7 @@ async function clonePersonaPlexVoice(inputWav, voiceName, onInfo) {
582379
582468
  }
582380
582469
  log22(`Cloning voice "${voiceName}" from ${inputWav}...`);
582381
582470
  log22("This requires loading the full 7B model — may take 30-60s...");
582382
- return new Promise((resolve55) => {
582471
+ return new Promise((resolve56) => {
582383
582472
  const child = spawn27(venvPython2, [
582384
582473
  cloneScript,
582385
582474
  "--input",
@@ -582407,10 +582496,10 @@ async function clonePersonaPlexVoice(inputWav, voiceName, onInfo) {
582407
582496
  onChildClose(child, (code8) => {
582408
582497
  if (code8 === 0 && existsSync96(outputPt)) {
582409
582498
  log22(`Voice "${voiceName}" cloned successfully.`);
582410
- resolve55(outputPt);
582499
+ resolve56(outputPt);
582411
582500
  } else {
582412
582501
  log22(`Voice cloning failed (exit ${code8}).`);
582413
- resolve55(null);
582502
+ resolve56(null);
582414
582503
  }
582415
582504
  });
582416
582505
  });
@@ -582960,12 +583049,12 @@ function calculateExpandedVariantContextWindow(specs, modelSizeGB2, kvBytesPerTo
582960
583049
  };
582961
583050
  }
582962
583051
  function ask(rl, question) {
582963
- return new Promise((resolve55) => {
582964
- rl.question(question, (answer) => resolve55(answer.trim()));
583052
+ return new Promise((resolve56) => {
583053
+ rl.question(question, (answer) => resolve56(answer.trim()));
582965
583054
  });
582966
583055
  }
582967
583056
  function askSecret(rl, question) {
582968
- return new Promise((resolve55) => {
583057
+ return new Promise((resolve56) => {
582969
583058
  process.stdout.write(question);
582970
583059
  let secret = "";
582971
583060
  const stdin = process.stdin;
@@ -582983,7 +583072,7 @@ function askSecret(rl, question) {
582983
583072
  stdin.setRawMode(hadRawMode ?? false);
582984
583073
  }
582985
583074
  process.stdout.write("\n");
582986
- resolve55(secret.trim());
583075
+ resolve56(secret.trim());
582987
583076
  return;
582988
583077
  } else if (c8 === "") {
582989
583078
  stdin.removeListener("data", onData);
@@ -582991,7 +583080,7 @@ function askSecret(rl, question) {
582991
583080
  stdin.setRawMode(hadRawMode ?? false);
582992
583081
  }
582993
583082
  process.stdout.write("\n");
582994
- resolve55("");
583083
+ resolve56("");
582995
583084
  return;
582996
583085
  } else if (c8 === "" || c8 === "\b") {
582997
583086
  if (secret.length > 0) {
@@ -583459,7 +583548,7 @@ async function ensureOllamaRunning(backendUrl2, rl) {
583459
583548
  return false;
583460
583549
  }
583461
583550
  for (let i2 = 0; i2 < 5; i2++) {
583462
- await new Promise((resolve55) => setTimeout(resolve55, 2e3));
583551
+ await new Promise((resolve56) => setTimeout(resolve56, 2e3));
583463
583552
  try {
583464
583553
  const resp = await fetch(`${backendUrl2}/api/tags`, {
583465
583554
  signal: AbortSignal.timeout(3e3)
@@ -584133,7 +584222,7 @@ ${c3.cyan(OMNIUS_FIRST_RUN_BANNER)}
584133
584222
  try {
584134
584223
  const child = spawn28("ollama", ["serve"], { stdio: "ignore", detached: true });
584135
584224
  child.unref();
584136
- await new Promise((resolve55) => setTimeout(resolve55, 3e3));
584225
+ await new Promise((resolve56) => setTimeout(resolve56, 3e3));
584137
584226
  try {
584138
584227
  models = await fetchOllamaModels(config.backendUrl);
584139
584228
  process.stdout.write(` ${c3.green("✔")} Ollama is running.
@@ -584161,7 +584250,7 @@ ${c3.cyan(OMNIUS_FIRST_RUN_BANNER)}
584161
584250
  try {
584162
584251
  const child = spawn28("ollama", ["serve"], { stdio: "ignore", detached: true });
584163
584252
  child.unref();
584164
- await new Promise((resolve55) => setTimeout(resolve55, 3e3));
584253
+ await new Promise((resolve56) => setTimeout(resolve56, 3e3));
584165
584254
  try {
584166
584255
  models = await fetchOllamaModels(config.backendUrl);
584167
584256
  process.stdout.write(` ${c3.green("✔")} Ollama is running.
@@ -586130,7 +586219,7 @@ var init_platforms = __esm({
586130
586219
 
586131
586220
  // packages/cli/src/tui/workspace-explorer.ts
586132
586221
  import { existsSync as existsSync99, readdirSync as readdirSync33, readFileSync as readFileSync80, statSync as statSync38 } from "node:fs";
586133
- import { basename as basename22, extname as extname12, join as join114, relative as relative10, resolve as resolve41 } from "node:path";
586222
+ import { basename as basename22, extname as extname12, join as join114, relative as relative10, resolve as resolve42 } from "node:path";
586134
586223
  function exploreWorkspace(root, options2 = {}) {
586135
586224
  const query = (options2.query ?? "").trim().toLowerCase();
586136
586225
  const maxResults = options2.maxResults ?? 80;
@@ -586212,8 +586301,8 @@ function formatWorkspaceExplorer(result) {
586212
586301
  function previewWorkspaceFile(root, relPath, options2 = {}) {
586213
586302
  const maxBytes = options2.maxBytes ?? 48 * 1024;
586214
586303
  const maxLines = options2.maxLines ?? 120;
586215
- const rootResolved = resolve41(root);
586216
- const full = resolve41(root, relPath);
586304
+ const rootResolved = resolve42(root);
586305
+ const full = resolve42(root, relPath);
586217
586306
  if (!full.startsWith(rootResolved + "/") && full !== rootResolved) {
586218
586307
  throw new Error("File path escapes workspace root");
586219
586308
  }
@@ -586319,7 +586408,7 @@ var init_workspace_explorer = __esm({
586319
586408
 
586320
586409
  // packages/cli/src/tui/drop-panel.ts
586321
586410
  import { existsSync as existsSync100 } from "node:fs";
586322
- import { extname as extname13, resolve as resolve42 } from "node:path";
586411
+ import { extname as extname13, resolve as resolve43 } from "node:path";
586323
586412
  function ansi4(code8, text) {
586324
586413
  return isTTY3 ? `\x1B[${code8}m${text}\x1B[0m` : text;
586325
586414
  }
@@ -586438,7 +586527,7 @@ function showDropPanel(opts) {
586438
586527
  if (filePath.startsWith("file://")) {
586439
586528
  filePath = decodeURIComponent(filePath.slice(7));
586440
586529
  }
586441
- filePath = resolve42(filePath);
586530
+ filePath = resolve43(filePath);
586442
586531
  if (!existsSync100(filePath)) {
586443
586532
  errorMsg = `File not found: ${filePath}`;
586444
586533
  render2();
@@ -589051,12 +589140,12 @@ function stopNeovimMode() {
589051
589140
  } catch {
589052
589141
  }
589053
589142
  const s2 = _state;
589054
- return new Promise((resolve55) => {
589143
+ return new Promise((resolve56) => {
589055
589144
  setTimeout(() => {
589056
589145
  if (s2 && !s2.cleanedUp) {
589057
589146
  doCleanup(s2);
589058
589147
  }
589059
- resolve55();
589148
+ resolve56();
589060
589149
  }, 300);
589061
589150
  });
589062
589151
  }
@@ -590448,7 +590537,7 @@ __export(image_ascii_preview_exports, {
590448
590537
  import { execFileSync as execFileSync6 } from "node:child_process";
590449
590538
  import { createRequire as createRequire5 } from "node:module";
590450
590539
  import { existsSync as existsSync105, readFileSync as readFileSync84, statSync as statSync39 } from "node:fs";
590451
- import { resolve as resolve43 } from "node:path";
590540
+ import { resolve as resolve44 } from "node:path";
590452
590541
  function clamp5(n2, min, max) {
590453
590542
  if (!Number.isFinite(n2)) return min;
590454
590543
  return Math.max(min, Math.min(max, Math.floor(n2)));
@@ -590712,7 +590801,7 @@ function convertWithFfmpeg(imagePath, width, height, timeoutMs) {
590712
590801
  }
590713
590802
  }
590714
590803
  async function buildImageAsciiPreview(inputPath, options2 = {}) {
590715
- const imagePath = resolve43(inputPath);
590804
+ const imagePath = resolve44(inputPath);
590716
590805
  if (!existsSync105(imagePath)) return null;
590717
590806
  try {
590718
590807
  if (!statSync39(imagePath).isFile()) return null;
@@ -590776,7 +590865,7 @@ function extractSavedImagePath(text, repoRoot) {
590776
590865
  if (!match?.[1]) continue;
590777
590866
  const raw = match[1].trim().replace(/\s+\([^)]+\)\s*$/g, "").replace(/^["']|["']$/g, "");
590778
590867
  if (!hasImageExtension(raw)) continue;
590779
- const candidate = raw.startsWith("/") ? raw : resolve43(repoRoot, raw);
590868
+ const candidate = raw.startsWith("/") ? raw : resolve44(repoRoot, raw);
590780
590869
  if (existsSync105(candidate)) return candidate;
590781
590870
  }
590782
590871
  return null;
@@ -592548,8 +592637,8 @@ except Exception as exc:
592548
592637
  async drainQueue() {
592549
592638
  this.speaking = true;
592550
592639
  if (!this.drainPromise) {
592551
- this.drainPromise = new Promise((resolve55) => {
592552
- this.drainResolve = resolve55;
592640
+ this.drainPromise = new Promise((resolve56) => {
592641
+ this.drainResolve = resolve56;
592553
592642
  });
592554
592643
  }
592555
592644
  let isFirst = true;
@@ -592629,7 +592718,7 @@ except Exception as exc:
592629
592718
  this.drainPromise = null;
592630
592719
  }
592631
592720
  sleep(ms) {
592632
- return new Promise((resolve55) => setTimeout(resolve55, ms));
592721
+ return new Promise((resolve56) => setTimeout(resolve56, ms));
592633
592722
  }
592634
592723
  // -------------------------------------------------------------------------
592635
592724
  // Synthesis pipeline
@@ -592927,7 +593016,7 @@ except Exception as exc:
592927
593016
  async playWav(path12) {
592928
593017
  const cmd = this.getPlayCommand(path12);
592929
593018
  if (!cmd) return;
592930
- return new Promise((resolve55) => {
593019
+ return new Promise((resolve56) => {
592931
593020
  const child = nodeSpawn(cmd[0], cmd.slice(1), {
592932
593021
  stdio: "ignore",
592933
593022
  detached: false
@@ -592935,11 +593024,11 @@ except Exception as exc:
592935
593024
  this.currentPlayback = child;
592936
593025
  onChildClose(child, () => {
592937
593026
  if (this.currentPlayback === child) this.currentPlayback = null;
592938
- resolve55();
593027
+ resolve56();
592939
593028
  });
592940
593029
  onChildError(child, () => {
592941
593030
  if (this.currentPlayback === child) this.currentPlayback = null;
592942
- resolve55();
593031
+ resolve56();
592943
593032
  });
592944
593033
  setTimeout(() => {
592945
593034
  if (this.currentPlayback === child) {
@@ -592949,7 +593038,7 @@ except Exception as exc:
592949
593038
  }
592950
593039
  this.currentPlayback = null;
592951
593040
  }
592952
- resolve55();
593041
+ resolve56();
592953
593042
  }, 15e3);
592954
593043
  });
592955
593044
  }
@@ -593111,7 +593200,7 @@ except Exception as exc:
593111
593200
  writeFileSync53(supertonicInferScript2(), SUPERTONIC_INFER_PY2, "utf-8");
593112
593201
  }
593113
593202
  supertonicRequest(req2, timeoutMs = 12e4) {
593114
- return new Promise((resolve55, reject) => {
593203
+ return new Promise((resolve56, reject) => {
593115
593204
  const child = nodeSpawn(supertonicVenvPy2(), [supertonicInferScript2()], {
593116
593205
  stdio: ["pipe", "pipe", "pipe"],
593117
593206
  env: { ...process.env, PYTHONUNBUFFERED: "1" }
@@ -593150,7 +593239,7 @@ except Exception as exc:
593150
593239
  String(parsed.error ?? (stderr || "Supertonic3 failed"))
593151
593240
  )
593152
593241
  );
593153
- else resolve55(parsed);
593242
+ else resolve56(parsed);
593154
593243
  } catch {
593155
593244
  reject(
593156
593245
  new Error(
@@ -593255,7 +593344,7 @@ except Exception as exc:
593255
593344
  /** Non-blocking shell execution — async alternative to execSync.
593256
593345
  * Returns stdout string on exit 0, rejects otherwise. */
593257
593346
  asyncShell(command, timeoutMs = 3e4) {
593258
- return new Promise((resolve55, reject) => {
593347
+ return new Promise((resolve56, reject) => {
593259
593348
  const proc = nodeSpawn("sh", ["-c", command], {
593260
593349
  stdio: ["ignore", "pipe", "pipe"],
593261
593350
  cwd: tmpdir20()
@@ -593276,7 +593365,7 @@ except Exception as exc:
593276
593365
  }, timeoutMs);
593277
593366
  procAny.on("close", (code8) => {
593278
593367
  clearTimeout(timer);
593279
- if (code8 === 0) resolve55(stdout.trim());
593368
+ if (code8 === 0) resolve56(stdout.trim());
593280
593369
  else reject(new Error(stderr.slice(0, 300) || `Exit code ${code8}`));
593281
593370
  });
593282
593371
  });
@@ -594032,7 +594121,7 @@ if __name__ == '__main__':
594032
594121
  if (this._luxttsDaemon && !this._luxttsDaemon.killed) return true;
594033
594122
  const venvPy = luxttsVenvPy2();
594034
594123
  if (!existsSync106(venvPy)) return false;
594035
- return new Promise((resolve55) => {
594124
+ return new Promise((resolve56) => {
594036
594125
  const env2 = { ...process.env, LUXTTS_REPO_PATH: luxttsRepoDir2() };
594037
594126
  const daemon = nodeSpawn(venvPy, [luxttsInferScript2()], {
594038
594127
  stdio: ["pipe", "pipe", "pipe"],
@@ -594058,7 +594147,7 @@ if __name__ == '__main__':
594058
594147
  status: "running"
594059
594148
  });
594060
594149
  }
594061
- resolve55(true);
594150
+ resolve56(true);
594062
594151
  } else if (msg.type === "result" || msg.type === "error") {
594063
594152
  const pending2 = this._luxttsPending.get(msg.id);
594064
594153
  if (pending2) {
@@ -594081,25 +594170,25 @@ if __name__ == '__main__':
594081
594170
  });
594082
594171
  daemon.on("error", () => {
594083
594172
  this._luxttsDaemon = null;
594084
- resolve55(false);
594173
+ resolve56(false);
594085
594174
  });
594086
594175
  setTimeout(() => {
594087
594176
  if (this._luxttsDaemon === daemon && !this._luxttsPending.has("__ready__")) {
594088
- resolve55(false);
594177
+ resolve56(false);
594089
594178
  }
594090
594179
  }, 6e4);
594091
594180
  });
594092
594181
  }
594093
594182
  /** Send a request to the LuxTTS daemon and await the response */
594094
594183
  luxttsRequest(req2) {
594095
- return new Promise((resolve55, reject) => {
594184
+ return new Promise((resolve56, reject) => {
594096
594185
  if (!this._luxttsDaemon || this._luxttsDaemon.killed) {
594097
594186
  reject(new Error("LuxTTS daemon not running"));
594098
594187
  return;
594099
594188
  }
594100
594189
  const id = `req_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`;
594101
594190
  req2.id = id;
594102
- this._luxttsPending.set(id, { resolve: resolve55, reject });
594191
+ this._luxttsPending.set(id, { resolve: resolve56, reject });
594103
594192
  this._luxttsDaemon.stdin.write(JSON.stringify(req2) + "\n");
594104
594193
  setTimeout(() => {
594105
594194
  if (this._luxttsPending.has(id)) {
@@ -594536,24 +594625,24 @@ async function showKeyPoolMenu(options2) {
594536
594625
  done(true);
594537
594626
  }
594538
594627
  },
594539
- onEnter: (item, { getInput, resolve: resolve55 }) => {
594628
+ onEnter: (item, { getInput, resolve: resolve56 }) => {
594540
594629
  if (item.key === "__add_key__") {
594541
594630
  getInput("API key", "").then((newKey) => {
594542
594631
  if (!newKey?.trim()) {
594543
- resolve55({ confirmed: false, key: "", index: -1 });
594632
+ resolve56({ confirmed: false, key: "", index: -1 });
594544
594633
  return;
594545
594634
  }
594546
594635
  const suffix = newKey.trim().slice(-4);
594547
594636
  if (pool3.some((k) => k.suffix === suffix)) {
594548
594637
  renderWarning("Key ending ..." + suffix + " already in pool.");
594549
- resolve55({ confirmed: false, key: "", index: -1 });
594638
+ resolve56({ confirmed: false, key: "", index: -1 });
594550
594639
  return;
594551
594640
  }
594552
594641
  pool3.push({ key: newKey.trim(), suffix });
594553
594642
  onSave(pool3);
594554
594643
  onSetKeyPool(pool3.map((k) => k.key));
594555
594644
  renderInfo("Added key ..." + suffix + " to pool.");
594556
- resolve55({ confirmed: true, key: "__added__", index: -1 });
594645
+ resolve56({ confirmed: true, key: "__added__", index: -1 });
594557
594646
  });
594558
594647
  return true;
594559
594648
  }
@@ -594580,7 +594669,7 @@ async function showKeyPoolMenu(options2) {
594580
594669
  renderInfo("Default key set to ..." + selected.suffix);
594581
594670
  }
594582
594671
  }
594583
- resolve55({ confirmed: true, key: "__set_default__", index: -1 });
594672
+ resolve56({ confirmed: true, key: "__set_default__", index: -1 });
594584
594673
  });
594585
594674
  return true;
594586
594675
  }
@@ -594589,7 +594678,7 @@ async function showKeyPoolMenu(options2) {
594589
594678
  onSave([]);
594590
594679
  onSetKeyPool([]);
594591
594680
  renderInfo("Key pool cleared. Using single API key from config.");
594592
- resolve55({ confirmed: true, key: "__clear_pool__", index: -1 });
594681
+ resolve56({ confirmed: true, key: "__clear_pool__", index: -1 });
594593
594682
  return true;
594594
594683
  }
594595
594684
  return false;
@@ -594852,7 +594941,7 @@ async function runSudoScript(ctx3, script) {
594852
594941
  try {
594853
594942
  const { spawn: spawn34 } = await import("node:child_process");
594854
594943
  const full = `set -e; ${script}`;
594855
- await new Promise((resolve55) => {
594944
+ await new Promise((resolve56) => {
594856
594945
  const usePkexec = process.platform === "linux";
594857
594946
  const cmd = usePkexec ? "pkexec" : "sudo";
594858
594947
  const args = usePkexec ? ["bash", "-lc", full] : ["-n", "bash", "-lc", full];
@@ -594865,8 +594954,8 @@ async function runSudoScript(ctx3, script) {
594865
594954
  child.stderr?.on("data", (data) => {
594866
594955
  stderr += data.toString();
594867
594956
  });
594868
- onChildExit(child, () => resolve55());
594869
- onChildError(child, () => resolve55());
594957
+ onChildExit(child, () => resolve56());
594958
+ onChildError(child, () => resolve56());
594870
594959
  });
594871
594960
  } catch {
594872
594961
  }
@@ -598266,11 +598355,11 @@ systemctl --user enable --now omnius-daemon.service || true
598266
598355
  sleep 1
598267
598356
  `;
598268
598357
  const { spawn: spawn34 } = await import("node:child_process");
598269
- await new Promise((resolve55) => {
598358
+ await new Promise((resolve56) => {
598270
598359
  const child = spawn34("bash", ["-lc", takeover], {
598271
598360
  stdio: "inherit"
598272
598361
  });
598273
- onChildExit(child, () => resolve55());
598362
+ onChildExit(child, () => resolve56());
598274
598363
  });
598275
598364
  renderInfo("Daemon takeover complete.");
598276
598365
  } catch (e2) {
@@ -604016,7 +604105,7 @@ async function handleEndpoint(arg, ctx3, local = false) {
604016
604105
  deleteUsageRecord("endpoint", item.key, ctx3.repoRoot);
604017
604106
  done(true);
604018
604107
  },
604019
- onEnter: (item, { getInput, resolve: resolve55 }) => {
604108
+ onEnter: (item, { getInput, resolve: resolve56 }) => {
604020
604109
  if (item.key === "__add__") {
604021
604110
  getInput("URL", "http://").then(async (url2) => {
604022
604111
  if (!url2 || !url2.trim()) return;
@@ -604024,12 +604113,12 @@ async function handleEndpoint(arg, ctx3, local = false) {
604024
604113
  const trimmedUrl = url2.trim();
604025
604114
  const authArg = authKey?.trim() ? ` --auth ${authKey.trim()}` : "";
604026
604115
  addedEndpoint = `${trimmedUrl}${authArg}`;
604027
- resolve55({ confirmed: true, key: "__add__", index: -1 });
604116
+ resolve56({ confirmed: true, key: "__add__", index: -1 });
604028
604117
  });
604029
604118
  return true;
604030
604119
  }
604031
604120
  if (item.key === "__sponsor__") {
604032
- resolve55({ confirmed: true, key: "__sponsor__", index: -1 });
604121
+ resolve56({ confirmed: true, key: "__sponsor__", index: -1 });
604033
604122
  return true;
604034
604123
  }
604035
604124
  return false;
@@ -604078,18 +604167,18 @@ async function handleEndpoint(arg, ctx3, local = false) {
604078
604167
  title: "Select Endpoint",
604079
604168
  rl: ctx3.rl,
604080
604169
  availableRows: ctx3.availableContentRows?.(),
604081
- onEnter: (item, { getInput, resolve: resolve55 }) => {
604170
+ onEnter: (item, { getInput, resolve: resolve56 }) => {
604082
604171
  if (item.key === "__add__") {
604083
604172
  getInput("URL", "http://").then(async (url2) => {
604084
604173
  if (!url2?.trim()) return;
604085
604174
  const authKey = await getInput("Auth key (optional)", "");
604086
604175
  addedUrl = `${url2.trim()}${authKey?.trim() ? ` --auth ${authKey.trim()}` : ""}`;
604087
- resolve55({ confirmed: true, key: "__add__", index: -1 });
604176
+ resolve56({ confirmed: true, key: "__add__", index: -1 });
604088
604177
  });
604089
604178
  return true;
604090
604179
  }
604091
604180
  if (item.key === "__sponsor__") {
604092
- resolve55({ confirmed: true, key: "__sponsor__", index: -1 });
604181
+ resolve56({ confirmed: true, key: "__sponsor__", index: -1 });
604093
604182
  return true;
604094
604183
  }
604095
604184
  return false;
@@ -606442,7 +606531,7 @@ async function handleUpdate(subcommand, ctx3) {
606442
606531
  _installProgress = 0;
606443
606532
  _installTotal = 20;
606444
606533
  _installPhase = "Preparing...";
606445
- const runInstall2 = (cmd, label = summarizeInstallCommand(cmd)) => new Promise((resolve55) => {
606534
+ const runInstall2 = (cmd, label = summarizeInstallCommand(cmd)) => new Promise((resolve56) => {
606446
606535
  const startedAt2 = Date.now();
606447
606536
  let lastOutputAt = startedAt2;
606448
606537
  let settled = false;
@@ -606453,7 +606542,7 @@ async function handleUpdate(subcommand, ctx3) {
606453
606542
  clearInterval(heartbeat);
606454
606543
  clearTimeout(timeout2);
606455
606544
  if (!ok3 && error) installError = error.trim();
606456
- resolve55(ok3);
606545
+ resolve56(ok3);
606457
606546
  };
606458
606547
  const noteLine = (line, isError2) => {
606459
606548
  const cleaned = stripInstallAnsi(line).trim();
@@ -606775,11 +606864,11 @@ async function handleUpdate(subcommand, ctx3) {
606775
606864
  if (doRebuild) {
606776
606865
  installOverlay.setPhase("Native Modules");
606777
606866
  installOverlay.setStatus("Rebuilding native modules...");
606778
- await new Promise((resolve55) => {
606867
+ await new Promise((resolve56) => {
606779
606868
  const child = exec6(
606780
606869
  `${sudoPrefix}npm rebuild -g omnius 2>/dev/null || true`,
606781
606870
  { timeout: 12e4 },
606782
- () => resolve55(true)
606871
+ () => resolve56(true)
606783
606872
  );
606784
606873
  child.stdout?.resume();
606785
606874
  child.stderr?.resume();
@@ -606817,11 +606906,11 @@ async function handleUpdate(subcommand, ctx3) {
606817
606906
  const venvPip2 = isWin2 ? pathJoin(venvDir, "Scripts", "pip.exe") : pathJoin(venvDir, "bin", "pip");
606818
606907
  if (fsExists(venvPip2)) {
606819
606908
  installOverlay.setStatus("Upgrading Python packages...");
606820
- await new Promise((resolve55) => {
606909
+ await new Promise((resolve56) => {
606821
606910
  const child = exec6(
606822
606911
  `"${venvPip2}" install --upgrade moondream-station pytesseract Pillow opencv-python-headless numpy 2>/dev/null || true`,
606823
606912
  { timeout: 3e5 },
606824
- (err) => resolve55(!err)
606913
+ (err) => resolve56(!err)
606825
606914
  );
606826
606915
  child.stdout?.resume();
606827
606916
  child.stderr?.resume();
@@ -607264,16 +607353,16 @@ async function showExposeDashboard(gateway, rl, ctx3) {
607264
607353
  renderDashboard();
607265
607354
  }, 1e3);
607266
607355
  let stopGateway = false;
607267
- await new Promise((resolve55) => {
607356
+ await new Promise((resolve56) => {
607268
607357
  const onData = (data) => {
607269
607358
  const key = data.toString();
607270
607359
  if (key === "q" || key === "Q" || key === "\x1B" || key === "") {
607271
- resolve55();
607360
+ resolve56();
607272
607361
  return;
607273
607362
  }
607274
607363
  if (key === "s" || key === "S") {
607275
607364
  stopGateway = true;
607276
- resolve55();
607365
+ resolve56();
607277
607366
  return;
607278
607367
  }
607279
607368
  if (key === "c" || key === "C") {
@@ -607334,8 +607423,8 @@ async function showExposeDashboard(gateway, rl, ctx3) {
607334
607423
  process.stdout.write("\x1B[?1002h\x1B[?1006h");
607335
607424
  }
607336
607425
  };
607337
- const origResolve = resolve55;
607338
- resolve55 = (() => {
607426
+ const origResolve = resolve56;
607427
+ resolve56 = (() => {
607339
607428
  cleanup();
607340
607429
  origResolve();
607341
607430
  });
@@ -608408,7 +608497,7 @@ var init_visual_identity_association = __esm({
608408
608497
 
608409
608498
  // packages/cli/src/tui/identity-memory-tool.ts
608410
608499
  import { existsSync as existsSync109 } from "node:fs";
608411
- import { basename as basename25, extname as extname14, resolve as resolve44 } from "node:path";
608500
+ import { basename as basename25, extname as extname14, resolve as resolve45 } from "node:path";
608412
608501
  function personKey2(name10) {
608413
608502
  return `person:${name10.trim().toLowerCase().replace(/\s+/g, " ")}`;
608414
608503
  }
@@ -608469,7 +608558,7 @@ async function resolveMediaFromArgs(args, opts) {
608469
608558
  if (!ref || ["reply", "latest", "last", "current", "this", "that", "it"].includes(ref.toLowerCase())) {
608470
608559
  return null;
608471
608560
  }
608472
- const path12 = resolve44(ref);
608561
+ const path12 = resolve45(ref);
608473
608562
  if (!existsSync109(path12)) return null;
608474
608563
  const mediaType = inferMediaTypeFromPath(path12);
608475
608564
  const media = { path: path12, mediaType };
@@ -615407,7 +615496,7 @@ import {
615407
615496
  isAbsolute as isAbsolute7,
615408
615497
  join as join130,
615409
615498
  relative as relative12,
615410
- resolve as resolve45,
615499
+ resolve as resolve46,
615411
615500
  sep as sep3
615412
615501
  } from "node:path";
615413
615502
  function telegramCreativeWorkspaceRoot(repoRoot, chatId) {
@@ -615444,7 +615533,7 @@ function publicCreativeContentPolicyError(args) {
615444
615533
  return null;
615445
615534
  }
615446
615535
  function collectGeneratedArtifactPathsFromText(text, root) {
615447
- const rootAbs = resolve45(root);
615536
+ const rootAbs = resolve46(root);
615448
615537
  const paths = /* @__PURE__ */ new Set();
615449
615538
  for (const match of text.matchAll(MEDIA_PATH_RE)) {
615450
615539
  const value2 = match[1];
@@ -615480,7 +615569,7 @@ function buildTelegramCreativeTools(repoRoot, chatId, backendUrl2, imageDefaults
615480
615569
  ];
615481
615570
  }
615482
615571
  function scopedTool(base3, root, mode) {
615483
- const rootAbs = resolve45(root);
615572
+ const rootAbs = resolve46(root);
615484
615573
  const wrapper = {
615485
615574
  name: base3.name,
615486
615575
  description: `[PUBLIC TELEGRAM CREATIVE WORKSPACE: ${rootAbs}] ${base3.description} Paths are restricted to this workspace. This tool cannot access or modify files outside the workspace. ` + (mode === "edit" ? "It can only edit files already created in this workspace manifest. " : ""),
@@ -615539,11 +615628,11 @@ function scopedTool(base3, root, mode) {
615539
615628
  if (result2.success) {
615540
615629
  if (base3.name === "generate_tts" && typeof next["output"] === "string") {
615541
615630
  rememberCreated(rootAbs, String(next["output"]));
615542
- recordedPaths2.add(resolve45(String(next["output"])));
615631
+ recordedPaths2.add(resolve46(String(next["output"])));
615543
615632
  }
615544
615633
  for (const path12 of collectGeneratedArtifactPathsFromText(result2.output, rootAbs)) {
615545
615634
  rememberCreated(rootAbs, path12);
615546
- recordedPaths2.add(resolve45(path12));
615635
+ recordedPaths2.add(resolve46(path12));
615547
615636
  }
615548
615637
  }
615549
615638
  return withTelegramAutoAttachmentNotice(result2, recordedPaths2.size);
@@ -615584,7 +615673,7 @@ function scopedTool(base3, root, mode) {
615584
615673
  const guarded = guardPath(rootAbs, String(args[pathKey]));
615585
615674
  if (guarded.ok) {
615586
615675
  rememberCreated(rootAbs, guarded.path.abs);
615587
- recordedPaths.add(resolve45(guarded.path.abs));
615676
+ recordedPaths.add(resolve46(guarded.path.abs));
615588
615677
  }
615589
615678
  } else if (restoredEditPath) {
615590
615679
  try {
@@ -615595,7 +615684,7 @@ function scopedTool(base3, root, mode) {
615595
615684
  if (result.success) {
615596
615685
  for (const path12 of collectGeneratedArtifactPathsFromText(result.output, rootAbs)) {
615597
615686
  rememberCreated(rootAbs, path12);
615598
- recordedPaths.add(resolve45(path12));
615687
+ recordedPaths.add(resolve46(path12));
615599
615688
  }
615600
615689
  }
615601
615690
  return withTelegramAutoAttachmentNotice(result, recordedPaths.size);
@@ -615618,10 +615707,10 @@ ${notice}` : notice;
615618
615707
  return { ...result, output, llmContent };
615619
615708
  }
615620
615709
  function guardPath(root, rawPath) {
615621
- const rootAbs = resolve45(root);
615710
+ const rootAbs = resolve46(root);
615622
615711
  const trimmed = rawPath.trim().replace(/^["']|["']$/g, "");
615623
615712
  if (!trimmed) return { ok: false, error: "Empty path is not allowed in the public creative workspace." };
615624
- const abs = resolve45(rootAbs, trimmed);
615713
+ const abs = resolve46(rootAbs, trimmed);
615625
615714
  if (!isInside(rootAbs, abs)) {
615626
615715
  return {
615627
615716
  ok: false,
@@ -615641,8 +615730,8 @@ function guardPath(root, rawPath) {
615641
615730
  return { ok: true, path: { abs, rel } };
615642
615731
  }
615643
615732
  function isInside(root, path12) {
615644
- const rootAbs = resolve45(root);
615645
- const pathAbs = resolve45(path12);
615733
+ const rootAbs = resolve46(root);
615734
+ const pathAbs = resolve46(path12);
615646
615735
  return pathAbs === rootAbs || pathAbs.startsWith(rootAbs.endsWith(sep3) ? rootAbs : rootAbs + sep3);
615647
615736
  }
615648
615737
  function looksLikeLocalPath(value2) {
@@ -615700,8 +615789,8 @@ function rememberCreated(root, absPath) {
615700
615789
  if (existsSync116(guarded.path.abs) && safeStatFile(guarded.path.abs)) {
615701
615790
  const previous = manifest.objects?.[rel];
615702
615791
  if (previous) {
615703
- const previousPath = resolve45(root, previous.storedRel);
615704
- if (isInside(resolve45(root), previousPath) && existsSync116(previousPath)) {
615792
+ const previousPath = resolve46(root, previous.storedRel);
615793
+ if (isInside(resolve46(root), previousPath) && existsSync116(previousPath)) {
615705
615794
  try {
615706
615795
  unlinkSync22(previousPath);
615707
615796
  } catch {
@@ -615746,7 +615835,7 @@ function isManifestArtifact(root, relPath) {
615746
615835
  return manifestHas(root, relPath);
615747
615836
  }
615748
615837
  function materializeTelegramCreativeArtifactForSend(root, rawPath) {
615749
- const rootAbs = resolve45(root);
615838
+ const rootAbs = resolve46(root);
615750
615839
  const guarded = guardPath(rootAbs, rawPath);
615751
615840
  if (!guarded.ok) return { ok: false, error: guarded.error };
615752
615841
  const policyError = publicCreativeArtifactPolicyError(guarded.path.abs);
@@ -615755,7 +615844,7 @@ function materializeTelegramCreativeArtifactForSend(root, rawPath) {
615755
615844
  const rel = guarded.path.rel.replace(/\\/g, "/");
615756
615845
  const object = manifest.objects?.[rel];
615757
615846
  if (object) {
615758
- const storedAbs = resolve45(rootAbs, object.storedRel);
615847
+ const storedAbs = resolve46(rootAbs, object.storedRel);
615759
615848
  if (!isInside(rootAbs, storedAbs) || !existsSync116(storedAbs) || !safeStatFile(storedAbs)) {
615760
615849
  return { ok: false, error: `Scoped artifact storage is missing for ${rel}.` };
615761
615850
  }
@@ -618587,7 +618676,7 @@ var init_vision_ingress = __esm({
618587
618676
 
618588
618677
  // packages/cli/src/tui/telegram-bridge.ts
618589
618678
  import { mkdirSync as mkdirSync68, existsSync as existsSync119, unlinkSync as unlinkSync24, readdirSync as readdirSync42, statSync as statSync43, statfsSync as statfsSync5, readFileSync as readFileSync97, writeFileSync as writeFileSync62, appendFileSync as appendFileSync10 } from "node:fs";
618590
- import { join as join133, resolve as resolve46, basename as basename31, relative as relative13, isAbsolute as isAbsolute8, extname as extname16 } from "node:path";
618679
+ import { join as join133, resolve as resolve47, basename as basename31, relative as relative13, isAbsolute as isAbsolute8, extname as extname16 } from "node:path";
618591
618680
  import { homedir as homedir43 } from "node:os";
618592
618681
  import { writeFile as writeFileAsync } from "node:fs/promises";
618593
618682
  import { createHash as createHash27, randomBytes as randomBytes24, randomInt } from "node:crypto";
@@ -620095,7 +620184,7 @@ function telegramCachedMediaIsVideo(entry) {
620095
620184
  return [".mp4", ".mkv", ".avi", ".mov", ".webm"].includes(extname16(entry.localPath).toLowerCase());
620096
620185
  }
620097
620186
  function isPathInside(root, path12) {
620098
- const rel = relative13(resolve46(root), resolve46(path12));
620187
+ const rel = relative13(resolve47(root), resolve47(path12));
620099
620188
  return rel === "" || Boolean(rel) && !rel.startsWith("..") && !isAbsolute8(rel);
620100
620189
  }
620101
620190
  function extractTelegramMentionedUsernames(message2, text) {
@@ -620786,10 +620875,10 @@ External acquisition contract:
620786
620875
  this.repoRoot = repoRoot;
620787
620876
  this.toolPolicyConfig = toolPolicyConfig;
620788
620877
  this.telegramToolPolicy = resolveSettings(repoRoot || ".").telegramToolPolicy ?? {};
620789
- this.mediaCacheDir = resolve46(repoRoot || ".", ".omnius", "telegram-media-cache");
620790
- this.telegramConversationDir = resolve46(repoRoot || ".", ".omnius", "telegram-conversations");
620791
- this.telegramSqlitePath = resolve46(repoRoot || ".", ".omnius", "telegram.sqlite");
620792
- this.telegramToolButtonDir = resolve46(repoRoot || ".", ".omnius", "telegram-tool-buttons");
620878
+ this.mediaCacheDir = resolve47(repoRoot || ".", ".omnius", "telegram-media-cache");
620879
+ this.telegramConversationDir = resolve47(repoRoot || ".", ".omnius", "telegram-conversations");
620880
+ this.telegramSqlitePath = resolve47(repoRoot || ".", ".omnius", "telegram.sqlite");
620881
+ this.telegramToolButtonDir = resolve47(repoRoot || ".", ".omnius", "telegram-tool-buttons");
620793
620882
  this.state.maxSubAgents = normalizeTelegramSubAgentLimit(resolveSettings(repoRoot || ".").telegramSubAgents);
620794
620883
  this.hydrateTelegramCommandMap(buildTelegramBotCommands({ scope: "admin" }));
620795
620884
  }
@@ -622082,7 +622171,7 @@ ${mediaContext}` : ""
622082
622171
  return null;
622083
622172
  }
622084
622173
  try {
622085
- mkdirSync68(resolve46(this.repoRoot, ".omnius"), { recursive: true });
622174
+ mkdirSync68(resolve47(this.repoRoot, ".omnius"), { recursive: true });
622086
622175
  const db = initDb(this.telegramSqlitePath);
622087
622176
  db.exec(`
622088
622177
  CREATE TABLE IF NOT EXISTS telegram_messages (
@@ -623288,7 +623377,7 @@ ${mediaContext}` : ""
623288
623377
  return { ok: true, path: entry.localPath };
623289
623378
  }
623290
623379
  const matchingEntry = mediaEntries.find((entry) => {
623291
- if (resolve46(entry.localPath) === resolve46(raw)) return true;
623380
+ if (resolve47(entry.localPath) === resolve47(raw)) return true;
623292
623381
  if (basename31(entry.localPath) === raw) return true;
623293
623382
  if (entry.fileUniqueId === raw || entry.fileId === raw) return true;
623294
623383
  if (entry.messageId && String(entry.messageId) === raw) return true;
@@ -623296,7 +623385,7 @@ ${mediaContext}` : ""
623296
623385
  return false;
623297
623386
  });
623298
623387
  if (matchingEntry) return { ok: true, path: matchingEntry.localPath };
623299
- const creativeCandidate = isAbsolute8(raw) ? resolve46(raw) : resolve46(creativeRoot, raw);
623388
+ const creativeCandidate = isAbsolute8(raw) ? resolve47(raw) : resolve47(creativeRoot, raw);
623300
623389
  if (isPathInside(creativeRoot, creativeCandidate) && existsSync119(creativeCandidate)) {
623301
623390
  return { ok: true, path: creativeCandidate };
623302
623391
  }
@@ -623325,7 +623414,7 @@ ${mediaContext}` : ""
623325
623414
  return replied ?? entries[0];
623326
623415
  }
623327
623416
  return entries.find((entry2) => {
623328
- if (resolve46(entry2.localPath) === resolve46(ref)) return true;
623417
+ if (resolve47(entry2.localPath) === resolve47(ref)) return true;
623329
623418
  if (basename31(entry2.localPath) === ref) return true;
623330
623419
  if (entry2.fileUniqueId === ref || entry2.fileId === ref) return true;
623331
623420
  if (entry2.messageId && String(entry2.messageId) === ref) return true;
@@ -623362,7 +623451,7 @@ ${mediaContext}` : ""
623362
623451
  const repoRoot = this.repoRoot || ".";
623363
623452
  const creativeRoot = telegramCreativeWorkspaceRoot(repoRoot, chatId);
623364
623453
  const raw = String(rawValue || fallbackName).trim() || fallbackName;
623365
- const outputPath3 = isAbsolute8(raw) ? resolve46(raw) : resolve46(creativeRoot, raw);
623454
+ const outputPath3 = isAbsolute8(raw) ? resolve47(raw) : resolve47(creativeRoot, raw);
623366
623455
  if (!isPathInside(creativeRoot, outputPath3)) {
623367
623456
  return { ok: false, error: `Output path must stay inside this Telegram chat's creative workspace: ${raw}` };
623368
623457
  }
@@ -624172,7 +624261,7 @@ ${lines.join("\n")}`;
624172
624261
  let topicCount = 0;
624173
624262
  if (this.repoRoot && chatId !== void 0) {
624174
624263
  try {
624175
- const memDir = resolve46(this.repoRoot, ".omnius", "memory");
624264
+ const memDir = resolve47(this.repoRoot, ".omnius", "memory");
624176
624265
  if (existsSync119(memDir)) {
624177
624266
  const prefix = this.telegramScopedMemoryPrefix(chatId);
624178
624267
  for (const file of readdirSync42(memDir)) {
@@ -625048,13 +625137,13 @@ ${retryText}`,
625048
625137
  existing.trailing.toolContext = toolContext;
625049
625138
  return existing.trailing.promise;
625050
625139
  }
625051
- let resolve55;
625140
+ let resolve56;
625052
625141
  let reject;
625053
625142
  const promise = new Promise((res, rej) => {
625054
- resolve55 = res;
625143
+ resolve56 = res;
625055
625144
  reject = rej;
625056
625145
  });
625057
- existing.trailing = { msg, toolContext, promise, resolve: resolve55, reject };
625146
+ existing.trailing = { msg, toolContext, promise, resolve: resolve56, reject };
625058
625147
  return promise;
625059
625148
  }
625060
625149
  /**
@@ -625079,9 +625168,9 @@ ${retryText}`,
625079
625168
  state = void 0;
625080
625169
  }
625081
625170
  if (!state?.trailing) return;
625082
- const { msg: nextMsg, toolContext: nextCtx, resolve: resolve55, reject } = state.trailing;
625171
+ const { msg: nextMsg, toolContext: nextCtx, resolve: resolve56, reject } = state.trailing;
625083
625172
  try {
625084
- this.startCoalescedTelegramRouterCall(sessionKey, nextMsg, nextCtx).then(resolve55, reject);
625173
+ this.startCoalescedTelegramRouterCall(sessionKey, nextMsg, nextCtx).then(resolve56, reject);
625085
625174
  } catch (err) {
625086
625175
  reject(err);
625087
625176
  }
@@ -625920,10 +626009,10 @@ ${TELEGRAM_PUBLIC_ORCHESTRATOR_CONTRACT}`);
625920
626009
  }
625921
626010
  if (me.result?.id) {
625922
626011
  const botUserId = Number(me.result.id);
625923
- const globalLockDir = process.env["OMNIUS_TELEGRAM_LOCK_DIR"] ? resolve46(process.env["OMNIUS_TELEGRAM_LOCK_DIR"]) : resolve46(homedir43(), ".omnius", "telegram-runner-state");
626012
+ const globalLockDir = process.env["OMNIUS_TELEGRAM_LOCK_DIR"] ? resolve47(process.env["OMNIUS_TELEGRAM_LOCK_DIR"]) : resolve47(homedir43(), ".omnius", "telegram-runner-state");
625924
626013
  const lockDirs = /* @__PURE__ */ new Set([globalLockDir]);
625925
626014
  if (this.repoRoot) {
625926
- lockDirs.add(resolve46(this.repoRoot, ".omnius", "telegram-runner-state"));
626015
+ lockDirs.add(resolve47(this.repoRoot, ".omnius", "telegram-runner-state"));
625927
626016
  }
625928
626017
  const claimed = [];
625929
626018
  try {
@@ -629396,10 +629485,10 @@ ${knownList}` : "Private-user telegram_send_file target must be this DM or a kno
629396
629485
  return { ok: false, error: "Expected chat_id/user_id as digits, or a valid @username." };
629397
629486
  }
629398
629487
  resolveTelegramFilePath(rawPath, repoRoot, scopedRoot) {
629399
- const base3 = scopedRoot ? resolve46(scopedRoot) : resolve46(repoRoot);
629488
+ const base3 = scopedRoot ? resolve47(scopedRoot) : resolve47(repoRoot);
629400
629489
  const trimmed = rawPath.trim().replace(/^["']|["']$/g, "");
629401
629490
  if (scopedRoot) {
629402
- const logicalPath = isAbsolute8(trimmed) ? resolve46(trimmed) : resolve46(base3, trimmed);
629491
+ const logicalPath = isAbsolute8(trimmed) ? resolve47(trimmed) : resolve47(base3, trimmed);
629403
629492
  if (!isPathInside(base3, logicalPath)) {
629404
629493
  return { ok: false, error: `Path escapes the scoped Telegram creative workspace: ${trimmed}` };
629405
629494
  }
@@ -629407,15 +629496,15 @@ ${knownList}` : "Private-user telegram_send_file target must be this DM or a kno
629407
629496
  if (!materialized.ok) return materialized;
629408
629497
  return { ...materialized, logicalPath };
629409
629498
  }
629410
- const abs = isAbsolute8(trimmed) ? resolve46(trimmed) : resolve46(base3, trimmed);
629499
+ const abs = isAbsolute8(trimmed) ? resolve47(trimmed) : resolve47(base3, trimmed);
629411
629500
  if (!existsSync119(abs)) return { ok: false, error: `File does not exist: ${trimmed}` };
629412
629501
  if (!statSync43(abs).isFile()) return { ok: false, error: `Path is not a file: ${trimmed}` };
629413
629502
  return { ok: true, path: abs };
629414
629503
  }
629415
629504
  rememberTelegramDeliveredArtifact(subAgent, path12) {
629416
- const abs = resolve46(path12);
629505
+ const abs = resolve47(path12);
629417
629506
  subAgent.deliveredArtifacts ??= [];
629418
- if (!subAgent.deliveredArtifacts.some((existing) => resolve46(existing) === abs)) {
629507
+ if (!subAgent.deliveredArtifacts.some((existing) => resolve47(existing) === abs)) {
629419
629508
  subAgent.deliveredArtifacts.push(abs);
629420
629509
  }
629421
629510
  }
@@ -629428,7 +629517,7 @@ ${knownList}` : "Private-user telegram_send_file target must be this DM or a kno
629428
629517
  telegramFileSendFingerprint(chatId, path12, kind, caption, replyToMessageId) {
629429
629518
  return stableTelegramValueKey({
629430
629519
  chatId: String(chatId),
629431
- path: resolve46(path12),
629520
+ path: resolve47(path12),
629432
629521
  kind,
629433
629522
  caption: caption ?? "",
629434
629523
  replyToMessageId: replyToMessageId ?? null
@@ -629765,10 +629854,10 @@ ${text}`.trim());
629765
629854
  deliveredArtifactMediaSuppressorForMessage(msg) {
629766
629855
  const subAgent = this.subAgents.get(this.sessionKeyForMessage(msg));
629767
629856
  const delivered = new Set(
629768
- (subAgent?.deliveredArtifacts ?? []).map((path12) => resolve46(path12))
629857
+ (subAgent?.deliveredArtifacts ?? []).map((path12) => resolve47(path12))
629769
629858
  );
629770
629859
  if (delivered.size === 0) return void 0;
629771
- return (media) => media.source === "file" && delivered.has(resolve46(media.value));
629860
+ return (media) => media.source === "file" && delivered.has(resolve47(media.value));
629772
629861
  }
629773
629862
  async replyToTelegramMessage(msg, text, options2 = {}) {
629774
629863
  if (msg.guestQueryId) {
@@ -629779,7 +629868,7 @@ ${text}`.trim());
629779
629868
  return options2.html ? this.sendMessageHTML(msg.chatId, text, options2.replyToMessageId) : this.sendMessage(msg.chatId, text, options2.replyToMessageId);
629780
629869
  }
629781
629870
  async sendTelegramFileToChat(chatId, path12, options2) {
629782
- const abs = resolve46(path12);
629871
+ const abs = resolve47(path12);
629783
629872
  if (!existsSync119(abs) || !statSync43(abs).isFile()) {
629784
629873
  throw new Error(`File does not exist or is not a regular file: ${path12}`);
629785
629874
  }
@@ -629995,18 +630084,18 @@ Content-Type: ${contentType}\r
629995
630084
  async sendGeneratedArtifactsFromSubAgent(msg, subAgent, finalText, includeMentioned) {
629996
630085
  const root = subAgent.creativeWorkspaceRoot;
629997
630086
  if (!root) return;
629998
- const rootAbs = resolve46(root);
630087
+ const rootAbs = resolve47(root);
629999
630088
  const paths = new Set(subAgent.generatedArtifacts);
630000
630089
  for (const path12 of collectGeneratedArtifactPathsFromText(finalText, root)) {
630001
630090
  paths.add(path12);
630002
630091
  }
630003
630092
  if (paths.size === 0) return;
630004
630093
  const alreadySentByText = new Set(
630005
- extractMediaReferences(finalText).media.filter((media) => media.source === "file").map((media) => resolve46(media.value))
630094
+ extractMediaReferences(finalText).media.filter((media) => media.source === "file").map((media) => resolve47(media.value))
630006
630095
  );
630007
- const alreadyDelivered = new Set((subAgent.deliveredArtifacts ?? []).map((path12) => resolve46(path12)));
630096
+ const alreadyDelivered = new Set((subAgent.deliveredArtifacts ?? []).map((path12) => resolve47(path12)));
630008
630097
  for (const path12 of paths) {
630009
- const abs = resolve46(path12);
630098
+ const abs = resolve47(path12);
630010
630099
  if (!isPathInside(rootAbs, abs)) continue;
630011
630100
  if (alreadyDelivered.has(abs)) continue;
630012
630101
  if (!includeMentioned && alreadySentByText.has(abs)) continue;
@@ -631267,7 +631356,7 @@ __export(projects_exports, {
631267
631356
  });
631268
631357
  import { readFileSync as readFileSync99, writeFileSync as writeFileSync64, mkdirSync as mkdirSync70, existsSync as existsSync121, statSync as statSync44, renameSync as renameSync7 } from "node:fs";
631269
631358
  import { homedir as homedir45 } from "node:os";
631270
- import { basename as basename32, join as join135, resolve as resolve47 } from "node:path";
631359
+ import { basename as basename32, join as join135, resolve as resolve48 } from "node:path";
631271
631360
  import { randomUUID as randomUUID15 } from "node:crypto";
631272
631361
  function readAll2() {
631273
631362
  try {
@@ -631299,7 +631388,7 @@ function listProjects() {
631299
631388
  return alive;
631300
631389
  }
631301
631390
  function registerProject(root, pid) {
631302
- const canonical = resolve47(root);
631391
+ const canonical = resolve48(root);
631303
631392
  const now = Date.now();
631304
631393
  const file = readAll2();
631305
631394
  const existing = file.projects.find((p2) => p2.root === canonical);
@@ -631327,7 +631416,7 @@ function registerProject(root, pid) {
631327
631416
  return entry;
631328
631417
  }
631329
631418
  function unregisterProject(root) {
631330
- const canonical = resolve47(root);
631419
+ const canonical = resolve48(root);
631331
631420
  const file = readAll2();
631332
631421
  const before = file.projects.length;
631333
631422
  file.projects = file.projects.filter((p2) => p2.root !== canonical);
@@ -631336,7 +631425,7 @@ function unregisterProject(root) {
631336
631425
  return true;
631337
631426
  }
631338
631427
  function renameProject(root, name10) {
631339
- const canonical = resolve47(root);
631428
+ const canonical = resolve48(root);
631340
631429
  const file = readAll2();
631341
631430
  const idx = file.projects.findIndex((p2) => p2.root === canonical);
631342
631431
  if (idx < 0) return null;
@@ -631360,7 +631449,7 @@ function getCurrentProject() {
631360
631449
  return all2.find((p2) => p2.root === currentRoot) ?? null;
631361
631450
  }
631362
631451
  function setCurrentProject(root) {
631363
- const canonical = resolve47(root);
631452
+ const canonical = resolve48(root);
631364
631453
  const entry = listProjects().find((p2) => p2.root === canonical);
631365
631454
  if (!entry) return null;
631366
631455
  currentRoot = canonical;
@@ -632198,10 +632287,10 @@ var init_access_policy = __esm({
632198
632287
  import { createHash as createHash28 } from "node:crypto";
632199
632288
  import { existsSync as existsSync122, mkdirSync as mkdirSync71, readFileSync as readFileSync100, renameSync as renameSync8, writeFileSync as writeFileSync65, unlinkSync as unlinkSync26 } from "node:fs";
632200
632289
  import { homedir as homedir46 } from "node:os";
632201
- import { join as join136, resolve as resolve48 } from "node:path";
632290
+ import { join as join136, resolve as resolve49 } from "node:path";
632202
632291
  import { randomUUID as randomUUID16 } from "node:crypto";
632203
632292
  function projectKey(root) {
632204
- const canonical = resolve48(root);
632293
+ const canonical = resolve49(root);
632205
632294
  return createHash28("sha256").update(canonical).digest("hex").slice(0, 16);
632206
632295
  }
632207
632296
  function projectDir(root) {
@@ -632219,7 +632308,7 @@ function ensureDir(root) {
632219
632308
  const sentinel = rootSentinelPath(root);
632220
632309
  try {
632221
632310
  if (!existsSync122(sentinel)) {
632222
- writeFileSync65(sentinel, `${resolve48(root)}
632311
+ writeFileSync65(sentinel, `${resolve49(root)}
632223
632312
  `, "utf8");
632224
632313
  }
632225
632314
  } catch {
@@ -633473,7 +633562,7 @@ function publishEvent(type, data, opts = {}) {
633473
633562
  });
633474
633563
  }
633475
633564
  function readBodyWithLimit(req2, maxBytes = 1048576) {
633476
- return new Promise((resolve55, reject) => {
633565
+ return new Promise((resolve56, reject) => {
633477
633566
  const chunks = [];
633478
633567
  let size = 0;
633479
633568
  req2.on("data", (chunk) => {
@@ -633485,7 +633574,7 @@ function readBodyWithLimit(req2, maxBytes = 1048576) {
633485
633574
  }
633486
633575
  chunks.push(chunk);
633487
633576
  });
633488
- req2.on("end", () => resolve55(Buffer.concat(chunks).toString("utf-8")));
633577
+ req2.on("end", () => resolve56(Buffer.concat(chunks).toString("utf-8")));
633489
633578
  req2.on("error", reject);
633490
633579
  });
633491
633580
  }
@@ -634458,7 +634547,7 @@ function getLocalOnion() {
634458
634547
  return null;
634459
634548
  }
634460
634549
  async function torIsReachable() {
634461
- return new Promise((resolve55) => {
634550
+ return new Promise((resolve56) => {
634462
634551
  const sock = createConnection3({ host: DEFAULT_SOCKS_HOST, port: DEFAULT_SOCKS_PORT });
634463
634552
  let done = false;
634464
634553
  const finish = (ok3) => {
@@ -634468,7 +634557,7 @@ async function torIsReachable() {
634468
634557
  sock.destroy();
634469
634558
  } catch {
634470
634559
  }
634471
- resolve55(ok3);
634560
+ resolve56(ok3);
634472
634561
  };
634473
634562
  sock.once("connect", () => finish(true));
634474
634563
  sock.once("error", () => finish(false));
@@ -634510,7 +634599,7 @@ async function tunnelViaTor(req2) {
634510
634599
  return { status, headers: respHeaders, body: bodyText, streaming };
634511
634600
  }
634512
634601
  function openSocks5(targetHost, targetPort, timeoutMs) {
634513
- return new Promise((resolve55, reject) => {
634602
+ return new Promise((resolve56, reject) => {
634514
634603
  const sock = createConnection3({ host: DEFAULT_SOCKS_HOST, port: DEFAULT_SOCKS_PORT });
634515
634604
  let stage = "greet";
634516
634605
  const timer = setTimeout(() => {
@@ -634573,7 +634662,7 @@ function openSocks5(targetHost, targetPort, timeoutMs) {
634573
634662
  }
634574
634663
  clearTimeout(timer);
634575
634664
  stage = "ready";
634576
- resolve55(sock);
634665
+ resolve56(sock);
634577
634666
  }
634578
634667
  });
634579
634668
  });
@@ -634662,7 +634751,7 @@ async function runGraphicalSudo(opts) {
634662
634751
  cmd = "sudo";
634663
634752
  args = ["/bin/bash", opts.scriptPath, ...opts.args ?? []];
634664
634753
  }
634665
- return new Promise((resolve55, reject) => {
634754
+ return new Promise((resolve56, reject) => {
634666
634755
  const child = spawn30(cmd, args, {
634667
634756
  env: { ...process.env, ...opts.env || {}, ...extraEnv },
634668
634757
  stdio: ["ignore", "pipe", "pipe"]
@@ -634696,7 +634785,7 @@ async function runGraphicalSudo(opts) {
634696
634785
  child.once("close", (code8) => {
634697
634786
  clearTimeout(timer);
634698
634787
  if (timedOut) return reject(new Error(`graphical sudo timed out after ${timeoutMs}ms`));
634699
- resolve55({ code: code8 ?? -1, stdout, stderr, helper });
634788
+ resolve56({ code: code8 ?? -1, stdout, stderr, helper });
634700
634789
  });
634701
634790
  });
634702
634791
  }
@@ -647387,7 +647476,7 @@ var init_profiles = __esm({
647387
647476
  // packages/cli/src/docker.ts
647388
647477
  import { execSync as execSync57, spawn as spawn31 } from "node:child_process";
647389
647478
  import { existsSync as existsSync132, mkdirSync as mkdirSync78, writeFileSync as writeFileSync70 } from "node:fs";
647390
- import { join as join145, resolve as resolve49, dirname as dirname39 } from "node:path";
647479
+ import { join as join145, resolve as resolve50, dirname as dirname39 } from "node:path";
647391
647480
  import { homedir as homedir52 } from "node:os";
647392
647481
  import { fileURLToPath as fileURLToPath17 } from "node:url";
647393
647482
  function getDockerDir() {
@@ -647643,7 +647732,7 @@ function runInContainer(opts) {
647643
647732
  const timeout2 = (opts.timeoutS || 120) + 30;
647644
647733
  args.push("--stop-timeout", String(timeout2));
647645
647734
  if (opts.workingDir) {
647646
- const hostDir = resolve49(opts.workingDir);
647735
+ const hostDir = resolve50(opts.workingDir);
647647
647736
  args.push("-v", `${hostDir}:/workspace`);
647648
647737
  }
647649
647738
  const ollamaHost = opts.ollamaHost || process.env["OLLAMA_HOST"] || "http://host.docker.internal:11434";
@@ -647867,10 +647956,10 @@ import * as http5 from "node:http";
647867
647956
  import * as https3 from "node:https";
647868
647957
  import { createRequire as createRequire7 } from "node:module";
647869
647958
  import { fileURLToPath as fileURLToPath18 } from "node:url";
647870
- import { dirname as dirname40, join as join147, resolve as resolve50 } from "node:path";
647959
+ import { dirname as dirname40, join as join147, resolve as resolve51 } from "node:path";
647871
647960
  import { homedir as homedir53 } from "node:os";
647872
647961
  import { spawn as spawn32, execSync as execSync58 } from "node:child_process";
647873
- import { mkdirSync as mkdirSync79, writeFileSync as writeFileSync71, readFileSync as readFileSync108, readdirSync as readdirSync47, existsSync as existsSync133, watch as fsWatch3, renameSync as renameSync9, unlinkSync as unlinkSync28 } from "node:fs";
647962
+ import { mkdirSync as mkdirSync79, writeFileSync as writeFileSync71, readFileSync as readFileSync108, readdirSync as readdirSync47, existsSync as existsSync133, watch as fsWatch4, renameSync as renameSync9, unlinkSync as unlinkSync28 } from "node:fs";
647874
647963
  import { randomBytes as randomBytes27, randomUUID as randomUUID17 } from "node:crypto";
647875
647964
  import { createHash as createHash31 } from "node:crypto";
647876
647965
  function memoryDbPaths3(baseDir = process.cwd()) {
@@ -648223,10 +648312,10 @@ function corsHeaders(req2, res) {
648223
648312
  return true;
648224
648313
  }
648225
648314
  function readBody(req2) {
648226
- return new Promise((resolve55, reject) => {
648315
+ return new Promise((resolve56, reject) => {
648227
648316
  const chunks = [];
648228
648317
  req2.on("data", (chunk) => chunks.push(chunk));
648229
- req2.on("end", () => resolve55(Buffer.concat(chunks).toString("utf-8")));
648318
+ req2.on("end", () => resolve56(Buffer.concat(chunks).toString("utf-8")));
648230
648319
  req2.on("error", reject);
648231
648320
  });
648232
648321
  }
@@ -648360,7 +648449,7 @@ async function directChatBackend(opts) {
648360
648449
  let acc = "";
648361
648450
  const url = backendUrl(ollamaUrl, "/v1/chat/completions");
648362
648451
  const transport = url.protocol === "https:" ? https3 : http5;
648363
- await new Promise((resolve55, reject) => {
648452
+ await new Promise((resolve56, reject) => {
648364
648453
  const proxyReq = transport.request({
648365
648454
  hostname: url.hostname,
648366
648455
  port: url.port || (url.protocol === "https:" ? 443 : 80),
@@ -648385,7 +648474,7 @@ async function directChatBackend(opts) {
648385
648474
  });
648386
648475
  proxyRes.on("end", () => {
648387
648476
  res.end();
648388
- resolve55();
648477
+ resolve56();
648389
648478
  });
648390
648479
  proxyRes.on("error", reject);
648391
648480
  });
@@ -648449,7 +648538,7 @@ async function directChatBackend(opts) {
648449
648538
  "X-API-Version": API_VERSION
648450
648539
  });
648451
648540
  let acc = "";
648452
- await new Promise((resolve55, reject) => {
648541
+ await new Promise((resolve56, reject) => {
648453
648542
  ollamaStream(
648454
648543
  ollamaUrl,
648455
648544
  "/api/chat",
@@ -648483,7 +648572,7 @@ async function directChatBackend(opts) {
648483
648572
  },
648484
648573
  () => {
648485
648574
  res.end();
648486
- resolve55();
648575
+ resolve56();
648487
648576
  },
648488
648577
  (err) => reject(err)
648489
648578
  );
@@ -648571,7 +648660,7 @@ function backendUrl(baseUrl, path12) {
648571
648660
  return url;
648572
648661
  }
648573
648662
  function ollamaRequest(ollamaUrl, path12, method, body, timeoutMs, endpoint) {
648574
- return new Promise((resolve55, reject) => {
648663
+ return new Promise((resolve56, reject) => {
648575
648664
  const url = backendUrl(ollamaUrl, path12);
648576
648665
  const isHttps = url.protocol === "https:";
648577
648666
  const options2 = {
@@ -648592,7 +648681,7 @@ function ollamaRequest(ollamaUrl, path12, method, body, timeoutMs, endpoint) {
648592
648681
  proxyRes.on("data", (chunk) => chunks.push(chunk));
648593
648682
  proxyRes.on("end", () => {
648594
648683
  clearTimeout(hardTimeout);
648595
- resolve55({
648684
+ resolve56({
648596
648685
  status: proxyRes.statusCode ?? 500,
648597
648686
  headers: proxyRes.headers,
648598
648687
  body: Buffer.concat(chunks).toString("utf-8")
@@ -648643,7 +648732,7 @@ function ollamaStream(ollamaUrl, path12, method, body, onData, onEnd, onError, t
648643
648732
  proxyReq.end();
648644
648733
  }
648645
648734
  function jobsDir() {
648646
- const root = resolve50(process.cwd());
648735
+ const root = resolve51(process.cwd());
648647
648736
  const dir = join147(root, ".omnius", "jobs");
648648
648737
  mkdirSync79(dir, { recursive: true });
648649
648738
  return dir;
@@ -650114,7 +650203,7 @@ ${task}` : task,
650114
650203
  });
650115
650204
  if (streamMode) {
650116
650205
  res.writeHead(200, { "Content-Type": "text/event-stream", "Cache-Control": "no-cache" });
650117
- await new Promise((resolve55) => {
650206
+ await new Promise((resolve56) => {
650118
650207
  ollamaStream(
650119
650208
  ollamaUrl,
650120
650209
  "/v1/completions",
@@ -650123,11 +650212,11 @@ ${task}` : task,
650123
650212
  (chunk) => res.write(chunk),
650124
650213
  () => {
650125
650214
  res.end();
650126
- resolve55();
650215
+ resolve56();
650127
650216
  },
650128
650217
  (err) => {
650129
650218
  res.end(JSON.stringify({ error: String(err) }));
650130
- resolve55();
650219
+ resolve56();
650131
650220
  }
650132
650221
  );
650133
650222
  });
@@ -650163,7 +650252,7 @@ ${task}` : task,
650163
650252
  "Connection": "keep-alive",
650164
650253
  "X-API-Version": API_VERSION
650165
650254
  });
650166
- await new Promise((resolve55) => {
650255
+ await new Promise((resolve56) => {
650167
650256
  ollamaStream(
650168
650257
  ollamaUrl,
650169
650258
  "/api/generate",
@@ -650172,11 +650261,11 @@ ${task}` : task,
650172
650261
  (chunk) => res.write(chunk),
650173
650262
  () => {
650174
650263
  res.end();
650175
- resolve55();
650264
+ resolve56();
650176
650265
  },
650177
650266
  (err) => {
650178
650267
  res.end(JSON.stringify({ error: String(err) }) + "\n");
650179
- resolve55();
650268
+ resolve56();
650180
650269
  }
650181
650270
  );
650182
650271
  });
@@ -650223,7 +650312,7 @@ ${task}` : task;
650223
650312
  runEnv["OLLAMA_HOST"] = currentCfg.backendUrl || process.env["OLLAMA_HOST"] || "http://127.0.0.1:11434";
650224
650313
  if (currentCfg.apiKey) runEnv["OMNIUS_API_KEY_INHERIT"] = currentCfg.apiKey;
650225
650314
  const child = spawn32(process.execPath, [omniusBin, ...args], {
650226
- cwd: resolve50(process.cwd()),
650315
+ cwd: resolve51(process.cwd()),
650227
650316
  env: runEnv,
650228
650317
  stdio: ["ignore", "pipe", "pipe"]
650229
650318
  });
@@ -650757,13 +650846,13 @@ async function handleV1Run(req2, res) {
650757
650846
  const isolate = requestBody["isolate"] === true;
650758
650847
  let cwd4;
650759
650848
  if (workingDir) {
650760
- cwd4 = resolve50(workingDir);
650849
+ cwd4 = resolve51(workingDir);
650761
650850
  } else if (isolate) {
650762
650851
  const wsDir = join147(dir, "..", "workspaces", id);
650763
650852
  mkdirSync79(wsDir, { recursive: true });
650764
650853
  cwd4 = wsDir;
650765
650854
  } else {
650766
- cwd4 = resolve50(process.cwd());
650855
+ cwd4 = resolve51(process.cwd());
650767
650856
  }
650768
650857
  const authUser = req2._authUser || "anonymous";
650769
650858
  const authScope = req2._authScope || "admin";
@@ -651751,8 +651840,8 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
651751
651840
  if (pathname === "/v1/files" && method === "GET") {
651752
651841
  const dir = urlObj.searchParams.get("path") || process.cwd();
651753
651842
  try {
651754
- const entries = readdirSync47(resolve50(dir), { withFileTypes: true }).filter((e2) => !e2.name.startsWith(".") && e2.name !== "node_modules").slice(0, 100).map((e2) => ({ name: e2.name, type: e2.isDirectory() ? "dir" : "file" }));
651755
- jsonResponse(res, 200, { path: resolve50(dir), entries });
651843
+ const entries = readdirSync47(resolve51(dir), { withFileTypes: true }).filter((e2) => !e2.name.startsWith(".") && e2.name !== "node_modules").slice(0, 100).map((e2) => ({ name: e2.name, type: e2.isDirectory() ? "dir" : "file" }));
651844
+ jsonResponse(res, 200, { path: resolve51(dir), entries });
651756
651845
  } catch (e2) {
651757
651846
  jsonResponse(res, 400, { error: e2.message });
651758
651847
  }
@@ -651863,7 +651952,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
651863
651952
  jsonResponse(res, 400, { error: "missing_root", message: "body.root (absolute path) is required." });
651864
651953
  return;
651865
651954
  }
651866
- let entry = listProjects().find((p2) => p2.root === rawRoot || p2.root === resolve50(rawRoot));
651955
+ let entry = listProjects().find((p2) => p2.root === rawRoot || p2.root === resolve51(rawRoot));
651867
651956
  if (!entry && body?.registerIfMissing) {
651868
651957
  entry = registerProject(rawRoot);
651869
651958
  }
@@ -651927,7 +652016,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
651927
652016
  const queriedRoot = urlObj.searchParams.get("root");
651928
652017
  let targetRoot = null;
651929
652018
  if (queriedRoot && queriedRoot.trim()) {
651930
- targetRoot = resolve50(queriedRoot.trim());
652019
+ targetRoot = resolve51(queriedRoot.trim());
651931
652020
  } else {
651932
652021
  const current = getCurrentProject();
651933
652022
  if (current) targetRoot = current.root;
@@ -652203,7 +652292,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
652203
652292
  const path12 = await import("node:path");
652204
652293
  const tmpPath = path12.join(os9.tmpdir(), `omnius-asr-${Date.now()}-${Math.random().toString(36).slice(2, 8)}.bin`);
652205
652294
  let bytesWritten = 0;
652206
- await new Promise((resolve55, reject) => {
652295
+ await new Promise((resolve56, reject) => {
652207
652296
  const ws = fs11.createWriteStream(tmpPath);
652208
652297
  let stripBoundary = ct.includes("multipart/form-data");
652209
652298
  let firstChunk = true;
@@ -652232,7 +652321,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
652232
652321
  }
652233
652322
  });
652234
652323
  req2.on("end", () => {
652235
- ws.end(() => resolve55());
652324
+ ws.end(() => resolve56());
652236
652325
  });
652237
652326
  req2.on("error", reject);
652238
652327
  });
@@ -652455,7 +652544,7 @@ data: ${JSON.stringify(data)}
652455
652544
  const tmpPath = path12.join(os9.tmpdir(), `omnius-clone-upload-${Date.now()}-${filename}`);
652456
652545
  const stripBoundary = ct.includes("multipart/form-data");
652457
652546
  let bytesWritten = 0;
652458
- await new Promise((resolve55, reject) => {
652547
+ await new Promise((resolve56, reject) => {
652459
652548
  const ws = fs11.createWriteStream(tmpPath);
652460
652549
  let firstChunk = true;
652461
652550
  let inFilePart = !stripBoundary;
@@ -652483,7 +652572,7 @@ data: ${JSON.stringify(data)}
652483
652572
  }
652484
652573
  });
652485
652574
  req2.on("end", () => {
652486
- ws.end(() => resolve55());
652575
+ ws.end(() => resolve56());
652487
652576
  });
652488
652577
  req2.on("error", reject);
652489
652578
  });
@@ -652848,7 +652937,7 @@ data: ${JSON.stringify(data)}
652848
652937
  }
652849
652938
  const sessionId = chatBody.session_id;
652850
652939
  const model = chatBody.model || loadConfig().model;
652851
- const cwdPath = resolve50(process.cwd());
652940
+ const cwdPath = resolve51(process.cwd());
652852
652941
  const session = getSession(sessionId, model, cwdPath);
652853
652942
  addUserMessage(session, chatBody.message);
652854
652943
  compactSession(session);
@@ -653048,7 +653137,7 @@ ${historyLines}
653048
653137
  });
653049
653138
  child.stderr?.on("data", () => {
653050
653139
  });
653051
- await new Promise((resolve55) => {
653140
+ await new Promise((resolve56) => {
653052
653141
  onChildClose(child, () => {
653053
653142
  if (lineBuffer.trim()) finalLines.push(lineBuffer);
653054
653143
  const rawFinal = finalLines.join("\n").trim();
@@ -653115,7 +653204,7 @@ ${historyLines}
653115
653204
  });
653116
653205
  res.write("data: [DONE]\n\n");
653117
653206
  res.end();
653118
- resolve55();
653207
+ resolve56();
653119
653208
  });
653120
653209
  });
653121
653210
  return;
@@ -653146,12 +653235,12 @@ ${historyLines}
653146
653235
  });
653147
653236
  const killDeadlineMs = chatTimeoutS * 1e3 + 3e4;
653148
653237
  let killedByDeadline = false;
653149
- await new Promise((resolve55) => {
653238
+ await new Promise((resolve56) => {
653150
653239
  let done = false;
653151
653240
  const finish = () => {
653152
653241
  if (!done) {
653153
653242
  done = true;
653154
- resolve55();
653243
+ resolve56();
653155
653244
  }
653156
653245
  };
653157
653246
  onChildClose(child, finish);
@@ -654472,7 +654561,7 @@ function startApiServer(options2 = {}) {
654472
654561
  }
654473
654562
  } catch {
654474
654563
  }
654475
- const watcher = fsWatch3(dir, (_evt, fname) => {
654564
+ const watcher = fsWatch4(dir, (_evt, fname) => {
654476
654565
  if (!fname || !fname.endsWith(".json") || fname.includes(".tmp.")) return;
654477
654566
  const sid = fname.replace(/\.json$/, "");
654478
654567
  const fp = join147(dir, fname);
@@ -654557,8 +654646,8 @@ function startApiServer(options2 = {}) {
654557
654646
  if (useTls) {
654558
654647
  try {
654559
654648
  tlsOpts = {
654560
- cert: readFileSync108(resolve50(tlsCert)),
654561
- key: readFileSync108(resolve50(tlsKey))
654649
+ cert: readFileSync108(resolve51(tlsCert)),
654650
+ key: readFileSync108(resolve51(tlsKey))
654562
654651
  };
654563
654652
  } catch (e2) {
654564
654653
  log22(`
@@ -655506,8 +655595,8 @@ async function apiServeCommand(opts, config) {
655506
655595
  verbose: opts.verbose,
655507
655596
  ollamaUrl: config.backendUrl
655508
655597
  });
655509
- await new Promise((resolve55) => {
655510
- server2.on("close", resolve55);
655598
+ await new Promise((resolve56) => {
655599
+ server2.on("close", resolve56);
655511
655600
  });
655512
655601
  }
655513
655602
  function removeCronByMarker(id) {
@@ -655688,7 +655777,7 @@ var init_clipboard_media = __esm({
655688
655777
 
655689
655778
  // packages/cli/src/tui/interactive.ts
655690
655779
  import { cwd } from "node:process";
655691
- import { resolve as resolve51, join as join149, dirname as dirname41, extname as extname17, relative as relative14 } from "node:path";
655780
+ import { resolve as resolve52, join as join149, dirname as dirname41, extname as extname17, relative as relative14 } from "node:path";
655692
655781
  import { createRequire as createRequire8 } from "node:module";
655693
655782
  import { fileURLToPath as fileURLToPath19 } from "node:url";
655694
655783
  import {
@@ -658875,7 +658964,7 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
658875
658964
  };
658876
658965
  }
658877
658966
  async function startInteractive(config, repoPath) {
658878
- const repoRoot = resolve51(repoPath ?? cwd());
658967
+ const repoRoot = resolve52(repoPath ?? cwd());
658879
658968
  try {
658880
658969
  const { registerProject: registerProject2, getCurrentProject: getCurrentProject2, setCurrentProject: setCurrentProject2 } = await Promise.resolve().then(() => (init_projects(), projects_exports));
658881
658970
  registerProject2(repoRoot, process.pid);
@@ -662410,8 +662499,8 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
662410
662499
  if (name10 === "voice_list_files") {
662411
662500
  const baseDir = String(args?.dir ?? ".");
662412
662501
  const { readdirSync: readdirSync50, statSync: statSync49 } = __require("node:fs");
662413
- const { join: join154, resolve: resolve55 } = __require("node:path");
662414
- const base3 = baseDir.startsWith("/") ? baseDir : resolve55(join154(repoRoot, baseDir));
662502
+ const { join: join154, resolve: resolve56 } = __require("node:path");
662503
+ const base3 = baseDir.startsWith("/") ? baseDir : resolve56(join154(repoRoot, baseDir));
662415
662504
  const items = readdirSync50(base3).slice(0, 200).map((f2) => {
662416
662505
  const s2 = statSync49(join154(base3, f2));
662417
662506
  return { name: f2, dir: s2.isDirectory(), size: s2.size };
@@ -663126,7 +663215,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
663126
663215
  title: `Restore previous session?`,
663127
663216
  rl,
663128
663217
  availableRows: statusBar.isActive ? statusBar.availableContentRows : void 0,
663129
- onInit: ({ updateItem, resolve: resolve55 }) => {
663218
+ onInit: ({ updateItem, resolve: resolve56 }) => {
663130
663219
  const timer = setInterval(() => {
663131
663220
  countdown -= 1;
663132
663221
  if (countdown >= 0) {
@@ -663136,7 +663225,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
663136
663225
  }
663137
663226
  if (countdown <= 0) {
663138
663227
  clearInterval(timer);
663139
- resolve55({ confirmed: true, key: "restore", index: 0 });
663228
+ resolve56({ confirmed: true, key: "restore", index: 0 });
663140
663229
  }
663141
663230
  }, 1e3);
663142
663231
  return () => clearInterval(timer);
@@ -663508,9 +663597,9 @@ Execute this skill now. Follow the behavioral guidance above.`;
663508
663597
  }
663509
663598
  }
663510
663599
  const cleanPath = input.replace(/^['"]|['"]$/g, "").trim();
663511
- const isImage = isImagePath(cleanPath) && existsSync134(resolve51(repoRoot, cleanPath));
663512
- const isMedia = !isImage && isTranscribablePath(cleanPath) && existsSync134(resolve51(repoRoot, cleanPath));
663513
- const isMarkdown = !isImage && !isMedia && /\.(md|markdown)$/i.test(cleanPath) && existsSync134(resolve51(repoRoot, cleanPath));
663600
+ const isImage = isImagePath(cleanPath) && existsSync134(resolve52(repoRoot, cleanPath));
663601
+ const isMedia = !isImage && isTranscribablePath(cleanPath) && existsSync134(resolve52(repoRoot, cleanPath));
663602
+ const isMarkdown = !isImage && !isMedia && /\.(md|markdown)$/i.test(cleanPath) && existsSync134(resolve52(repoRoot, cleanPath));
663514
663603
  if (activeTask) {
663515
663604
  if ((isImage || isMedia) && activeTask.runner.isPaused) {
663516
663605
  activeTask.runner.resume();
@@ -663518,7 +663607,7 @@ Execute this skill now. Follow the behavioral guidance above.`;
663518
663607
  }
663519
663608
  if (isImage) {
663520
663609
  try {
663521
- const imgPath = resolve51(repoRoot, cleanPath);
663610
+ const imgPath = resolve52(repoRoot, cleanPath);
663522
663611
  const imgBuffer = readFileSync110(imgPath);
663523
663612
  const base642 = imgBuffer.toString("base64");
663524
663613
  const ext = extname17(cleanPath).toLowerCase();
@@ -663565,7 +663654,7 @@ ${combinedImageContext}` : `User shared image: ${cleanPath}`
663565
663654
  writeContent(() => renderInfo(`Transcribing: ${cleanPath}...`));
663566
663655
  const engine = getListenEngine();
663567
663656
  const result = await engine.transcribeFile(
663568
- resolve51(repoRoot, cleanPath),
663657
+ resolve52(repoRoot, cleanPath),
663569
663658
  repoRoot
663570
663659
  );
663571
663660
  if (result) {
@@ -663650,7 +663739,7 @@ ${result.text}`;
663650
663739
  }
663651
663740
  let fullInput = input;
663652
663741
  if (isImage && fullInput === input) {
663653
- const imgPath = resolve51(repoRoot, cleanPath);
663742
+ const imgPath = resolve52(repoRoot, cleanPath);
663654
663743
  const asciiContext = await renderAsciiPreviewForImage(
663655
663744
  imgPath,
663656
663745
  cleanPath,
@@ -663693,7 +663782,7 @@ Read it with image_read or vision if more detail is needed. Describe what you se
663693
663782
  () => renderInfo(`Setting voice clone reference: ${cleanPath}`)
663694
663783
  );
663695
663784
  const msg = await voiceEngine.setCloneVoice(
663696
- resolve51(repoRoot, cleanPath)
663785
+ resolve52(repoRoot, cleanPath)
663697
663786
  );
663698
663787
  writeContent(() => renderInfo(msg));
663699
663788
  showPrompt();
@@ -663702,7 +663791,7 @@ Read it with image_read or vision if more detail is needed. Describe what you se
663702
663791
  }
663703
663792
  if (isMarkdown && fullInput === input) {
663704
663793
  try {
663705
- const mdPath = resolve51(repoRoot, cleanPath);
663794
+ const mdPath = resolve52(repoRoot, cleanPath);
663706
663795
  const mdContent = readFileSync110(mdPath, "utf8");
663707
663796
  const { parseMcpMarkdown: parseMcpMarkdown2 } = await Promise.resolve().then(() => (init_dist5(), dist_exports));
663708
663797
  const result = parseMcpMarkdown2(mdContent);
@@ -663767,7 +663856,7 @@ Read it with image_read or vision if more detail is needed. Describe what you se
663767
663856
  writeContent(() => renderInfo(`Transcribing: ${cleanPath}...`));
663768
663857
  const engine = getListenEngine();
663769
663858
  const result = await engine.transcribeFile(
663770
- resolve51(repoRoot, cleanPath),
663859
+ resolve52(repoRoot, cleanPath),
663771
663860
  repoRoot
663772
663861
  );
663773
663862
  if (result) {
@@ -664188,7 +664277,7 @@ async function shouldRunFirstRunSetup(config, firstRun = isFirstRun()) {
664188
664277
  }
664189
664278
  }
664190
664279
  async function runWithTUI(task, config, repoPath, callbacks) {
664191
- const repoRoot = resolve51(repoPath ?? cwd());
664280
+ const repoRoot = resolve52(repoPath ?? cwd());
664192
664281
  initOmniusDirectory(repoRoot);
664193
664282
  if (await shouldRunFirstRunSetup(config)) {
664194
664283
  const setupModel = await runSetupWizard(config);
@@ -664694,13 +664783,13 @@ __export(run_exports, {
664694
664783
  runCommand: () => runCommand2,
664695
664784
  statusCommand: () => statusCommand
664696
664785
  });
664697
- import { resolve as resolve52 } from "node:path";
664786
+ import { resolve as resolve53 } from "node:path";
664698
664787
  import { spawn as spawn33 } from "node:child_process";
664699
664788
  import { mkdirSync as mkdirSync82, writeFileSync as writeFileSync74, readFileSync as readFileSync111, readdirSync as readdirSync49, existsSync as existsSync135 } from "node:fs";
664700
664789
  import { randomBytes as randomBytes28 } from "node:crypto";
664701
664790
  import { join as join150 } from "node:path";
664702
664791
  function jobsDir2(repoPath) {
664703
- const root = resolve52(repoPath ?? process.cwd());
664792
+ const root = resolve53(repoPath ?? process.cwd());
664704
664793
  const dir = join150(root, ".omnius", "jobs");
664705
664794
  mkdirSync82(dir, { recursive: true });
664706
664795
  return dir;
@@ -664797,7 +664886,7 @@ function extractSummary(captured) {
664797
664886
  async function runBackground(task, config, opts) {
664798
664887
  const id = `job-${randomBytes28(3).toString("hex")}`;
664799
664888
  const dir = jobsDir2(opts.repoPath);
664800
- const repoRoot = resolve52(opts.repoPath ?? process.cwd());
664889
+ const repoRoot = resolve53(opts.repoPath ?? process.cwd());
664801
664890
  const job = {
664802
664891
  id,
664803
664892
  pid: 0,
@@ -664906,11 +664995,11 @@ var index_repo_exports = {};
664906
664995
  __export(index_repo_exports, {
664907
664996
  indexRepoCommand: () => indexRepoCommand
664908
664997
  });
664909
- import { resolve as resolve53 } from "node:path";
664998
+ import { resolve as resolve54 } from "node:path";
664910
664999
  import { existsSync as existsSync136, statSync as statSync48 } from "node:fs";
664911
665000
  import { cwd as cwd2 } from "node:process";
664912
665001
  async function indexRepoCommand(opts, _config3) {
664913
- const repoRoot = resolve53(opts.repoPath ?? cwd2());
665002
+ const repoRoot = resolve54(opts.repoPath ?? cwd2());
664914
665003
  printHeader("Index Repository");
664915
665004
  printInfo(`Indexing: ${repoRoot}`);
664916
665005
  if (!existsSync136(repoRoot)) {
@@ -665165,7 +665254,7 @@ var config_exports2 = {};
665165
665254
  __export(config_exports2, {
665166
665255
  configCommand: () => configCommand
665167
665256
  });
665168
- import { join as join151, resolve as resolve54 } from "node:path";
665257
+ import { join as join151, resolve as resolve55 } from "node:path";
665169
665258
  import { homedir as homedir55 } from "node:os";
665170
665259
  import { cwd as cwd3 } from "node:process";
665171
665260
  function redactIfSensitive(key, value2) {
@@ -665197,7 +665286,7 @@ async function configCommand(opts, config) {
665197
665286
  return handleShow(opts, config);
665198
665287
  }
665199
665288
  function handleShow(opts, config) {
665200
- const repoRoot = resolve54(opts.repoPath ?? cwd3());
665289
+ const repoRoot = resolve55(opts.repoPath ?? cwd3());
665201
665290
  printHeader("Configuration");
665202
665291
  const resolved = resolveSettings(repoRoot);
665203
665292
  printSection("Core Inference");
@@ -665281,7 +665370,7 @@ function handleSet(opts, _config3) {
665281
665370
  process.exit(1);
665282
665371
  }
665283
665372
  if (opts.local) {
665284
- const repoRoot = resolve54(opts.repoPath ?? cwd3());
665373
+ const repoRoot = resolve55(opts.repoPath ?? cwd3());
665285
665374
  try {
665286
665375
  initOmniusDirectory(repoRoot);
665287
665376
  const coerced = coerceForSettings(key, value2);
@@ -665431,14 +665520,14 @@ async function serveCommand(opts, config) {
665431
665520
  }, 3e4);
665432
665521
  idleChecker.unref();
665433
665522
  }
665434
- await new Promise((resolve55) => {
665523
+ await new Promise((resolve56) => {
665435
665524
  process.on("SIGINT", () => {
665436
665525
  server2.close();
665437
- resolve55();
665526
+ resolve56();
665438
665527
  });
665439
665528
  process.on("SIGTERM", () => {
665440
665529
  server2.close();
665441
- resolve55();
665530
+ resolve56();
665442
665531
  });
665443
665532
  });
665444
665533
  } catch (err) {
@@ -666007,11 +666096,11 @@ async function main() {
666007
666096
  if (mode === "crossmodal") {
666008
666097
  process.stdout.write("Running crossmodal smoke tests...\n");
666009
666098
  const { spawn: spawn34 } = await import("node:child_process");
666010
- const run2 = (file) => new Promise((resolve55, reject) => {
666099
+ const run2 = (file) => new Promise((resolve56, reject) => {
666011
666100
  const p2 = spawn34(process.execPath, [file], { stdio: ["ignore", "pipe", "pipe"] });
666012
666101
  p2.stdout.on("data", (d2) => process.stdout.write(d2));
666013
666102
  p2.stderr.on("data", (d2) => process.stdout.write(d2));
666014
- onChildExit(p2, (code8) => code8 === 0 ? resolve55() : reject(new Error(`${file} exited ${code8}`)));
666103
+ onChildExit(p2, (code8) => code8 === 0 ? resolve56() : reject(new Error(`${file} exited ${code8}`)));
666015
666104
  });
666016
666105
  const base3 = process.cwd();
666017
666106
  await run2(`${base3}/eval/test-crossmodal.mjs`);