@vapi-network/cli 0.12.0 → 0.12.1

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
@@ -70539,11 +70539,19 @@ function binaryInstalled(file2, env) {
70539
70539
  if (isAbsolute(file2) || win32.isAbsolute(file2)) return existsSync(file2);
70540
70540
  return (env.PATH ?? "").split(delimiter).some((directory) => existsSync(join6(directory, file2)));
70541
70541
  }
70542
+ var SAFE_FAILURE_DETAILS = [
70543
+ "Cannot autolaunch D-Bus without X11 $DISPLAY",
70544
+ "Cannot autolaunch D-Bus",
70545
+ "The name org.freedesktop.secrets was not provided by any .service files",
70546
+ "Cannot create an item in a locked collection",
70547
+ "User interaction is not allowed.",
70548
+ "Access to the path is denied."
70549
+ ];
70542
70550
  function requireSuccess(result, what) {
70543
70551
  if (result.code === 0) return;
70544
- const detail = result.stderr.trim() || result.stdout.trim();
70552
+ const detail = SAFE_FAILURE_DETAILS.find((reason) => result.stderr.includes(reason));
70545
70553
  throw new KeystoreError(
70546
- `Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail.length === 0 ? "" : ` ${detail}`}`
70554
+ `Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail === void 0 ? "" : ` ${detail}`}`
70547
70555
  );
70548
70556
  }
70549
70557
  function withoutTrailingNewline(value) {
@@ -71569,7 +71577,7 @@ async function loadOrCreateDeviceKey(args) {
71569
71577
  await args.secrets.set(VAULT_KEY_ACCOUNT, key2.toString("base64"));
71570
71578
  return key2;
71571
71579
  } catch (error61) {
71572
- throw asVaultError2(error61, "Unable to load or create the device vault key.");
71580
+ throw asVaultError2(error61, deviceKeyFailureMessage(error61, args.secrets.platform));
71573
71581
  }
71574
71582
  });
71575
71583
  }
@@ -71827,6 +71835,12 @@ function parseJson(value) {
71827
71835
  function asVaultError2(error61, message) {
71828
71836
  return error61 instanceof VaultError ? error61 : new VaultError("corrupt", message, { cause: error61 });
71829
71837
  }
71838
+ var HEADLESS_LINUX_HINT = "A server, container or GitHub Codespace usually has no keyring. Run vapi on your own computer, or connect Claude from https://api.vapinetwork.ai/connect.";
71839
+ function deviceKeyFailureMessage(error61, platform2) {
71840
+ if (!(error61 instanceof KeystoreError)) return "Unable to load or create the device vault key.";
71841
+ const detail = `Unable to load or create the device vault key: ${error61.message.replace(/\.$/u, "")}.`;
71842
+ return platform2 === "linux" ? `${detail} ${HEADLESS_LINUX_HINT}` : detail;
71843
+ }
71830
71844
 
71831
71845
  // ../core/src/vault-migrate.ts
71832
71846
  import {
@@ -77753,7 +77767,7 @@ function createRunBudget(args) {
77753
77767
  import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
77754
77768
  import { arch, platform, release } from "node:os";
77755
77769
  import { join as join13 } from "node:path";
77756
- var VAPI_CLIENT_VERSION = "0.12.0";
77770
+ var VAPI_CLIENT_VERSION = "0.12.1";
77757
77771
  async function createSupportReport(options) {
77758
77772
  const message = options.message.trim();
77759
77773
  if (!message) throw new Error("Support report message must not be empty.");
@@ -95734,7 +95748,12 @@ var PROBE_MODES = ["origin", "endpoint", "openapi"];
95734
95748
  var PAYOUT_CHAIN_ID = "eip155:8453";
95735
95749
  var PAYOUT_STATEMENT = "Confirm this wallet receives vAPI Call payouts";
95736
95750
  var CLAIM_STATEMENT_PREFIX = "Claim the vAPI Call listings served from";
95737
- var API_KEY_CONSOLE_PATH = "/account";
95751
+ function apiKeyConsoleUrl(baseUrl) {
95752
+ const url2 = listingsUrl(baseUrl, "/connect");
95753
+ url2.search = "advanced=keys";
95754
+ url2.hash = "api-keys";
95755
+ return url2;
95756
+ }
95738
95757
  var RegistryApiError = class extends Error {
95739
95758
  constructor(status, message, body) {
95740
95759
  super(message);
@@ -95894,7 +95913,7 @@ async function registryError(response, baseUrl) {
95894
95913
  [
95895
95914
  "The vAPI API key was rejected.",
95896
95915
  detail,
95897
- `Create a key in the console at ${listingsUrl(baseUrl, API_KEY_CONSOLE_PATH).href} and store it with vapi auth set-key.`
95916
+ `Create a key in the console at ${apiKeyConsoleUrl(baseUrl).href} and store it with vapi auth set-key.`
95898
95917
  ].filter(Boolean).join(" "),
95899
95918
  body
95900
95919
  );
@@ -99118,7 +99137,7 @@ async function readProcessStdin() {
99118
99137
  }
99119
99138
 
99120
99139
  // src/version.ts
99121
- var CLI_VERSION = "0.12.0";
99140
+ var CLI_VERSION = "0.12.1";
99122
99141
 
99123
99142
  // src/status.ts
99124
99143
  async function statusCommand(argv, json2, io, dependencies) {
@@ -108914,7 +108933,7 @@ function sameOrigin2(left, right) {
108914
108933
  function noApiKeyMessage(baseUrl) {
108915
108934
  return [
108916
108935
  "No vAPI API key on this machine.",
108917
- `Create one in the console at ${listingsUrl(baseUrl, API_KEY_CONSOLE_PATH).href}, then store it with vapi auth set-key.`,
108936
+ `Create one in the console at ${apiKeyConsoleUrl(baseUrl).href}, then store it with vapi auth set-key.`,
108918
108937
  `In CI, set ${API_KEY_ENV} instead.`
108919
108938
  ].join("\n");
108920
108939
  }