@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/cli.js CHANGED
@@ -70538,11 +70538,19 @@ function binaryInstalled(file2, env) {
70538
70538
  if (isAbsolute(file2) || win32.isAbsolute(file2)) return existsSync(file2);
70539
70539
  return (env.PATH ?? "").split(delimiter).some((directory) => existsSync(join6(directory, file2)));
70540
70540
  }
70541
+ var SAFE_FAILURE_DETAILS = [
70542
+ "Cannot autolaunch D-Bus without X11 $DISPLAY",
70543
+ "Cannot autolaunch D-Bus",
70544
+ "The name org.freedesktop.secrets was not provided by any .service files",
70545
+ "Cannot create an item in a locked collection",
70546
+ "User interaction is not allowed.",
70547
+ "Access to the path is denied."
70548
+ ];
70541
70549
  function requireSuccess(result, what) {
70542
70550
  if (result.code === 0) return;
70543
- const detail = result.stderr.trim() || result.stdout.trim();
70551
+ const detail = SAFE_FAILURE_DETAILS.find((reason) => result.stderr.includes(reason));
70544
70552
  throw new KeystoreError(
70545
- `Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail.length === 0 ? "" : ` ${detail}`}`
70553
+ `Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail === void 0 ? "" : ` ${detail}`}`
70546
70554
  );
70547
70555
  }
70548
70556
  function withoutTrailingNewline(value) {
@@ -71568,7 +71576,7 @@ async function loadOrCreateDeviceKey(args) {
71568
71576
  await args.secrets.set(VAULT_KEY_ACCOUNT, key2.toString("base64"));
71569
71577
  return key2;
71570
71578
  } catch (error61) {
71571
- throw asVaultError2(error61, "Unable to load or create the device vault key.");
71579
+ throw asVaultError2(error61, deviceKeyFailureMessage(error61, args.secrets.platform));
71572
71580
  }
71573
71581
  });
71574
71582
  }
@@ -71826,6 +71834,12 @@ function parseJson(value) {
71826
71834
  function asVaultError2(error61, message) {
71827
71835
  return error61 instanceof VaultError ? error61 : new VaultError("corrupt", message, { cause: error61 });
71828
71836
  }
71837
+ 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.";
71838
+ function deviceKeyFailureMessage(error61, platform2) {
71839
+ if (!(error61 instanceof KeystoreError)) return "Unable to load or create the device vault key.";
71840
+ const detail = `Unable to load or create the device vault key: ${error61.message.replace(/\.$/u, "")}.`;
71841
+ return platform2 === "linux" ? `${detail} ${HEADLESS_LINUX_HINT}` : detail;
71842
+ }
71829
71843
 
71830
71844
  // ../core/src/vault-migrate.ts
71831
71845
  import {
@@ -77752,7 +77766,7 @@ function createRunBudget(args) {
77752
77766
  import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
77753
77767
  import { arch, platform, release } from "node:os";
77754
77768
  import { join as join13 } from "node:path";
77755
- var VAPI_CLIENT_VERSION = "0.12.0";
77769
+ var VAPI_CLIENT_VERSION = "0.12.1";
77756
77770
  async function createSupportReport(options) {
77757
77771
  const message = options.message.trim();
77758
77772
  if (!message) throw new Error("Support report message must not be empty.");
@@ -95739,7 +95753,12 @@ var PROBE_MODES = ["origin", "endpoint", "openapi"];
95739
95753
  var PAYOUT_CHAIN_ID = "eip155:8453";
95740
95754
  var PAYOUT_STATEMENT = "Confirm this wallet receives vAPI Call payouts";
95741
95755
  var CLAIM_STATEMENT_PREFIX = "Claim the vAPI Call listings served from";
95742
- var API_KEY_CONSOLE_PATH = "/account";
95756
+ function apiKeyConsoleUrl(baseUrl) {
95757
+ const url2 = listingsUrl(baseUrl, "/connect");
95758
+ url2.search = "advanced=keys";
95759
+ url2.hash = "api-keys";
95760
+ return url2;
95761
+ }
95743
95762
  var RegistryApiError = class extends Error {
95744
95763
  constructor(status, message, body) {
95745
95764
  super(message);
@@ -95899,7 +95918,7 @@ async function registryError(response, baseUrl) {
95899
95918
  [
95900
95919
  "The vAPI API key was rejected.",
95901
95920
  detail,
95902
- `Create a key in the console at ${listingsUrl(baseUrl, API_KEY_CONSOLE_PATH).href} and store it with vapi auth set-key.`
95921
+ `Create a key in the console at ${apiKeyConsoleUrl(baseUrl).href} and store it with vapi auth set-key.`
95903
95922
  ].filter(Boolean).join(" "),
95904
95923
  body
95905
95924
  );
@@ -99123,7 +99142,7 @@ async function readProcessStdin() {
99123
99142
  }
99124
99143
 
99125
99144
  // src/version.ts
99126
- var CLI_VERSION = "0.12.0";
99145
+ var CLI_VERSION = "0.12.1";
99127
99146
 
99128
99147
  // src/status.ts
99129
99148
  async function statusCommand(argv, json2, io, dependencies) {
@@ -108919,7 +108938,7 @@ function sameOrigin2(left, right) {
108919
108938
  function noApiKeyMessage(baseUrl) {
108920
108939
  return [
108921
108940
  "No vAPI API key on this machine.",
108922
- `Create one in the console at ${listingsUrl(baseUrl, API_KEY_CONSOLE_PATH).href}, then store it with vapi auth set-key.`,
108941
+ `Create one in the console at ${apiKeyConsoleUrl(baseUrl).href}, then store it with vapi auth set-key.`,
108923
108942
  `In CI, set ${API_KEY_ENV} instead.`
108924
108943
  ].join("\n");
108925
108944
  }