@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/index.js CHANGED
@@ -9441,13 +9441,13 @@ var init_getCallError = __esm({
9441
9441
 
9442
9442
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withResolvers.js
9443
9443
  function withResolvers() {
9444
- let resolve2 = () => void 0;
9444
+ let resolve3 = () => void 0;
9445
9445
  let reject = () => void 0;
9446
9446
  const promise2 = new Promise((resolve_, reject_) => {
9447
- resolve2 = resolve_;
9447
+ resolve3 = resolve_;
9448
9448
  reject = reject_;
9449
9449
  });
9450
- return { promise: promise2, resolve: resolve2, reject };
9450
+ return { promise: promise2, resolve: resolve3, reject };
9451
9451
  }
9452
9452
  var init_withResolvers = __esm({
9453
9453
  "../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withResolvers.js"() {
@@ -9466,8 +9466,8 @@ function createBatchScheduler({ fn, id: id2, shouldSplitBatch, wait: wait2 = 0,
9466
9466
  if (sort && Array.isArray(data))
9467
9467
  data.sort(sort);
9468
9468
  for (let i = 0; i < scheduler.length; i++) {
9469
- const { resolve: resolve2 } = scheduler[i];
9470
- resolve2?.([data[i], data]);
9469
+ const { resolve: resolve3 } = scheduler[i];
9470
+ resolve3?.([data[i], data]);
9471
9471
  }
9472
9472
  }).catch((err) => {
9473
9473
  for (let i = 0; i < scheduler.length; i++) {
@@ -9483,16 +9483,16 @@ function createBatchScheduler({ fn, id: id2, shouldSplitBatch, wait: wait2 = 0,
9483
9483
  return {
9484
9484
  flush,
9485
9485
  async schedule(args) {
9486
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
9486
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
9487
9487
  const split2 = shouldSplitBatch?.([...getBatchedArgs(), args]);
9488
9488
  if (split2)
9489
9489
  exec();
9490
9490
  const hasActiveScheduler = getScheduler().length > 0;
9491
9491
  if (hasActiveScheduler) {
9492
- setScheduler({ args, resolve: resolve2, reject });
9492
+ setScheduler({ args, resolve: resolve3, reject });
9493
9493
  return promise2;
9494
9494
  }
9495
- setScheduler({ args, resolve: resolve2, reject });
9495
+ setScheduler({ args, resolve: resolve3, reject });
9496
9496
  setTimeout(exec, wait2);
9497
9497
  return promise2;
9498
9498
  }
@@ -30774,7 +30774,7 @@ function observe(observerId, callbacks, fn) {
30774
30774
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/wait.js
30775
30775
  init_utils3();
30776
30776
  async function wait(time3, { signal } = {}) {
30777
- return new Promise((resolve2, reject) => {
30777
+ return new Promise((resolve3, reject) => {
30778
30778
  if (signal?.aborted) {
30779
30779
  reject(getAbortError(signal));
30780
30780
  return;
@@ -30782,7 +30782,7 @@ async function wait(time3, { signal } = {}) {
30782
30782
  const cleanup = () => signal?.removeEventListener("abort", onAbort);
30783
30783
  const timeout = setTimeout(() => {
30784
30784
  cleanup();
30785
- resolve2();
30785
+ resolve3();
30786
30786
  }, time3);
30787
30787
  const onAbort = () => {
30788
30788
  clearTimeout(timeout);
@@ -31358,7 +31358,7 @@ init_withResolvers();
31358
31358
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withRetry.js
31359
31359
  init_utils3();
31360
31360
  function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shouldRetry2 = () => true, signal } = {}) {
31361
- return new Promise((resolve2, reject) => {
31361
+ return new Promise((resolve3, reject) => {
31362
31362
  const attemptRetry = async ({ count = 0 } = {}) => {
31363
31363
  if (signal?.aborted) {
31364
31364
  reject(getAbortError(signal));
@@ -31378,7 +31378,7 @@ function withRetry(fn, { delay: delay_ = 100, retryCount = 2, shouldRetry: shoul
31378
31378
  };
31379
31379
  try {
31380
31380
  const data = await fn();
31381
- resolve2(data);
31381
+ resolve3(data);
31382
31382
  } catch (err) {
31383
31383
  if (signal?.aborted) {
31384
31384
  reject(getAbortError(signal));
@@ -31529,7 +31529,7 @@ async function sendCalls(client, parameters) {
31529
31529
  results.push({ reason, status: "rejected" });
31530
31530
  }
31531
31531
  if (experimental_fallbackDelay > 0)
31532
- await new Promise((resolve2) => setTimeout(resolve2, experimental_fallbackDelay));
31532
+ await new Promise((resolve3) => setTimeout(resolve3, experimental_fallbackDelay));
31533
31533
  }
31534
31534
  if (results.every((r) => r.status === "rejected"))
31535
31535
  throw results[0].reason;
@@ -31632,9 +31632,9 @@ async function waitForCallsStatus(client, parameters) {
31632
31632
  throwOnFailure = false
31633
31633
  } = parameters;
31634
31634
  const observerId = stringify(["waitForCallsStatus", client.uid, id2]);
31635
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
31635
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
31636
31636
  let timer;
31637
- const unobserve = observe(observerId, { resolve: resolve2, reject }, (emit) => {
31637
+ const unobserve = observe(observerId, { resolve: resolve3, reject }, (emit) => {
31638
31638
  const unpoll = poll(async () => {
31639
31639
  const done = (fn) => {
31640
31640
  clearTimeout(timer);
@@ -32016,13 +32016,13 @@ async function isImageUri(uri) {
32016
32016
  }
32017
32017
  if (!Object.hasOwn(globalThis, "Image"))
32018
32018
  return false;
32019
- return new Promise((resolve2) => {
32019
+ return new Promise((resolve3) => {
32020
32020
  const img = new Image();
32021
32021
  img.onload = () => {
32022
- resolve2(true);
32022
+ resolve3(true);
32023
32023
  };
32024
32024
  img.onerror = () => {
32025
- resolve2(false);
32025
+ resolve3(false);
32026
32026
  };
32027
32027
  img.src = uri;
32028
32028
  });
@@ -33485,7 +33485,7 @@ init_utils3();
33485
33485
  // ../../node_modules/.pnpm/viem@2.56.1_typescript@6.0.3_zod@4.5.4/node_modules/viem/_esm/utils/promise/withTimeout.js
33486
33486
  init_utils3();
33487
33487
  function withTimeout(fn, { errorInstance = new Error("timed out"), timeout, signal }) {
33488
- return new Promise((resolve2, reject) => {
33488
+ return new Promise((resolve3, reject) => {
33489
33489
  ;
33490
33490
  (async () => {
33491
33491
  let timeoutId;
@@ -33500,7 +33500,7 @@ function withTimeout(fn, { errorInstance = new Error("timed out"), timeout, sign
33500
33500
  }
33501
33501
  }, timeout);
33502
33502
  }
33503
- resolve2(await fn({ signal: controller?.signal || null }));
33503
+ resolve3(await fn({ signal: controller?.signal || null }));
33504
33504
  } catch (err) {
33505
33505
  if (controller?.signal.aborted && isAbortError(err)) {
33506
33506
  reject(errorInstance);
@@ -37480,13 +37480,13 @@ async function waitForTransactionReceipt(client, parameters) {
37480
37480
  let retrying = false;
37481
37481
  let _unobserve;
37482
37482
  let _unwatch;
37483
- const { promise: promise2, resolve: resolve2, reject } = withResolvers();
37483
+ const { promise: promise2, resolve: resolve3, reject } = withResolvers();
37484
37484
  const timer = timeout ? setTimeout(() => {
37485
37485
  _unwatch?.();
37486
37486
  _unobserve?.();
37487
37487
  reject(new WaitForTransactionReceiptTimeoutError({ hash: hash5 }));
37488
37488
  }, timeout) : void 0;
37489
- _unobserve = observe(observerId, { onReplaced, resolve: resolve2, reject }, async (emit) => {
37489
+ _unobserve = observe(observerId, { onReplaced, resolve: resolve3, reject }, async (emit) => {
37490
37490
  receipt = await getAction(client, getTransactionReceipt, "getTransactionReceipt")({ hash: hash5 }).catch(() => void 0);
37491
37491
  if (receipt && confirmations <= 1) {
37492
37492
  clearTimeout(timer);
@@ -43445,7 +43445,7 @@ function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) {
43445
43445
  coalescedRequest.numConsumers++;
43446
43446
  if (signal) {
43447
43447
  const responsePromise = coalescedRequest.responsePromise;
43448
- return await new Promise((resolve2, reject) => {
43448
+ return await new Promise((resolve3, reject) => {
43449
43449
  const handleAbort = (e22) => {
43450
43450
  signal.removeEventListener("abort", handleAbort);
43451
43451
  coalescedRequest.numConsumers -= 1;
@@ -43458,7 +43458,7 @@ function getRpcTransportWithRequestCoalescing(transport, getDeduplicationKey) {
43458
43458
  reject(e22.target.reason);
43459
43459
  };
43460
43460
  signal.addEventListener("abort", handleAbort);
43461
- responsePromise.then(resolve2).catch(reject).finally(() => {
43461
+ responsePromise.then(resolve3).catch(reject).finally(() => {
43462
43462
  signal.removeEventListener("abort", handleAbort);
43463
43463
  });
43464
43464
  });
@@ -44841,7 +44841,7 @@ function createPublicFetch(options) {
44841
44841
  });
44842
44842
  const normalized = new Request(input2, init);
44843
44843
  const bytes = normalized.body ? Buffer.from(await normalized.arrayBuffer()) : null;
44844
- return await new Promise((resolve2, reject) => {
44844
+ return await new Promise((resolve3, reject) => {
44845
44845
  const requestOptions2 = {
44846
44846
  method: normalized.method,
44847
44847
  headers: Object.fromEntries(normalized.headers),
@@ -44866,7 +44866,7 @@ function createPublicFetch(options) {
44866
44866
  { status, statusText: incoming.statusMessage, headers }
44867
44867
  );
44868
44868
  Object.defineProperty(response, "url", { value: url2.toString() });
44869
- resolve2(response);
44869
+ resolve3(response);
44870
44870
  } catch (error61) {
44871
44871
  incoming.destroy();
44872
44872
  reject(error61);
@@ -45635,8 +45635,8 @@ var svmFetchQueue = Promise.resolve();
45635
45635
  async function withGuardedSvmFetch(fetchImpl, operation) {
45636
45636
  const previous = svmFetchQueue;
45637
45637
  let release2;
45638
- svmFetchQueue = new Promise((resolve2) => {
45639
- release2 = resolve2;
45638
+ svmFetchQueue = new Promise((resolve3) => {
45639
+ release2 = resolve3;
45640
45640
  });
45641
45641
  await previous;
45642
45642
  const originalFetch = globalThis.fetch;
@@ -46849,7 +46849,7 @@ async function withFileLock(lockPath, fn, options = {}) {
46849
46849
  if (Date.now() >= deadline) {
46850
46850
  throw new FileLockedError(options.lockedMessage);
46851
46851
  }
46852
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46852
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46853
46853
  continue;
46854
46854
  }
46855
46855
  handle = candidate;
@@ -46864,7 +46864,7 @@ async function withFileLock(lockPath, fn, options = {}) {
46864
46864
  if (Date.now() >= deadline) {
46865
46865
  throw new FileLockedError(options.lockedMessage);
46866
46866
  }
46867
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46867
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46868
46868
  }
46869
46869
  }
46870
46870
  const ownedHandle = handle;
@@ -46985,7 +46985,7 @@ async function restoreRenamedLock(path, tombPath) {
46985
46985
  } catch (error61) {
46986
46986
  if (hasCode(error61, "ENOENT")) return;
46987
46987
  if (!hasCode(error61, "EEXIST")) throw error61;
46988
- await new Promise((resolve2) => setTimeout(resolve2, LOCK_RETRY_MS));
46988
+ await new Promise((resolve3) => setTimeout(resolve3, LOCK_RETRY_MS));
46989
46989
  }
46990
46990
  }
46991
46991
  }
@@ -47984,7 +47984,7 @@ async function withAgentCredentialLock(wallets, clientId, operation) {
47984
47984
  if (Date.now() >= deadline) {
47985
47985
  throw httpError("Timed out waiting to update the agent credentials.");
47986
47986
  }
47987
- await new Promise((resolve2) => setTimeout(resolve2, 20));
47987
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
47988
47988
  }
47989
47989
  }
47990
47990
  try {
@@ -48137,7 +48137,7 @@ function splitScopes(scope) {
48137
48137
  return scope.split(/\s+/u).filter(Boolean);
48138
48138
  }
48139
48139
  async function sleepFor(milliseconds) {
48140
- await new Promise((resolve2) => setTimeout(resolve2, milliseconds));
48140
+ await new Promise((resolve3) => setTimeout(resolve3, milliseconds));
48141
48141
  }
48142
48142
 
48143
48143
  // ../core/src/keystore.ts
@@ -69615,7 +69615,7 @@ function decryptWithKey(key2, sealed) {
69615
69615
  return Buffer.concat([decipher.update(sealed.ciphertext), decipher.final()]);
69616
69616
  }
69617
69617
  async function deriveScryptKey(passphrase, salt) {
69618
- return await new Promise((resolve2, reject) => {
69618
+ return await new Promise((resolve3, reject) => {
69619
69619
  scrypt(
69620
69620
  passphrase,
69621
69621
  salt,
@@ -69631,7 +69631,7 @@ async function deriveScryptKey(passphrase, salt) {
69631
69631
  reject(error61);
69632
69632
  return;
69633
69633
  }
69634
- resolve2(derivedKey);
69634
+ resolve3(derivedKey);
69635
69635
  }
69636
69636
  );
69637
69637
  });
@@ -69955,7 +69955,7 @@ async function promptForSecret(prompt, noTerminalHint) {
69955
69955
  stdin.setRawMode(true);
69956
69956
  stdin.resume();
69957
69957
  stdin.setEncoding("utf8");
69958
- return await new Promise((resolve2, reject) => {
69958
+ return await new Promise((resolve3, reject) => {
69959
69959
  let value = "";
69960
69960
  const cleanup = () => {
69961
69961
  stdin.off("data", onData);
@@ -69972,7 +69972,7 @@ async function promptForSecret(prompt, noTerminalHint) {
69972
69972
  }
69973
69973
  if (character === "\r" || character === "\n") {
69974
69974
  cleanup();
69975
- resolve2(value);
69975
+ resolve3(value);
69976
69976
  return;
69977
69977
  }
69978
69978
  if (character === "\x7F" || character === "\b") {
@@ -70034,7 +70034,7 @@ async function withAccountMovementLock(home, account, timeoutMs, operation, sign
70034
70034
  if (!(error61 instanceof Error && "code" in error61 && error61.code === "EEXIST")) throw error61;
70035
70035
  await removeStaleLock2(path);
70036
70036
  if (Date.now() >= deadline) throw new AccountMovementLockedError(account);
70037
- await new Promise((resolve2) => setTimeout(resolve2, 20));
70037
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
70038
70038
  }
70039
70039
  }
70040
70040
  const ownedHandle = handle;
@@ -70505,14 +70505,14 @@ function requireSuccess(result, what) {
70505
70505
  function withoutTrailingNewline(value) {
70506
70506
  return value.replace(/\r?\n$/u, "");
70507
70507
  }
70508
- var spawnRunner = async (file2, args, input2) => await new Promise((resolve2) => {
70508
+ var spawnRunner = async (file2, args, input2) => await new Promise((resolve3) => {
70509
70509
  let stdout = "";
70510
70510
  let stderr2 = "";
70511
70511
  let settled = false;
70512
70512
  const finish = (outcome) => {
70513
70513
  if (settled) return;
70514
70514
  settled = true;
70515
- resolve2(outcome);
70515
+ resolve3(outcome);
70516
70516
  };
70517
70517
  const child = spawn(file2, [...args], {
70518
70518
  detached: true,
@@ -71475,7 +71475,7 @@ async function withVaultLock(path, operation) {
71475
71475
  if (Date.now() >= deadline) {
71476
71476
  throw new VaultError("corrupt", "Timed out waiting for the vault lock.");
71477
71477
  }
71478
- await new Promise((resolve2) => setTimeout(resolve2, 20));
71478
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
71479
71479
  }
71480
71480
  }
71481
71481
  try {
@@ -73208,7 +73208,7 @@ async function withRegistryLock(path, operation) {
73208
73208
  if (Date.now() >= deadline) {
73209
73209
  throw new KeystoreError("Timed out waiting for the wallet registry lock.");
73210
73210
  }
73211
- await new Promise((resolve2) => setTimeout(resolve2, 20));
73211
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
73212
73212
  }
73213
73213
  }
73214
73214
  try {
@@ -73554,11 +73554,11 @@ function publicErrorMessage(error61, fallback, sensitiveValues = []) {
73554
73554
  return error61 instanceof Error ? message : fallback;
73555
73555
  }
73556
73556
  async function unrefSleep(milliseconds, signal) {
73557
- await new Promise((resolve2) => {
73557
+ await new Promise((resolve3) => {
73558
73558
  const finish = () => {
73559
73559
  clearTimeout(timer);
73560
73560
  signal?.removeEventListener("abort", finish);
73561
- resolve2();
73561
+ resolve3();
73562
73562
  };
73563
73563
  const timer = setTimeout(finish, milliseconds);
73564
73564
  timer.unref();
@@ -74095,7 +74095,7 @@ async function withLedgerLock(path, operation) {
74095
74095
  if (Date.now() >= deadline) {
74096
74096
  throw new Error("Timed out waiting for the spend ledger lock.");
74097
74097
  }
74098
- await new Promise((resolve2) => setTimeout(resolve2, 20));
74098
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
74099
74099
  }
74100
74100
  }
74101
74101
  try {
@@ -74729,7 +74729,7 @@ async function withTransferLock(context, nonce, operation) {
74729
74729
  if (Date.now() >= deadline) {
74730
74730
  throw new Error("Timed out waiting for the transfer lock.");
74731
74731
  }
74732
- await new Promise((resolve2) => setTimeout(resolve2, 20));
74732
+ await new Promise((resolve3) => setTimeout(resolve3, 20));
74733
74733
  }
74734
74734
  }
74735
74735
  try {
@@ -76447,8 +76447,8 @@ async function sweepAllAboveCeiling(args) {
76447
76447
  }
76448
76448
  var pendingCeilingSweeps = /* @__PURE__ */ new Set();
76449
76449
  function scheduleCeilingSweep(hook) {
76450
- const task = new Promise((resolve2) => {
76451
- setTimeout(resolve2, 0);
76450
+ const task = new Promise((resolve3) => {
76451
+ setTimeout(resolve3, 0);
76452
76452
  }).then(async () => {
76453
76453
  const timeoutMs = hook.timeoutMs ?? CEILING_SWEEP_TIMEOUT_MS;
76454
76454
  const controller = new AbortController();
@@ -76488,8 +76488,8 @@ async function drainCeilingSweeps(timeoutMs = CEILING_SWEEP_TIMEOUT_MS) {
76488
76488
  try {
76489
76489
  await Promise.race([
76490
76490
  Promise.allSettled(pending),
76491
- new Promise((resolve2) => {
76492
- timeout = setTimeout(resolve2, timeoutMs);
76491
+ new Promise((resolve3) => {
76492
+ timeout = setTimeout(resolve3, timeoutMs);
76493
76493
  })
76494
76494
  ]);
76495
76495
  } finally {
@@ -77588,7 +77588,7 @@ function createRunBudget(args) {
77588
77588
  import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
77589
77589
  import { arch, platform, release } from "node:os";
77590
77590
  import { join as join13 } from "node:path";
77591
- var VAPI_CLIENT_VERSION = "0.9.4";
77591
+ var VAPI_CLIENT_VERSION = "0.9.5";
77592
77592
  async function createSupportReport(options) {
77593
77593
  const message = options.message.trim();
77594
77594
  if (!message) throw new Error("Support report message must not be empty.");
@@ -81294,7 +81294,7 @@ var authorizationTypes = {
81294
81294
  function createTasksChain(options) {
81295
81295
  const { account, client, pending, rpcFor } = options;
81296
81296
  const now = options.now ?? (() => /* @__PURE__ */ new Date());
81297
- const sleep = options.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
81297
+ const sleep = options.sleep ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
81298
81298
  const randomBytes17 = options.randomBytes ?? cryptoRandomBytes2;
81299
81299
  const confirmations = options.confirmations ?? 2;
81300
81300
  if (!Number.isSafeInteger(confirmations) || confirmations < 1)
@@ -82099,7 +82099,7 @@ async function waitForMilestone(client, input2) {
82099
82099
  throw new RangeError("The milestone wait timeout must be non-negative and finite.");
82100
82100
  if (!Number.isFinite(intervalMs) || intervalMs <= 0)
82101
82101
  throw new RangeError("The milestone wait interval must be positive and finite.");
82102
- const sleep = input2.sleep ?? ((ms) => new Promise((resolve2) => setTimeout(resolve2, ms)));
82102
+ const sleep = input2.sleep ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
82103
82103
  const now = input2.now ?? (() => /* @__PURE__ */ new Date());
82104
82104
  const started = now().getTime();
82105
82105
  const deadline = started + timeoutMs;
@@ -86701,10 +86701,10 @@ async function buildStatus(deps) {
86701
86701
  const timers = deps.timers ?? { setTimeout, clearTimeout };
86702
86702
  const controller = new AbortController();
86703
86703
  let timeout;
86704
- const deadline = new Promise((resolve2) => {
86704
+ const deadline = new Promise((resolve3) => {
86705
86705
  timeout = timers.setTimeout(() => {
86706
86706
  controller.abort(new Error("Status request deadline exceeded."));
86707
- resolve2();
86707
+ resolve3();
86708
86708
  }, deps.timeoutMs ?? STATUS_TIMEOUT_MS);
86709
86709
  });
86710
86710
  try {
@@ -94867,6 +94867,9 @@ function rgbToAnsi256(red, green, blue) {
94867
94867
  import { readFile as readFile24, stat as stat14 } from "node:fs/promises";
94868
94868
  import { join as join21 } from "node:path";
94869
94869
 
94870
+ // src/dashboard.ts
94871
+ import { resolve as resolve2 } from "node:path";
94872
+
94870
94873
  // src/publish-client.ts
94871
94874
  var LISTING_CATEGORIES = ["ai", "data", "crypto", "compute", "search"];
94872
94875
  var PROBE_MODES = ["origin", "endpoint", "openapi"];
@@ -95187,7 +95190,8 @@ async function runLoginFlow(argv, json2, io, dependencies, options = {}) {
95187
95190
  booleanOptions: /* @__PURE__ */ new Set(["--publish", "--no-browser"]),
95188
95191
  maximumPositionals: 0
95189
95192
  });
95190
- const target = await targetWallet(parsed, dependencies);
95193
+ const paths = getVapiPaths(options.home);
95194
+ const target = await targetWallet(parsed, dependencies, paths.directory);
95191
95195
  const { account } = await unlockTarget(target, dependencies);
95192
95196
  const label = parsed.one("--label") ?? target.name;
95193
95197
  const scopes = [
@@ -95196,13 +95200,13 @@ async function runLoginFlow(argv, json2, io, dependencies, options = {}) {
95196
95200
  "tasks:write",
95197
95201
  ...parsed.has("--publish") ? ["call.publish"] : []
95198
95202
  ];
95199
- const config2 = await loadConfig(getVapiPaths().config, process.env, { notice: io.stderr });
95200
- const apiBase = registryBaseUrl(config2);
95203
+ const config2 = await loadConfig(paths.config, process.env, { notice: io.stderr });
95204
+ const apiBase = options.apiBase ?? registryBaseUrl(config2);
95201
95205
  const fetchImpl = dependencies.fetchImpl ?? createPublicFetch({ allowPrivateNetwork: false });
95202
95206
  const secrets = getSecretStore(dependencies);
95203
95207
  const device = await ensureDeviceName({
95204
95208
  env: getEnvironment(dependencies),
95205
- configPath: getVapiPaths().config,
95209
+ configPath: paths.config,
95206
95210
  ...dependencies.hostname === void 0 ? {} : { hostname: dependencies.hostname() }
95207
95211
  });
95208
95212
  const bearer = await trustedLinkBearer({
@@ -95456,6 +95460,87 @@ function shortAddress(address4) {
95456
95460
  return address4.length <= 12 ? address4 : `${address4.slice(0, 6)}\u2026${address4.slice(-4)}`;
95457
95461
  }
95458
95462
 
95463
+ // src/dashboard.ts
95464
+ function dashboardUrl(apiBase) {
95465
+ return `${apiBase.replace(/\/+$/u, "")}/agents`;
95466
+ }
95467
+ async function offerDashboardLink({
95468
+ name,
95469
+ json: json2,
95470
+ noLink = false,
95471
+ io,
95472
+ dependencies,
95473
+ home = getVapiPaths().directory,
95474
+ apiBase
95475
+ }) {
95476
+ const otherHome = resolve2(home) !== resolve2(getVapiPaths().directory);
95477
+ const command = `${otherHome ? `VAPI_HOME=${shellQuote(home)} ` : ""}${apiBase === void 0 ? "" : `VAPI_REGISTRY_URL=${shellQuote(apiBase)} `}vapi login --account ${name}`;
95478
+ const unlinked = {
95479
+ linked: false,
95480
+ next: [{ kind: "link", account: name, command }]
95481
+ };
95482
+ const hint = () => {
95483
+ if (!json2) io.stdout(`Run \`${command}\` to see this wallet on your dashboard.`);
95484
+ return unlinked;
95485
+ };
95486
+ try {
95487
+ const store = await WalletStore.open(home, {
95488
+ secrets: getSecretStore(dependencies),
95489
+ env: getEnvironment(dependencies)
95490
+ });
95491
+ if (store.entry(name)?.link !== void 0) return { linked: true };
95492
+ if (noLink || json2 || !isInteractive(dependencies) || activeAgentMarker(getEnvironment(dependencies)) !== void 0) {
95493
+ return hint();
95494
+ }
95495
+ const answer = (await getLinePrompt(dependencies)(`Link ${name} to your vAPI dashboard? [Y/n] `)).trim();
95496
+ if (!/^(?:y|yes)?$/iu.test(answer)) return hint();
95497
+ await runLoginFlow(["--account", name, "--label", name], false, io, dependencies, {
95498
+ home,
95499
+ ...apiBase === void 0 ? {} : { apiBase }
95500
+ });
95501
+ await store.reload();
95502
+ const link3 = store.entry(name)?.link;
95503
+ if (link3 === void 0) return hint();
95504
+ io.stdout(`See it on your dashboard: ${dashboardUrl(link3.apiBase)}`);
95505
+ return { linked: true };
95506
+ } catch (error61) {
95507
+ if (!json2) {
95508
+ io.stderr(`Link not completed: ${error61 instanceof Error ? error61.message : String(error61)}`);
95509
+ }
95510
+ return hint();
95511
+ }
95512
+ }
95513
+ async function dashboardCommand(argv, json2, io, dependencies) {
95514
+ const parsed = parseArguments(argv, {
95515
+ valueOptions: /* @__PURE__ */ new Set(["--wallet"]),
95516
+ booleanOptions: /* @__PURE__ */ new Set(["--no-browser", "--no-link"]),
95517
+ maximumPositionals: 0
95518
+ });
95519
+ const target = await targetWallet(parsed, dependencies);
95520
+ let status = { linked: true };
95521
+ if (target.entry.link === void 0) {
95522
+ if (!json2) io.stdout(`${target.name} is not linked to your vAPI dashboard yet.`);
95523
+ status = await offerDashboardLink({
95524
+ name: target.name,
95525
+ json: json2,
95526
+ noLink: parsed.has("--no-link"),
95527
+ io,
95528
+ dependencies: parsed.has("--no-browser") ? { ...dependencies, openUrl: () => false } : dependencies
95529
+ });
95530
+ }
95531
+ await target.store.reload();
95532
+ const apiBase = target.store.entry(target.name)?.link?.apiBase ?? registryBaseUrl(await readConfig(getVapiPaths().config, io));
95533
+ const url2 = dashboardUrl(apiBase);
95534
+ let opened = false;
95535
+ if (status.linked && !parsed.has("--no-browser") && (dependencies.interactive ?? Boolean(process.stdout.isTTY)) && activeAgentMarker(getEnvironment(dependencies)) === void 0) {
95536
+ opened = (dependencies.openUrl ?? openInBrowser)(url2);
95537
+ }
95538
+ io.stdout(json2 ? JSON.stringify({ account: target.name, url: url2, ...status, opened }) : url2);
95539
+ }
95540
+ function shellQuote(value) {
95541
+ return /^[a-zA-Z0-9_./-]+$/u.test(value) ? value : `'${value.replace(/'/gu, "'\\''")}'`;
95542
+ }
95543
+
95459
95544
  // src/status.ts
95460
95545
  import { stat as stat13 } from "node:fs/promises";
95461
95546
  import { homedir as homedir2 } from "node:os";
@@ -97841,10 +97926,10 @@ function apiEndpoint2(apiBase, path) {
97841
97926
  }
97842
97927
  async function sleepFor2(milliseconds, signal) {
97843
97928
  if (signal?.aborted === true) throw signal.reason;
97844
- await new Promise((resolve2, reject) => {
97929
+ await new Promise((resolve3, reject) => {
97845
97930
  const finish = () => {
97846
97931
  signal?.removeEventListener("abort", abort);
97847
- resolve2();
97932
+ resolve3();
97848
97933
  };
97849
97934
  const timeout = setTimeout(finish, milliseconds);
97850
97935
  const abort = () => {
@@ -98179,7 +98264,7 @@ async function readProcessStdin() {
98179
98264
  }
98180
98265
 
98181
98266
  // src/version.ts
98182
- var CLI_VERSION = "0.9.4";
98267
+ var CLI_VERSION = "0.9.5";
98183
98268
 
98184
98269
  // src/status.ts
98185
98270
  async function statusCommand(argv, json2, io, dependencies) {
@@ -98323,10 +98408,10 @@ async function runStatusSweep(args) {
98323
98408
  timeoutMs,
98324
98409
  ...args.warn === void 0 ? {} : { warn: args.warn }
98325
98410
  }),
98326
- new Promise((resolve2) => {
98411
+ new Promise((resolve3) => {
98327
98412
  timeout = setTimeout(() => {
98328
98413
  controller.abort();
98329
- resolve2();
98414
+ resolve3();
98330
98415
  }, timeoutMs);
98331
98416
  timeout.unref();
98332
98417
  })
@@ -98555,7 +98640,7 @@ async function siblingsFetchImpl(dependencies) {
98555
98640
  function shortAddress3(address4) {
98556
98641
  return address4.length <= 12 ? address4 : `${address4.slice(0, 6)}\u2026${address4.slice(-4)}`;
98557
98642
  }
98558
- async function accountsAddCommand(argv, json2, io, dependencies) {
98643
+ async function accountsAddCommand(argv, json2, io, dependencies, options = { link: "always" }) {
98559
98644
  const parsed = parseArguments(argv, {
98560
98645
  valueOptions: /* @__PURE__ */ new Set(["--label"]),
98561
98646
  booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
@@ -98572,6 +98657,18 @@ async function accountsAddCommand(argv, json2, io, dependencies) {
98572
98657
  });
98573
98658
  await recordAudit(dependencies, "wallet.create", { wallet: created.account });
98574
98659
  const address4 = created.address;
98660
+ if (options.link === "offer") {
98661
+ if (!json2) io.stdout(`Account ${created.account} derived: ${address4}`);
98662
+ const link3 = await offerDashboardLink({
98663
+ name: created.account,
98664
+ json: json2,
98665
+ noLink: parsed.has("--no-link"),
98666
+ io,
98667
+ dependencies
98668
+ });
98669
+ if (json2) io.stdout(JSON.stringify({ account: created.account, address: address4, ...link3 }));
98670
+ return;
98671
+ }
98575
98672
  if (parsed.has("--no-link")) {
98576
98673
  output2(
98577
98674
  io,
@@ -99387,10 +99484,10 @@ async function autoUploadBackup(io, json2, dependencies) {
99387
99484
  const timeoutMs = dependencies.cloudBackup?.uploadTimeoutMs ?? DEFAULT_UPLOAD_TIMEOUT_MS;
99388
99485
  const controller = new AbortController();
99389
99486
  let timer;
99390
- const timeout = new Promise((resolve2) => {
99487
+ const timeout = new Promise((resolve3) => {
99391
99488
  timer = setTimeout(() => {
99392
99489
  controller.abort();
99393
- resolve2({ status: "skipped", reason: "timeout" });
99490
+ resolve3({ status: "skipped", reason: "timeout" });
99394
99491
  }, timeoutMs);
99395
99492
  timer.unref();
99396
99493
  });
@@ -100614,7 +100711,7 @@ var HTTP_NOT_FOUND_PATTERN = /\b404\b/u;
100614
100711
  var OTHER_SCOPE_PATTERN = /\b(?:project|environment|service|workspace|team|token|user|account|volume|deployment|command|file|directory|module|package)s?\b/iu;
100615
100712
  var SIDECAR_SUFFIX = ".railway.json";
100616
100713
  var MINIMUM_SECRET_LENGTH = 8;
100617
- var defaultRailwayExec = (file2, args) => new Promise((resolve2, reject) => {
100714
+ var defaultRailwayExec = (file2, args) => new Promise((resolve3, reject) => {
100618
100715
  const child = spawn2(file2, [...args], {
100619
100716
  stdio: ["ignore", "pipe", "pipe"],
100620
100717
  env: process.env,
@@ -100629,7 +100726,7 @@ var defaultRailwayExec = (file2, args) => new Promise((resolve2, reject) => {
100629
100726
  stderr2 += chunk;
100630
100727
  });
100631
100728
  child.once("error", reject);
100632
- child.once("close", (code) => resolve2({ code, stdout, stderr: stderr2 }));
100729
+ child.once("close", (code) => resolve3({ code, stdout, stderr: stderr2 }));
100633
100730
  });
100634
100731
  function parseSandboxId(stdout) {
100635
100732
  const trimmed = stdout.trim();
@@ -100762,8 +100859,8 @@ function createRailwayRuntime(options) {
100762
100859
  const readyAttempts = options.readyAttempts ?? DEFAULT_RAILWAY_READY_ATTEMPTS;
100763
100860
  const readyIntervalMs = options.readyIntervalMs ?? DEFAULT_RAILWAY_READY_INTERVAL_MS;
100764
100861
  const signalDestroyTimeoutMs = options.signalDestroyTimeoutMs ?? DEFAULT_RAILWAY_SIGNAL_DESTROY_TIMEOUT_MS;
100765
- const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve2) => {
100766
- setTimeout(resolve2, milliseconds);
100862
+ const sleep = options.sleep ?? ((milliseconds) => new Promise((resolve3) => {
100863
+ setTimeout(resolve3, milliseconds);
100767
100864
  }));
100768
100865
  let secrets = options.secrets;
100769
100866
  const getSecrets = () => secrets ??= secretStore();
@@ -102616,7 +102713,7 @@ function usd(value, minimumDecimals = 0) {
102616
102713
  import { mkdir as mkdir20, readFile as readFile27, writeFile as writeFile11 } from "node:fs/promises";
102617
102714
  import { homedir as systemHomedir } from "node:os";
102618
102715
  import { dirname as dirname14, posix, win32 as win322 } from "node:path";
102619
- var MCP_INSTALL_USAGE = "Usage: vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]";
102716
+ var MCP_INSTALL_USAGE = "Usage: vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]";
102620
102717
  var APPS = /* @__PURE__ */ new Set(["claude", "cursor", "codex"]);
102621
102718
  var NEXT_STEP = {
102622
102719
  claude: 'Restart Claude Desktop, then ask it: "Search vAPI for a weather API."',
@@ -102657,6 +102754,7 @@ function mcpInstallTarget(app, context) {
102657
102754
  async function mcpInstallCommand(argv, json2, io, dependencies) {
102658
102755
  const parsed = parseArguments(argv, {
102659
102756
  valueOptions: /* @__PURE__ */ new Set(["--home", "--registry"]),
102757
+ booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
102660
102758
  maximumPositionals: 1
102661
102759
  });
102662
102760
  const appValue = parsed.positionals[0];
@@ -102678,13 +102776,39 @@ ${MCP_INSTALL_USAGE}`
102678
102776
  });
102679
102777
  const entry = serverEntry(home, registry2);
102680
102778
  const created = await writeMcpConfig(target, entry);
102779
+ const name = await unlinkedDefaultAccount(home, dependencies);
102780
+ const offerLink = (name2) => offerDashboardLink({
102781
+ name: name2,
102782
+ json: json2,
102783
+ noLink: parsed.has("--no-link"),
102784
+ io,
102785
+ dependencies,
102786
+ home,
102787
+ apiBase: parsed.one("--registry")
102788
+ });
102789
+ const link3 = json2 && name !== void 0 ? await offerLink(name) : {};
102681
102790
  output3(
102682
102791
  io,
102683
102792
  json2,
102684
- { command: "mcp install", app: appValue, path: target.path, created, home, registry: registry2 },
102793
+ { ...link3, command: "mcp install", app: appValue, path: target.path, created, home, registry: registry2 },
102685
102794
  `${created ? "Wrote" : "Updated"} ${target.path}.`
102686
102795
  );
102687
- if (!json2) io.stdout(NEXT_STEP[appValue]);
102796
+ if (!json2) {
102797
+ io.stdout(NEXT_STEP[appValue]);
102798
+ if (name !== void 0) await offerLink(name);
102799
+ }
102800
+ }
102801
+ async function unlinkedDefaultAccount(home, dependencies) {
102802
+ try {
102803
+ const store = await WalletStore.open(home, {
102804
+ secrets: getSecretStore(dependencies),
102805
+ env: getEnvironment(dependencies)
102806
+ });
102807
+ const name = store.defaultName;
102808
+ if (name !== void 0 && store.resolve({ name }).entry.link === void 0) return name;
102809
+ } catch {
102810
+ }
102811
+ return void 0;
102688
102812
  }
102689
102813
  function isMcpInstallApp(value) {
102690
102814
  return APPS.has(value);
@@ -103354,7 +103478,7 @@ async function taskContext(parsed, io, dependencies, publicOnly = false) {
103354
103478
  pending,
103355
103479
  randomUUID: dependencies.tasks?.randomUUID ?? randomUUID6,
103356
103480
  signInHint: "Run vapi login for the acting wallet.",
103357
- sleep: dependencies.tasks?.sleep ?? ((milliseconds) => new Promise((resolve2) => setTimeout(resolve2, milliseconds)))
103481
+ sleep: dependencies.tasks?.sleep ?? ((milliseconds) => new Promise((resolve3) => setTimeout(resolve3, milliseconds)))
103358
103482
  };
103359
103483
  }
103360
103484
  async function taskRequest2(verb, route, operation) {
@@ -105154,11 +105278,11 @@ ${usage}`);
105154
105278
  }
105155
105279
  }
105156
105280
  async function referencedSleep(milliseconds, signal) {
105157
- await new Promise((resolve2) => {
105281
+ await new Promise((resolve3) => {
105158
105282
  const finish = () => {
105159
105283
  clearTimeout(timer);
105160
105284
  signal?.removeEventListener("abort", finish);
105161
- resolve2();
105285
+ resolve3();
105162
105286
  };
105163
105287
  const timer = setTimeout(finish, milliseconds);
105164
105288
  if (signal === void 0) return;
@@ -105386,7 +105510,7 @@ var HELP_HEADING = "vAPI Network";
105386
105510
  var HELP = `${HELP_HEADING}
105387
105511
 
105388
105512
  Usage:
105389
- vapi init [--networks <base,arc>] [--json]
105513
+ vapi init [--networks <base,arc>] [--no-link] [--json]
105390
105514
  vapi setup [--no-cloud-backup] [--accounts <n>] [--json]
105391
105515
  vapi accounts [--all] [--json]
105392
105516
  vapi accounts add <name> [--label <text>] [--no-link] [--json]
@@ -105433,6 +105557,7 @@ Usage:
105433
105557
  vapi agent pause <name> [--json]
105434
105558
  vapi agent resume <name> [--json]
105435
105559
  vapi agent revoke <name> [--json]
105560
+ vapi dashboard [--account <name>] [--no-browser] [--json]
105436
105561
  vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]
105437
105562
  vapi logout [--account <name>] [--json]
105438
105563
  vapi whoami [--account <name>] [--json]
@@ -105483,11 +105608,13 @@ Usage:
105483
105608
  vapi publish list [--json]
105484
105609
  vapi claim <origin> [--account <name>] [--json]
105485
105610
  vapi mcp [--account <name>] [--json]
105486
- vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]
105611
+ vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--no-link] [--json]
105487
105612
  vapi serve [--json]
105488
105613
  vapi version [--json]
105489
105614
  vapi help [--json]
105490
105615
 
105616
+ \`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.
105617
+
105491
105618
  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.
105492
105619
 
105493
105620
  \`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]\`.
@@ -105552,8 +105679,8 @@ var ACCOUNT_OPTION2 = "--account";
105552
105679
  var WALLET_OPTION_DEPRECATION = "--wallet is now --account; --wallet keeps working for one release.";
105553
105680
  var SOLANA_VAULT_UNAVAILABLE2 = "Solana keys are not part of the device vault yet.";
105554
105681
  var INCLUDE_UNVERIFIED_OPTION = "--include-unverified";
105555
- async function openWalletStore(dependencies) {
105556
- return await WalletStore.open(getVapiPaths().directory, {
105682
+ async function openWalletStore(dependencies, home = getVapiPaths().directory) {
105683
+ return await WalletStore.open(home, {
105557
105684
  secrets: getSecretStore(dependencies),
105558
105685
  env: getEnvironment(dependencies),
105559
105686
  ...dependencies.now === void 0 ? {} : { now: dependencies.now }
@@ -105568,8 +105695,8 @@ async function selectWallet(store, parsed, dependencies) {
105568
105695
  const address4 = await store.readAddress(resolved.name);
105569
105696
  return { store, ...resolved, ...address4 === void 0 ? {} : { address: address4 } };
105570
105697
  }
105571
- async function targetWallet(parsed, dependencies) {
105572
- return await selectWallet(await openWalletStore(dependencies), parsed, dependencies);
105698
+ async function targetWallet(parsed, dependencies, home = getVapiPaths().directory) {
105699
+ return await selectWallet(await openWalletStore(dependencies, home), parsed, dependencies);
105573
105700
  }
105574
105701
  function getSecretStore(dependencies) {
105575
105702
  return dependencies.secretStore ?? secretStore();
@@ -105748,6 +105875,10 @@ async function runCli(argv = process.argv.slice(2), io = processIo, dependencies
105748
105875
  case "agent":
105749
105876
  exitCode = await agentCommand(args.slice(1), json2, runIo, dependencies);
105750
105877
  break;
105878
+ case "dashboard":
105879
+ await dashboardCommand(args.slice(1), json2, io, dependencies);
105880
+ exitCode = 0;
105881
+ break;
105751
105882
  case "login":
105752
105883
  await loginCommand(args.slice(1), json2, io, dependencies);
105753
105884
  exitCode = 0;
@@ -105962,6 +106093,7 @@ function shouldAutoUploadAfterFailure(args) {
105962
106093
  async function initCommand(argv, json2, io, dependencies) {
105963
106094
  const parsed = parseArguments(argv, {
105964
106095
  valueOptions: /* @__PURE__ */ new Set(["--networks"]),
106096
+ booleanOptions: /* @__PURE__ */ new Set(["--no-link"]),
105965
106097
  maximumPositionals: 0
105966
106098
  });
105967
106099
  const networks = parseInitNetworks(parsed.one("--networks") ?? "base");
@@ -106009,7 +106141,14 @@ async function initCommand(argv, json2, io, dependencies) {
106009
106141
  nextSteps: buildNextSteps(account.address)
106010
106142
  };
106011
106143
  if (json2) {
106012
- io.stdout(JSON.stringify(result));
106144
+ const link3 = await offerDashboardLink({
106145
+ name: created.name,
106146
+ json: json2,
106147
+ noLink: parsed.has("--no-link"),
106148
+ io,
106149
+ dependencies
106150
+ });
106151
+ io.stdout(JSON.stringify({ ...result, ...link3 }));
106013
106152
  return;
106014
106153
  }
106015
106154
  if (configRewrites.length > 0) io.stdout(formatLegacyRegistryRewrites(configRewrites));
@@ -106030,6 +106169,13 @@ async function initCommand(argv, json2, io, dependencies) {
106030
106169
  io.stdout(formatAccounts(accounts));
106031
106170
  io.stdout("");
106032
106171
  io.stdout(result.nextSteps.join("\n"));
106172
+ await offerDashboardLink({
106173
+ name: created.name,
106174
+ json: json2,
106175
+ noLink: parsed.has("--no-link"),
106176
+ io,
106177
+ dependencies
106178
+ });
106033
106179
  }
106034
106180
  var INIT_ALREADY_DONE = "This machine already has a wallet, so vapi init created nothing.";
106035
106181
  async function reportExistingWallets(store, json2, io, dependencies) {
@@ -106065,12 +106211,11 @@ async function walletCommand(argv, json2, io, dependencies) {
106065
106211
  `Unknown wallet subcommand ${JSON.stringify(subcommand)}. ${WALLET_USAGE}`
106066
106212
  );
106067
106213
  }
106068
- await accountsCommand(
106069
- [mapped2, ...rest, ...subcommand === "create" ? ["--no-link"] : []],
106070
- json2,
106071
- io,
106072
- dependencies
106073
- );
106214
+ if (subcommand === "create") {
106215
+ await accountsAddCommand(rest, json2, io, dependencies, { link: "offer" });
106216
+ return;
106217
+ }
106218
+ await accountsCommand([mapped2, ...rest], json2, io, dependencies);
106074
106219
  }
106075
106220
  async function unlockedWallets(walletsStore, wallets, dependencies) {
106076
106221
  const secrets = getSecretStore(dependencies);
@@ -106612,8 +106757,8 @@ async function fetchNetworkStats(dependencies) {
106612
106757
  })();
106613
106758
  let timeout;
106614
106759
  try {
106615
- const timedOut = new Promise((resolve2) => {
106616
- timeout = setTimeout(() => resolve2(null), NETWORK_STATS_REQUEST_TIMEOUT_MS);
106760
+ const timedOut = new Promise((resolve3) => {
106761
+ timeout = setTimeout(() => resolve3(null), NETWORK_STATS_REQUEST_TIMEOUT_MS);
106617
106762
  });
106618
106763
  return await Promise.race([request, timedOut]);
106619
106764
  } finally {
@@ -108294,10 +108439,10 @@ async function checkForUpdate(options = {}) {
108294
108439
  try {
108295
108440
  return await Promise.race([
108296
108441
  latestNotice(options, env, controller.signal),
108297
- new Promise((resolve2) => {
108442
+ new Promise((resolve3) => {
108298
108443
  timer = setTimeout(() => {
108299
108444
  controller.abort();
108300
- resolve2(void 0);
108445
+ resolve3(void 0);
108301
108446
  }, CHECK_TIMEOUT_MS);
108302
108447
  })
108303
108448
  ]);