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