@vapi-network/cli 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -9442,13 +9442,13 @@ var init_getCallError = __esm({
9442
9442
 
9443
9443
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withResolvers.js
9444
9444
  function withResolvers() {
9445
- let resolve2 = () => void 0;
9445
+ let resolve3 = () => void 0;
9446
9446
  let reject = () => void 0;
9447
9447
  const promise2 = new Promise((resolve_, reject_) => {
9448
- resolve2 = resolve_;
9448
+ resolve3 = resolve_;
9449
9449
  reject = reject_;
9450
9450
  });
9451
- return { promise: promise2, resolve: resolve2, reject };
9451
+ return { promise: promise2, resolve: resolve3, reject };
9452
9452
  }
9453
9453
  var init_withResolvers = __esm({
9454
9454
  "../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withResolvers.js"() {
@@ -9467,8 +9467,8 @@ function createBatchScheduler({ fn, id: id2, shouldSplitBatch, wait: wait2 = 0,
9467
9467
  if (sort && Array.isArray(data))
9468
9468
  data.sort(sort);
9469
9469
  for (let i = 0; i < scheduler.length; i++) {
9470
- const { resolve: resolve2 } = scheduler[i];
9471
- resolve2?.([data[i], data]);
9470
+ const { resolve: resolve3 } = scheduler[i];
9471
+ resolve3?.([data[i], data]);
9472
9472
  }
9473
9473
  }).catch((err) => {
9474
9474
  for (let i = 0; i < scheduler.length; i++) {
@@ -9484,16 +9484,16 @@ function createBatchScheduler({ fn, id: id2, shouldSplitBatch, wait: wait2 = 0,
9484
9484
  return {
9485
9485
  flush,
9486
9486
  async schedule(args) {
9487
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
9487
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
9488
9488
  const split2 = shouldSplitBatch?.([...getBatchedArgs(), args]);
9489
9489
  if (split2)
9490
9490
  exec();
9491
9491
  const hasActiveScheduler = getScheduler().length > 0;
9492
9492
  if (hasActiveScheduler) {
9493
- setScheduler({ args, resolve: resolve2, reject });
9493
+ setScheduler({ args, resolve: resolve3, reject });
9494
9494
  return promise2;
9495
9495
  }
9496
- setScheduler({ args, resolve: resolve2, reject });
9496
+ setScheduler({ args, resolve: resolve3, reject });
9497
9497
  setTimeout(exec, wait2);
9498
9498
  return promise2;
9499
9499
  }
@@ -30773,7 +30773,7 @@ function observe(observerId, callbacks, fn) {
30773
30773
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/wait.js
30774
30774
  init_utils3();
30775
30775
  async function wait(time3, { signal } = {}) {
30776
- return new Promise((resolve2, reject) => {
30776
+ return new Promise((resolve3, reject) => {
30777
30777
  if (signal?.aborted) {
30778
30778
  reject(getAbortError(signal));
30779
30779
  return;
@@ -30781,7 +30781,7 @@ async function wait(time3, { signal } = {}) {
30781
30781
  const cleanup = () => signal?.removeEventListener("abort", onAbort);
30782
30782
  const timeout = setTimeout(() => {
30783
30783
  cleanup();
30784
- resolve2();
30784
+ resolve3();
30785
30785
  }, time3);
30786
30786
  const onAbort = () => {
30787
30787
  clearTimeout(timeout);
@@ -31357,7 +31357,7 @@ init_withResolvers();
31357
31357
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withRetry.js
31358
31358
  init_utils3();
31359
31359
  function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true, signal } = {}) {
31360
- return new Promise((resolve2, reject) => {
31360
+ return new Promise((resolve3, reject) => {
31361
31361
  const attemptRetry = async ({ count = 0 } = {}) => {
31362
31362
  if (signal?.aborted) {
31363
31363
  reject(getAbortError(signal));
@@ -31377,7 +31377,7 @@ function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shoul
31377
31377
  };
31378
31378
  try {
31379
31379
  const data = await fn();
31380
- resolve2(data);
31380
+ resolve3(data);
31381
31381
  } catch (err) {
31382
31382
  if (signal?.aborted) {
31383
31383
  reject(getAbortError(signal));
@@ -31528,7 +31528,7 @@ async function sendCalls(client, parameters) {
31528
31528
  results.push({ reason, status: "rejected" });
31529
31529
  }
31530
31530
  if (experimental_fallbackDelay > 0)
31531
- await new Promise((resolve2) => setTimeout(resolve2, experimental_fallbackDelay));
31531
+ await new Promise((resolve3) => setTimeout(resolve3, experimental_fallbackDelay));
31532
31532
  }
31533
31533
  if (results.every((r) => r.status === "rejected"))
31534
31534
  throw results[0].reason;
@@ -31631,9 +31631,9 @@ async function waitForCallsStatus(client, parameters) {
31631
31631
  throwOnFailure = false
31632
31632
  } = parameters;
31633
31633
  const observerId = stringify(["waitForCallsStatus", client.uid, id2]);
31634
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
31634
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
31635
31635
  let timer;
31636
- const unobserve = observe(observerId, { resolve: resolve2, reject }, (emit) => {
31636
+ const unobserve = observe(observerId, { resolve: resolve3, reject }, (emit) => {
31637
31637
  const unpoll = poll(async () => {
31638
31638
  const done = (fn) => {
31639
31639
  clearTimeout(timer);
@@ -32015,13 +32015,13 @@ async function isImageUri(uri) {
32015
32015
  }
32016
32016
  if (!Object.hasOwn(globalThis, "Image"))
32017
32017
  return false;
32018
- return new Promise((resolve2) => {
32018
+ return new Promise((resolve3) => {
32019
32019
  const img = new Image();
32020
32020
  img.onload = () => {
32021
- resolve2(true);
32021
+ resolve3(true);
32022
32022
  };
32023
32023
  img.onerror = () => {
32024
- resolve2(false);
32024
+ resolve3(false);
32025
32025
  };
32026
32026
  img.src = uri;
32027
32027
  });
@@ -33484,7 +33484,7 @@ init_utils3();
33484
33484
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withTimeout.js
33485
33485
  init_utils3();
33486
33486
  function withTimeout(fn, { errorInstance = new Error("timed out"), timeout, signal }) {
33487
- return new Promise((resolve2, reject) => {
33487
+ return new Promise((resolve3, reject) => {
33488
33488
  ;
33489
33489
  (async () => {
33490
33490
  let timeoutId;
@@ -33499,7 +33499,7 @@ function withTimeout(fn, { errorInstance = new Error("timed out"), timeout, sign
33499
33499
  }
33500
33500
  }, timeout);
33501
33501
  }
33502
- resolve2(await fn({ signal: controller?.signal || null }));
33502
+ resolve3(await fn({ signal: controller?.signal || null }));
33503
33503
  } catch (err) {
33504
33504
  if (controller?.signal.aborted && isAbortError(err)) {
33505
33505
  reject(errorInstance);
@@ -37479,13 +37479,13 @@ async function waitForTransactionReceipt(client, parameters) {
37479
37479
  let retrying = false;
37480
37480
  let _unobserve;
37481
37481
  let _unwatch;
37482
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
37482
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
37483
37483
  const timer = timeout ? setTimeout(() => {
37484
37484
  _unwatch?.();
37485
37485
  _unobserve?.();
37486
37486
  reject(new WaitForTransactionReceiptTimeoutError({ hash: hash5 }));
37487
37487
  }, timeout) : void 0;
37488
- _unobserve = observe(observerId, { onReplaced, resolve: resolve2, reject }, async (emit) => {
37488
+ _unobserve = observe(observerId, { onReplaced, resolve: resolve3, reject }, async (emit) => {
37489
37489
  receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash5 }).catch(() => void 0);
37490
37490
  if (receipt && confirmations <= 1) {
37491
37491
  clearTimeout(timer);
@@ -43444,7 +43444,7 @@ function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) {
43444
43444
  coalescedRequest.numConsumers++;
43445
43445
  if (signal) {
43446
43446
  const responsePromise = coalescedRequest.responsePromise;
43447
- return await new Promise((resolve2, reject) => {
43447
+ return await new Promise((resolve3, reject) => {
43448
43448
  const handleAbort = (e22) => {
43449
43449
  signal.removeEventListener("abort", handleAbort);
43450
43450
  coalescedRequest.numConsumers -= 1;
@@ -43457,7 +43457,7 @@ function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) {
43457
43457
  reject(e22.target.reason);
43458
43458
  };
43459
43459
  signal.addEventListener("abort", handleAbort);
43460
- responsePromise.then(resolve2).catch(reject).finally(() => {
43460
+ responsePromise.then(resolve3).catch(reject).finally(() => {
43461
43461
  signal.removeEventListener("abort", handleAbort);
43462
43462
  });
43463
43463
  });
@@ -44840,7 +44840,7 @@ function createPublicFetch(options) {
44840
44840
  });
44841
44841
  const normalized = new Request(input2, init);
44842
44842
  const bytes = normalized.body ? Buffer.from(await normalized.arrayBuffer()) : null;
44843
- return await new Promise((resolve2, reject) => {
44843
+ return await new Promise((resolve3, reject) => {
44844
44844
  const requestOptions2 = {
44845
44845
  method: normalized.method,
44846
44846
  headers: Object.fromEntries(normalized.headers),
@@ -44865,7 +44865,7 @@ function createPublicFetch(options) {
44865
44865
  { status, statusText: incoming.statusMessage, headers }
44866
44866
  );
44867
44867
  Object.defineProperty(response, "url", { value: url2.toString() });
44868
- resolve2(response);
44868
+ resolve3(response);
44869
44869
  } catch (error61) {
44870
44870
  incoming.destroy();
44871
44871
  reject(error61);
@@ -45634,8 +45634,8 @@ var svmFetchQueue = Promise.resolve();
45634
45634
  async function withGuardedSvmFetch(fetchImpl, operation) {
45635
45635
  const previous = svmFetchQueue;
45636
45636
  let release2;
45637
- svmFetchQueue = new Promise((resolve2) => {
45638
- release2 = resolve2;
45637
+ svmFetchQueue = new Promise((resolve3) => {
45638
+ release2 = resolve3;
45639
45639
  });
45640
45640
  await previous;
45641
45641
  const originalFetch = globalThis.fetch;
@@ -46848,7 +46848,7 @@ async function withFileLock(lockPath, fn, options = {}) {
46848
46848
  if (Date.now() >= deadline) {
46849
46849
  throw new FileLockedError(options.lockedMessage);
46850
46850
  }
46851
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46851
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46852
46852
  continue;
46853
46853
  }
46854
46854
  handle = candidate;
@@ -46863,7 +46863,7 @@ async function withFileLock(lockPath, fn, options = {}) {
46863
46863
  if (Date.now() >= deadline) {
46864
46864
  throw new FileLockedError(options.lockedMessage);
46865
46865
  }
46866
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46866
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46867
46867
  }
46868
46868
  }
46869
46869
  const ownedHandle = handle;
@@ -46984,7 +46984,7 @@ async function restoreRenamedLock(path, tombPath) {
46984
46984
  } catch (error61) {
46985
46985
  if (hasCode(error61, "ENOENT")) return;
46986
46986
  if (!hasCode(error61, "EEXIST")) throw error61;
46987
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46987
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46988
46988
  }
46989
46989
  }
46990
46990
  }
@@ -47983,7 +47983,7 @@ async function withAgentCredentialLock(wallets, clientId, operation) {
47983
47983
  if (Date.now() >= deadline) {
47984
47984
  throw httpError("Timed out waiting to update the agent credentials.");
47985
47985
  }
47986
- await new Promise((resolve2) => setTimeout(resolve2, 20));
47986
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
47987
47987
  }
47988
47988
  }
47989
47989
  try {
@@ -48136,7 +48136,7 @@ function splitScopes(scope) {
48136
48136
  return scope.split(/\s+/u).filter(Boolean);
48137
48137
  }
48138
48138
  async function sleepFor(milliseconds) {
48139
- await new Promise((resolve2) => setTimeout(resolve2, milliseconds));
48139
+ await new Promise((resolve3) => setTimeout(resolve3, milliseconds));
48140
48140
  }
48141
48141
 
48142
48142
  // ../core/src/keystore.ts
@@ -69614,7 +69614,7 @@ function decryptWithKey(key2, sealed) {
69614
69614
  return Buffer.concat([decipher.update(sealed.ciphertext), decipher.final()]);
69615
69615
  }
69616
69616
  async function deriveScryptKey(passphrase, salt) {
69617
- return await new Promise((resolve2, reject) => {
69617
+ return await new Promise((resolve3, reject) => {
69618
69618
  scrypt(
69619
69619
  passphrase,
69620
69620
  salt,
@@ -69630,7 +69630,7 @@ async function deriveScryptKey(passphrase, salt) {
69630
69630
  reject(error61);
69631
69631
  return;
69632
69632
  }
69633
- resolve2(derivedKey);
69633
+ resolve3(derivedKey);
69634
69634
  }
69635
69635
  );
69636
69636
  });
@@ -69954,7 +69954,7 @@ async function promptForSecret(prompt, noTerminalHint) {
69954
69954
  stdin.setRawMode(true);
69955
69955
  stdin.resume();
69956
69956
  stdin.setEncoding("utf8");
69957
- return await new Promise((resolve2, reject) => {
69957
+ return await new Promise((resolve3, reject) => {
69958
69958
  let value = "";
69959
69959
  const cleanup = () => {
69960
69960
  stdin.off("data", onData);
@@ -69971,7 +69971,7 @@ async function promptForSecret(prompt, noTerminalHint) {
69971
69971
  }
69972
69972
  if (character === "\r" || character === "\n") {
69973
69973
  cleanup();
69974
- resolve2(value);
69974
+ resolve3(value);
69975
69975
  return;
69976
69976
  }
69977
69977
  if (character === "\x7F" || character === "\b") {
@@ -70033,7 +70033,7 @@ async function withAccountMovementLock(home, account, timeoutMs, operation, sign
70033
70033
  if (!(error61 instanceof Error && "code" in error61 && error61.code === "EEXIST")) throw error61;
70034
70034
  await removeStaleLock2(path);
70035
70035
  if (Date.now() >= deadline) throw new AccountMovementLockedError(account);
70036
- await new Promise((resolve2) => setTimeout(resolve2, 20));
70036
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
70037
70037
  }
70038
70038
  }
70039
70039
  const ownedHandle = handle;
@@ -70504,14 +70504,14 @@ function requireSuccess(result, what) {
70504
70504
  function withoutTrailingNewline(value) {
70505
70505
  return value.replace(/\r?\n$/u, "");
70506
70506
  }
70507
- var spawnRunner = async (file2, args, input2) => await new Promise((resolve2) => {
70507
+ var spawnRunner = async (file2, args, input2) => await new Promise((resolve3) => {
70508
70508
  let stdout = "";
70509
70509
  let stderr2 = "";
70510
70510
  let settled = false;
70511
70511
  const finish = (outcome) => {
70512
70512
  if (settled) return;
70513
70513
  settled = true;
70514
- resolve2(outcome);
70514
+ resolve3(outcome);
70515
70515
  };
70516
70516
  const child = spawn(file2, [...args], {
70517
70517
  detached: true,
@@ -71474,7 +71474,7 @@ async function withVaultLock(path, operation) {
71474
71474
  if (Date.now() >= deadline) {
71475
71475
  throw new VaultError("corrupt", "Timed out waiting for the vault lock.");
71476
71476
  }
71477
- await new Promise((resolve2) => setTimeout(resolve2, 20));
71477
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
71478
71478
  }
71479
71479
  }
71480
71480
  try {
@@ -73207,7 +73207,7 @@ async function withRegistryLock(path, operation) {
73207
73207
  if (Date.now() >= deadline) {
73208
73208
  throw new KeystoreError("Timed out waiting for the wallet registry lock.");
73209
73209
  }
73210
- await new Promise((resolve2) => setTimeout(resolve2, 20));
73210
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
73211
73211
  }
73212
73212
  }
73213
73213
  try {
@@ -73553,11 +73553,11 @@ function publicErrorMessage(error61, fallback, sensitiveValues = []) {
73553
73553
  return error61 instanceof Error ? message : fallback;
73554
73554
  }
73555
73555
  async function unrefSleep(milliseconds, signal) {
73556
- await new Promise((resolve2) => {
73556
+ await new Promise((resolve3) => {
73557
73557
  const finish = () => {
73558
73558
  clearTimeout(timer);
73559
73559
  signal?.removeEventListener("abort", finish);
73560
- resolve2();
73560
+ resolve3();
73561
73561
  };
73562
73562
  const timer = setTimeout(finish, milliseconds);
73563
73563
  timer.unref();
@@ -74094,7 +74094,7 @@ async function withLedgerLock(path, operation) {
74094
74094
  if (Date.now() >= deadline) {
74095
74095
  throw new Error("Timed out waiting for the spend ledger lock.");
74096
74096
  }
74097
- await new Promise((resolve2) => setTimeout(resolve2, 20));
74097
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
74098
74098
  }
74099
74099
  }
74100
74100
  try {
@@ -74728,7 +74728,7 @@ async function withTransferLock(context, nonce, operation) {
74728
74728
  if (Date.now() >= deadline) {
74729
74729
  throw new Error("Timed out waiting for the transfer lock.");
74730
74730
  }
74731
- await new Promise((resolve2) => setTimeout(resolve2, 20));
74731
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
74732
74732
  }
74733
74733
  }
74734
74734
  try {
@@ -76446,8 +76446,8 @@ async function sweepAllAboveCeiling(args) {
76446
76446
  }
76447
76447
  var pendingCeilingSweeps = /* @__PURE__ */ new Set();
76448
76448
  function scheduleCeilingSweep(hook) {
76449
- const task = new Promise((resolve2) => {
76450
- setTimeout(resolve2, 0);
76449
+ const task = new Promise((resolve3) => {
76450
+ setTimeout(resolve3, 0);
76451
76451
  }).then(async () => {
76452
76452
  const timeoutMs = hook.timeoutMs ?? CEILING_SWEEP_TIMEOUT_MS;
76453
76453
  const controller = new AbortController();
@@ -76487,8 +76487,8 @@ async function drainCeilingSweeps(timeoutMs = CEILING_SWEEP_TIMEOUT_MS) {
76487
76487
  try {
76488
76488
  await Promise.race([
76489
76489
  Promise.allSettled(pending),
76490
- new Promise((resolve2) => {
76491
- timeout = setTimeout(resolve2, timeoutMs);
76490
+ new Promise((resolve3) => {
76491
+ timeout = setTimeout(resolve3, timeoutMs);
76492
76492
  })
76493
76493
  ]);
76494
76494
  } finally {
@@ -77587,7 +77587,7 @@ function createRunBudget(args) {
77587
77587
  import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
77588
77588
  import { arch, platform, release } from "node:os";
77589
77589
  import { join as join13 } from "node:path";
77590
- var VAPI_CLIENT_VERSION = "0.9.4";
77590
+ var VAPI_CLIENT_VERSION = "0.9.5";
77591
77591
  async function createSupportReport(options) {
77592
77592
  const message = options.message.trim();
77593
77593
  if (!message) throw new Error("Support report message must not be empty.");
@@ -81293,7 +81293,7 @@ var authorizationTypes = {
81293
81293
  function createTasksChain(options) {
81294
81294
  const { account, client, pending, rpcFor } = options;
81295
81295
  const now = options.now ?? (() => /* @__PURE__ */ new Date());
81296
- const sleep = options.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
81296
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
81297
81297
  const randomBytes17 = options.randomBytes ?? cryptoRandomBytes2;
81298
81298
  const confirmations = options.confirmations ?? 2;
81299
81299
  if (!Number.isSafeInteger(confirmations) || confirmations < 1)
@@ -82098,7 +82098,7 @@ async function waitForMilestone(client, input2) {
82098
82098
  throw new RangeError("The milestone wait timeout must be non-negative and finite.");
82099
82099
  if (!Number.isFinite(intervalMs) || intervalMs <= 0)
82100
82100
  throw new RangeError("The milestone wait interval must be positive and finite.");
82101
- const sleep = input2.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
82101
+ const sleep = input2.sleep ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
82102
82102
  const now = input2.now ?? (() => /* @__PURE__ */ new Date());
82103
82103
  const started = now().getTime();
82104
82104
  const deadline = started + timeoutMs;
@@ -86700,10 +86700,10 @@ async function buildStatus(deps) {
86700
86700
  const timers = deps.timers ?? { setTimeout, clearTimeout };
86701
86701
  const controller = new AbortController();
86702
86702
  let timeout;
86703
- const deadline = new Promise((resolve2) => {
86703
+ const deadline = new Promise((resolve3) => {
86704
86704
  timeout = timers.setTimeout(() => {
86705
86705
  controller.abort(new Error("Status request deadline exceeded."));
86706
- resolve2();
86706
+ resolve3();
86707
86707
  }, deps.timeoutMs ?? STATUS_TIMEOUT_MS);
86708
86708
  });
86709
86709
  try {
@@ -94872,6 +94872,9 @@ function rgbToAnsi256(red, green, blue) {
94872
94872
  import { readFile as readFile24, stat as stat14 } from "node:fs/promises";
94873
94873
  import { join as join21 } from "node:path";
94874
94874
 
94875
+ // src/dashboard.ts
94876
+ import { resolve as resolve2 } from "node:path";
94877
+
94875
94878
  // src/publish-client.ts
94876
94879
  var LISTING_CATEGORIES = ["ai", "data", "crypto", "compute", "search"];
94877
94880
  var PROBE_MODES = ["origin", "endpoint", "openapi"];
@@ -95192,7 +95195,8 @@ async function runLoginFlow(argv, json2, io, dependencies, options = {}) {
95192
95195
  booleanOptions: /* @__PURE__ */ new Set(["--publish", "--no-browser"]),
95193
95196
  maximumPositionals: 0
95194
95197
  });
95195
- const target = await targetWallet(parsed, dependencies);
95198
+ const paths = getVapiPaths(options.home);
95199
+ const target = await targetWallet(parsed, dependencies, paths.directory);
95196
95200
  const { account } = await unlockTarget(target, dependencies);
95197
95201
  const label = parsed.one("--label") ?? target.name;
95198
95202
  const scopes = [
@@ -95201,13 +95205,13 @@ async function runLoginFlow(argv, json2, io, dependencies, options = {}) {
95201
95205
  "tasks:write",
95202
95206
  ...parsed.has("--publish") ? ["call.publish"] : []
95203
95207
  ];
95204
- const config2 = await loadConfig(getVapiPaths().config, process.env, { notice: io.stderr });
95205
- const apiBase = registryBaseUrl(config2);
95208
+ const config2 = await loadConfig(paths.config, process.env, { notice: io.stderr });
95209
+ const apiBase = options.apiBase ?? registryBaseUrl(config2);
95206
95210
  const fetchImpl = dependencies.fetchImpl ?? createPublicFetch({ allowPrivateNetwork: false });
95207
95211
  const secrets = getSecretStore(dependencies);
95208
95212
  const device = await ensureDeviceName({
95209
95213
  env: getEnvironment(dependencies),
95210
- configPath: getVapiPaths().config,
95214
+ configPath: paths.config,
95211
95215
  ...dependencies.hostname === void 0 ? {} : { hostname: dependencies.hostname() }
95212
95216
  });
95213
95217
  const bearer = await trustedLinkBearer({
@@ -95461,6 +95465,87 @@ function shortAddress(address4) {
95461
95465
  return address4.length <= 12 ? address4 : `${address4.slice(0, 6)}\u2026${address4.slice(-4)}`;
95462
95466
  }
95463
95467
 
95468
+ // src/dashboard.ts
95469
+ function dashboardUrl(apiBase) {
95470
+ return `${apiBase.replace(/\/+$/u, "")}/agents`;
95471
+ }
95472
+ async function offerDashboardLink({
95473
+ name,
95474
+ json: json2,
95475
+ noLink = false,
95476
+ io,
95477
+ dependencies,
95478
+ home = getVapiPaths().directory,
95479
+ apiBase
95480
+ }) {
95481
+ const otherHome = resolve2(home) !== resolve2(getVapiPaths().directory);
95482
+ const command = `${otherHome ? `VAPI_HOME=${shellQuote(home)} ` : ""}${apiBase === void 0 ? "" : `VAPI_REGISTRY_URL=${shellQuote(apiBase)} `}vapi login --account ${name}`;
95483
+ const unlinked = {
95484
+ linked: false,
95485
+ next: [{ kind: "link", account: name, command }]
95486
+ };
95487
+ const hint = () => {
95488
+ if (!json2) io.stdout(`Run \`${command}\` to see this wallet on your dashboard.`);
95489
+ return unlinked;
95490
+ };
95491
+ try {
95492
+ const store = await WalletStore.open(home, {
95493
+ secrets: getSecretStore(dependencies),
95494
+ env: getEnvironment(dependencies)
95495
+ });
95496
+ if (store.entry(name)?.link !== void 0) return { linked: true };
95497
+ if (noLink || json2 || !isInteractive(dependencies) || activeAgentMarker(getEnvironment(dependencies)) !== void 0) {
95498
+ return hint();
95499
+ }
95500
+ const answer = (await getLinePrompt(dependencies)(`Link ${name} to your vAPI dashboard? [Y/n] `)).trim();
95501
+ if (!/^(?:y|yes)?$/iu.test(answer)) return hint();
95502
+ await runLoginFlow(["--account", name, "--label", name], false, io, dependencies, {
95503
+ home,
95504
+ ...apiBase === void 0 ? {} : { apiBase }
95505
+ });
95506
+ await store.reload();
95507
+ const link3 = store.entry(name)?.link;
95508
+ if (link3 === void 0) return hint();
95509
+ io.stdout(`See it on your dashboard: ${dashboardUrl(link3.apiBase)}`);
95510
+ return { linked: true };
95511
+ } catch (error61) {
95512
+ if (!json2) {
95513
+ io.stderr(`Link not completed: ${error61 instanceof Error ? error61.message : String(error61)}`);
95514
+ }
95515
+ return hint();
95516
+ }
95517
+ }
95518
+ async function dashboardCommand(argv, json2, io, dependencies) {
95519
+ const parsed = parseArguments(argv, {
95520
+ valueOptions: /* @__PURE__ */ new Set(["--wallet"]),
95521
+ booleanOptions: /* @__PURE__ */ new Set(["--no-browser", "--no-link"]),
95522
+ maximumPositionals: 0
95523
+ });
95524
+ const target = await targetWallet(parsed, dependencies);
95525
+ let status = { linked: true };
95526
+ if (target.entry.link === void 0) {
95527
+ if (!json2) io.stdout(`${target.name} is not linked to your vAPI dashboard yet.`);
95528
+ status = await offerDashboardLink({
95529
+ name: target.name,
95530
+ json: json2,
95531
+ noLink: parsed.has("--no-link"),
95532
+ io,
95533
+ dependencies: parsed.has("--no-browser") ? { ...dependencies, openUrl: () => false } : dependencies
95534
+ });
95535
+ }
95536
+ await target.store.reload();
95537
+ const apiBase = target.store.entry(target.name)?.link?.apiBase ?? registryBaseUrl(await readConfig(getVapiPaths().config, io));
95538
+ const url2 = dashboardUrl(apiBase);
95539
+ let opened = false;
95540
+ if (status.linked && !parsed.has("--no-browser") && (dependencies.interactive ?? Boolean(process.stdout.isTTY)) && activeAgentMarker(getEnvironment(dependencies)) === void 0) {
95541
+ opened = (dependencies.openUrl ?? openInBrowser)(url2);
95542
+ }
95543
+ io.stdout(json2 ? JSON.stringify({ account: target.name, url: url2, ...status, opened }) : url2);
95544
+ }
95545
+ function shellQuote(value) {
95546
+ return /^[a-zA-Z0-9_./-]+$/u.test(value) ? value : `'${value.replace(/'/gu, "'\\''")}'`;
95547
+ }
95548
+
95464
95549
  // src/status.ts
95465
95550
  import { stat as stat13 } from "node:fs/promises";
95466
95551
  import { homedir as homedir2 } from "node:os";
@@ -97846,10 +97931,10 @@ function apiEndpoint2(apiBase, path) {
97846
97931
  }
97847
97932
  async function sleepFor2(milliseconds, signal) {
97848
97933
  if (signal?.aborted === true) throw signal.reason;
97849
- await new Promise((resolve2, reject) => {
97934
+ await new Promise((resolve3, reject) => {
97850
97935
  const finish = () => {
97851
97936
  signal?.removeEventListener("abort", abort);
97852
- resolve2();
97937
+ resolve3();
97853
97938
  };
97854
97939
  const timeout = setTimeout(finish, milliseconds);
97855
97940
  const abort = () => {
@@ -98184,7 +98269,7 @@ async function readProcessStdin() {
98184
98269
  }
98185
98270
 
98186
98271
  // src/version.ts
98187
- var CLI_VERSION = "0.9.4";
98272
+ var CLI_VERSION = "0.9.5";
98188
98273
 
98189
98274
  // src/status.ts
98190
98275
  async function statusCommand(argv, json2, io, dependencies) {
@@ -98328,10 +98413,10 @@ async function runStatusSweep(args) {
98328
98413
  timeoutMs,
98329
98414
  ...args.warn === void 0 ? {} : { warn: args.warn }
98330
98415
  }),
98331
- new Promise((resolve2) => {
98416
+ new Promise((resolve3) => {
98332
98417
  timeout = setTimeout(() => {
98333
98418
  controller.abort();
98334
- resolve2();
98419
+ resolve3();
98335
98420
  }, timeoutMs);
98336
98421
  timeout.unref();
98337
98422
  })
@@ -98560,7 +98645,7 @@ async function siblingsFetchImpl(dependencies) {
98560
98645
  function shortAddress3(address4) {
98561
98646
  return address4.length <= 12 ? address4 : `${address4.slice(0, 6)}\u2026${address4.slice(-4)}`;
98562
98647
  }
98563
- async function accountsAddCommand(argv, json2, io, dependencies) {
98648
+ async function accountsAddCommand(argv, json2, io, dependencies, options = { link: "always" }) {
98564
98649
  const parsed = parseArguments(argv, {
98565
98650
  valueOptions: /* @__PURE__ */ new Set(["--label"]),
98566
98651
  booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
@@ -98577,6 +98662,18 @@ async function accountsAddCommand(argv, json2, io, dependencies) {
98577
98662
  });
98578
98663
  await recordAudit(dependencies, "wallet.create", { wallet: created.account });
98579
98664
  const address4 = created.address;
98665
+ if (options.link === "offer") {
98666
+ if (!json2) io.stdout(`Account ${created.account} derived: ${address4}`);
98667
+ const link3 = await offerDashboardLink({
98668
+ name: created.account,
98669
+ json: json2,
98670
+ noLink: parsed.has("--no-link"),
98671
+ io,
98672
+ dependencies
98673
+ });
98674
+ if (json2) io.stdout(JSON.stringify({ account: created.account, address: address4, ...link3 }));
98675
+ return;
98676
+ }
98580
98677
  if (parsed.has("--no-link")) {
98581
98678
  output2(
98582
98679
  io,
@@ -99392,10 +99489,10 @@ async function autoUploadBackup(io, json2, dependencies) {
99392
99489
  const timeoutMs = dependencies.cloudBackup?.uploadTimeoutMs ?? DEFAULT_UPLOAD_TIMEOUT_MS;
99393
99490
  const controller = new AbortController();
99394
99491
  let timer;
99395
- const timeout = new Promise((resolve2) => {
99492
+ const timeout = new Promise((resolve3) => {
99396
99493
  timer = setTimeout(() => {
99397
99494
  controller.abort();
99398
- resolve2({ status: "skipped", reason: "timeout" });
99495
+ resolve3({ status: "skipped", reason: "timeout" });
99399
99496
  }, timeoutMs);
99400
99497
  timer.unref();
99401
99498
  });
@@ -100619,7 +100716,7 @@ var HTTP_NOT_FOUND_PATTERN = /\b404\b/u;
100619
100716
  var OTHER_SCOPE_PATTERN = /\b(?:project|environment|service|workspace|team|token|user|account|volume|deployment|command|file|directory|module|package)s?\b/iu;
100620
100717
  var SIDECAR_SUFFIX = ".railway.json";
100621
100718
  var MINIMUM_SECRET_LENGTH = 8;
100622
- var defaultRailwayExec = (file2, args) => new Promise((resolve2, reject) => {
100719
+ var defaultRailwayExec = (file2, args) => new Promise((resolve3, reject) => {
100623
100720
  const child = spawn2(file2, [...args], {
100624
100721
  stdio: ["ignore", "pipe", "pipe"],
100625
100722
  env: process.env,
@@ -100634,7 +100731,7 @@ var defaultRailwayExec = (file2, args) => new Promise((resolve2, reject) => {
100634
100731
  stderr2 += chunk;
100635
100732
  });
100636
100733
  child.once("error", reject);
100637
- child.once("close", (code) => resolve2({ code, stdout, stderr: stderr2 }));
100734
+ child.once("close", (code) => resolve3({ code, stdout, stderr: stderr2 }));
100638
100735
  });
100639
100736
  function parseSandboxId(stdout) {
100640
100737
  const trimmed = stdout.trim();
@@ -100767,8 +100864,8 @@ function createRailwayRuntime(options) {
100767
100864
  const readyAttempts = options.readyAttempts ?? DEFAULT_RAILWAY_READY_ATTEMPTS;
100768
100865
  const readyIntervalMs = options.readyIntervalMs ?? DEFAULT_RAILWAY_READY_INTERVAL_MS;
100769
100866
  const signalDestroyTimeoutMs = options.signalDestroyTimeoutMs ?? DEFAULT_RAILWAY_SIGNAL_DESTROY_TIMEOUT_MS;
100770
- const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve2) => {
100771
- setTimeout(resolve2, milliseconds);
100867
+ const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve3) => {
100868
+ setTimeout(resolve3, milliseconds);
100772
100869
  }));
100773
100870
  let secrets = options.secrets;
100774
100871
  const getSecrets = () => secrets ??= secretStore();
@@ -102621,7 +102718,7 @@ function usd(value, minimumDecimals = 0) {
102621
102718
  import { mkdir as mkdir20, readFile as readFile27, writeFile as writeFile11 } from "node:fs/promises";
102622
102719
  import { homedir as systemHomedir } from "node:os";
102623
102720
  import { dirname as dirname14, posix, win32 as win322 } from "node:path";
102624
- var MCP_INSTALL_USAGE = "Usage: vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]";
102721
+ var MCP_INSTALL_USAGE = "Usage: vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]";
102625
102722
  var APPS = /* @__PURE__ */ new Set(["claude", "cursor", "codex"]);
102626
102723
  var NEXT_STEP = {
102627
102724
  claude: 'Restart Claude Desktop, then ask it: "Search vAPI for a weather API."',
@@ -102662,6 +102759,7 @@ function mcpInstallTarget(app, context) {
102662
102759
  async function mcpInstallCommand(argv, json2, io, dependencies) {
102663
102760
  const parsed = parseArguments(argv, {
102664
102761
  valueOptions: /* @__PURE__ */ new Set(["--home", "--registry"]),
102762
+ booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
102665
102763
  maximumPositionals: 1
102666
102764
  });
102667
102765
  const appValue = parsed.positionals[0];
@@ -102683,13 +102781,39 @@ ${MCP_INSTALL_USAGE}`
102683
102781
  });
102684
102782
  const entry = serverEntry(home, registry2);
102685
102783
  const created = await writeMcpConfig(target, entry);
102784
+ const name = await unlinkedDefaultAccount(home, dependencies);
102785
+ const offerLink = (name2) => offerDashboardLink({
102786
+ name: name2,
102787
+ json: json2,
102788
+ noLink: parsed.has("--no-link"),
102789
+ io,
102790
+ dependencies,
102791
+ home,
102792
+ apiBase: parsed.one("--registry")
102793
+ });
102794
+ const link3 = json2 && name !== void 0 ? await offerLink(name) : {};
102686
102795
  output3(
102687
102796
  io,
102688
102797
  json2,
102689
- { command: "mcp install", app: appValue, path: target.path, created, home, registry: registry2 },
102798
+ { ...link3, command: "mcp install", app: appValue, path: target.path, created, home, registry: registry2 },
102690
102799
  `${created ? "Wrote" : "Updated"} ${target.path}.`
102691
102800
  );
102692
- if (!json2) io.stdout(NEXT_STEP[appValue]);
102801
+ if (!json2) {
102802
+ io.stdout(NEXT_STEP[appValue]);
102803
+ if (name !== void 0) await offerLink(name);
102804
+ }
102805
+ }
102806
+ async function unlinkedDefaultAccount(home, dependencies) {
102807
+ try {
102808
+ const store = await WalletStore.open(home, {
102809
+ secrets: getSecretStore(dependencies),
102810
+ env: getEnvironment(dependencies)
102811
+ });
102812
+ const name = store.defaultName;
102813
+ if (name !== void 0 && store.resolve({ name }).entry.link === void 0) return name;
102814
+ } catch {
102815
+ }
102816
+ return void 0;
102693
102817
  }
102694
102818
  function isMcpInstallApp(value) {
102695
102819
  return APPS.has(value);
@@ -103359,7 +103483,7 @@ async function taskContext(parsed, io, dependencies, publicOnly = false) {
103359
103483
  pending,
103360
103484
  randomUUID: dependencies.tasks?.randomUUID ?? randomUUID6,
103361
103485
  signInHint: "Run vapi login for the acting wallet.",
103362
- sleep: dependencies.tasks?.sleep ?? ((milliseconds) => new Promise((resolve2) => setTimeout(resolve2, milliseconds)))
103486
+ sleep: dependencies.tasks?.sleep ?? ((milliseconds) => new Promise((resolve3) => setTimeout(resolve3, milliseconds)))
103363
103487
  };
103364
103488
  }
103365
103489
  async function taskRequest2(verb, route, operation) {
@@ -105159,11 +105283,11 @@ ${usage}`);
105159
105283
  }
105160
105284
  }
105161
105285
  async function referencedSleep(milliseconds, signal) {
105162
- await new Promise((resolve2) => {
105286
+ await new Promise((resolve3) => {
105163
105287
  const finish = () => {
105164
105288
  clearTimeout(timer);
105165
105289
  signal?.removeEventListener("abort", finish);
105166
- resolve2();
105290
+ resolve3();
105167
105291
  };
105168
105292
  const timer = setTimeout(finish, milliseconds);
105169
105293
  if (signal === void 0) return;
@@ -105391,7 +105515,7 @@ var HELP_HEADING = "vAPI Network";
105391
105515
  var HELP = `${HELP_HEADING}
105392
105516
 
105393
105517
  Usage:
105394
- vapi init [--networks <base,arc>] [--json]
105518
+ vapi init [--networks <base,arc>] [--no-link] [--json]
105395
105519
  vapi setup [--no-cloud-backup] [--accounts <n>] [--json]
105396
105520
  vapi accounts [--all] [--json]
105397
105521
  vapi accounts add <name> [--label <text>] [--no-link] [--json]
@@ -105438,6 +105562,7 @@ Usage:
105438
105562
  vapi agent pause <name> [--json]
105439
105563
  vapi agent resume <name> [--json]
105440
105564
  vapi agent revoke <name> [--json]
105565
+ vapi dashboard [--account <name>] [--no-browser] [--json]
105441
105566
  vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]
105442
105567
  vapi logout [--account <name>] [--json]
105443
105568
  vapi whoami [--account <name>] [--json]
@@ -105488,11 +105613,13 @@ Usage:
105488
105613
  vapi publish list [--json]
105489
105614
  vapi claim <origin> [--account <name>] [--json]
105490
105615
  vapi mcp [--account <name>] [--json]
105491
- vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]
105616
+ vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]
105492
105617
  vapi serve [--json]
105493
105618
  vapi version [--json]
105494
105619
  vapi help [--json]
105495
105620
 
105621
+ \`vapi init\`, \`vapi wallet create\` and \`vapi mcp install\` offer to link the wallet to your vAPI dashboard. Use \`--no-link\` to skip the prompt.
105622
+
105496
105623
  Every command that touches a wallet takes \`--account <name>\`, falls back to \`VAPI_WALLET\`, then to the default account set by \`vapi accounts use\`, and names the wallet it used on its first line.
105497
105624
 
105498
105625
  \`vapi search\` answers with vAPI-verified listings plus the mirrored external catalogs. \`--include-unverified\` also returns self-listed APIs that passed vAPI's automated x402 probe but were never reviewed; every result is tagged \`[verified]\`, \`[requested]\`, \`[unverified]\` or \`[external]\`.
@@ -105557,8 +105684,8 @@ var ACCOUNT_OPTION2 = "--account";
105557
105684
  var WALLET_OPTION_DEPRECATION = "--wallet is now --account; --wallet keeps working for one release.";
105558
105685
  var SOLANA_VAULT_UNAVAILABLE2 = "Solana keys are not part of the device vault yet.";
105559
105686
  var INCLUDE_UNVERIFIED_OPTION = "--include-unverified";
105560
- async function openWalletStore(dependencies) {
105561
- return await WalletStore.open(getVapiPaths().directory, {
105687
+ async function openWalletStore(dependencies, home = getVapiPaths().directory) {
105688
+ return await WalletStore.open(home, {
105562
105689
  secrets: getSecretStore(dependencies),
105563
105690
  env: getEnvironment(dependencies),
105564
105691
  ...dependencies.now === void 0 ? {} : { now: dependencies.now }
@@ -105573,8 +105700,8 @@ async function selectWallet(store, parsed, dependencies) {
105573
105700
  const address4 = await store.readAddress(resolved.name);
105574
105701
  return { store, ...resolved, ...address4 === void 0 ? {} : { address: address4 } };
105575
105702
  }
105576
- async function targetWallet(parsed, dependencies) {
105577
- return await selectWallet(await openWalletStore(dependencies), parsed, dependencies);
105703
+ async function targetWallet(parsed, dependencies, home = getVapiPaths().directory) {
105704
+ return await selectWallet(await openWalletStore(dependencies, home), parsed, dependencies);
105578
105705
  }
105579
105706
  function getSecretStore(dependencies) {
105580
105707
  return dependencies.secretStore ?? secretStore();
@@ -105753,6 +105880,10 @@ async function runCli(argv = process.argv.slice(2), io = processIo, dependencies
105753
105880
  case "agent":
105754
105881
  exitCode = await agentCommand(args.slice(1), json2, runIo, dependencies);
105755
105882
  break;
105883
+ case "dashboard":
105884
+ await dashboardCommand(args.slice(1), json2, io, dependencies);
105885
+ exitCode = 0;
105886
+ break;
105756
105887
  case "login":
105757
105888
  await loginCommand(args.slice(1), json2, io, dependencies);
105758
105889
  exitCode = 0;
@@ -105967,6 +106098,7 @@ function shouldAutoUploadAfterFailure(args) {
105967
106098
  async function initCommand(argv, json2, io, dependencies) {
105968
106099
  const parsed = parseArguments(argv, {
105969
106100
  valueOptions: /* @__PURE__ */ new Set(["--networks"]),
106101
+ booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
105970
106102
  maximumPositionals: 0
105971
106103
  });
105972
106104
  const networks = parseInitNetworks(parsed.one("--networks") ?? "base");
@@ -106014,7 +106146,14 @@ async function initCommand(argv, json2, io, dependencies) {
106014
106146
  nextSteps: buildNextSteps(account.address)
106015
106147
  };
106016
106148
  if (json2) {
106017
- io.stdout(JSON.stringify(result));
106149
+ const link3 = await offerDashboardLink({
106150
+ name: created.name,
106151
+ json: json2,
106152
+ noLink: parsed.has("--no-link"),
106153
+ io,
106154
+ dependencies
106155
+ });
106156
+ io.stdout(JSON.stringify({ ...result, ...link3 }));
106018
106157
  return;
106019
106158
  }
106020
106159
  if (configRewrites.length > 0) io.stdout(formatLegacyRegistryRewrites(configRewrites));
@@ -106035,6 +106174,13 @@ async function initCommand(argv, json2, io, dependencies) {
106035
106174
  io.stdout(formatAccounts(accounts));
106036
106175
  io.stdout("");
106037
106176
  io.stdout(result.nextSteps.join("\n"));
106177
+ await offerDashboardLink({
106178
+ name: created.name,
106179
+ json: json2,
106180
+ noLink: parsed.has("--no-link"),
106181
+ io,
106182
+ dependencies
106183
+ });
106038
106184
  }
106039
106185
  var INIT_ALREADY_DONE = "This machine already has a wallet, so vapi init created nothing.";
106040
106186
  async function reportExistingWallets(store, json2, io, dependencies) {
@@ -106070,12 +106216,11 @@ async function walletCommand(argv, json2, io, dependencies) {
106070
106216
  `Unknown wallet subcommand ${JSON.stringify(subcommand)}. ${WALLET_USAGE}`
106071
106217
  );
106072
106218
  }
106073
- await accountsCommand(
106074
- [mapped2, ...rest, ...subcommand === "create" ? ["--no-link"] : []],
106075
- json2,
106076
- io,
106077
- dependencies
106078
- );
106219
+ if (subcommand === "create") {
106220
+ await accountsAddCommand(rest, json2, io, dependencies, { link: "offer" });
106221
+ return;
106222
+ }
106223
+ await accountsCommand([mapped2, ...rest], json2, io, dependencies);
106079
106224
  }
106080
106225
  async function unlockedWallets(walletsStore, wallets, dependencies) {
106081
106226
  const secrets = getSecretStore(dependencies);
@@ -106617,8 +106762,8 @@ async function fetchNetworkStats(dependencies) {
106617
106762
  })();
106618
106763
  let timeout;
106619
106764
  try {
106620
- const timedOut = new Promise((resolve2) => {
106621
- timeout = setTimeout(() => resolve2(null), NETWORK_STATS_REQUEST_TIMEOUT_MS);
106765
+ const timedOut = new Promise((resolve3) => {
106766
+ timeout = setTimeout(() => resolve3(null), NETWORK_STATS_REQUEST_TIMEOUT_MS);
106622
106767
  });
106623
106768
  return await Promise.race([request, timedOut]);
106624
106769
  } finally {
@@ -108297,10 +108442,10 @@ async function checkForUpdate(options = {}) {
108297
108442
  try {
108298
108443
  return await Promise.race([
108299
108444
  latestNotice(options, env, controller.signal),
108300
- new Promise((resolve2) => {
108445
+ new Promise((resolve3) => {
108301
108446
  timer = setTimeout(() => {
108302
108447
  controller.abort();
108303
- resolve2(void 0);
108448
+ resolve3(void 0);
108304
108449
  }, CHECK_TIMEOUT_MS);
108305
108450
  })
108306
108451
  ]);