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 +1 -1
- package/dist/cli.js +27 -8
- package/dist/cli.js.map +2 -2
- package/dist/index.js +27 -8
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -71093,11 +71093,19 @@ function binaryInstalled(file2, env) {
|
|
|
71093
71093
|
if (isAbsolute(file2) || win32.isAbsolute(file2)) return existsSync(file2);
|
|
71094
71094
|
return (env.PATH ?? "").split(delimiter).some((directory) => existsSync(join6(directory, file2)));
|
|
71095
71095
|
}
|
|
71096
|
+
var SAFE_FAILURE_DETAILS = [
|
|
71097
|
+
"Cannot autolaunch D-Bus without X11 $DISPLAY",
|
|
71098
|
+
"Cannot autolaunch D-Bus",
|
|
71099
|
+
"The name org.freedesktop.secrets was not provided by any .service files",
|
|
71100
|
+
"Cannot create an item in a locked collection",
|
|
71101
|
+
"User interaction is not allowed.",
|
|
71102
|
+
"Access to the path is denied."
|
|
71103
|
+
];
|
|
71096
71104
|
function requireSuccess(result, what) {
|
|
71097
71105
|
if (result.code === 0) return;
|
|
71098
|
-
const detail =
|
|
71106
|
+
const detail = SAFE_FAILURE_DETAILS.find((reason) => result.stderr.includes(reason));
|
|
71099
71107
|
throw new KeystoreError(
|
|
71100
|
-
`Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail
|
|
71108
|
+
`Could not ${what}${result.code === null ? "" : ` (exit ${result.code})`}.${detail === void 0 ? "" : ` ${detail}`}`
|
|
71101
71109
|
);
|
|
71102
71110
|
}
|
|
71103
71111
|
function withoutTrailingNewline(value) {
|
|
@@ -72126,7 +72134,7 @@ async function loadOrCreateDeviceKey(args) {
|
|
|
72126
72134
|
await args.secrets.set(VAULT_KEY_ACCOUNT, key2.toString("base64"));
|
|
72127
72135
|
return key2;
|
|
72128
72136
|
} catch (error61) {
|
|
72129
|
-
throw asVaultError2(error61,
|
|
72137
|
+
throw asVaultError2(error61, deviceKeyFailureMessage(error61, args.secrets.platform));
|
|
72130
72138
|
}
|
|
72131
72139
|
});
|
|
72132
72140
|
}
|
|
@@ -72384,6 +72392,12 @@ function parseJson(value) {
|
|
|
72384
72392
|
function asVaultError2(error61, message) {
|
|
72385
72393
|
return error61 instanceof VaultError ? error61 : new VaultError("corrupt", message, { cause: error61 });
|
|
72386
72394
|
}
|
|
72395
|
+
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.";
|
|
72396
|
+
function deviceKeyFailureMessage(error61, platform2) {
|
|
72397
|
+
if (!(error61 instanceof KeystoreError)) return "Unable to load or create the device vault key.";
|
|
72398
|
+
const detail = `Unable to load or create the device vault key: ${error61.message.replace(/\.$/u, "")}.`;
|
|
72399
|
+
return platform2 === "linux" ? `${detail} ${HEADLESS_LINUX_HINT}` : detail;
|
|
72400
|
+
}
|
|
72387
72401
|
|
|
72388
72402
|
// ../core/src/vault-migrate.ts
|
|
72389
72403
|
import {
|
|
@@ -78310,7 +78324,7 @@ function createRunBudget(args) {
|
|
|
78310
78324
|
import { mkdir as mkdir15, writeFile as writeFile8 } from "node:fs/promises";
|
|
78311
78325
|
import { arch, platform, release } from "node:os";
|
|
78312
78326
|
import { join as join13 } from "node:path";
|
|
78313
|
-
var VAPI_CLIENT_VERSION = "0.12.
|
|
78327
|
+
var VAPI_CLIENT_VERSION = "0.12.1";
|
|
78314
78328
|
async function createSupportReport(options) {
|
|
78315
78329
|
const message = options.message.trim();
|
|
78316
78330
|
if (!message) throw new Error("Support report message must not be empty.");
|
|
@@ -97114,7 +97128,12 @@ var PROBE_MODES = ["origin", "endpoint", "openapi"];
|
|
|
97114
97128
|
var PAYOUT_CHAIN_ID = "eip155:8453";
|
|
97115
97129
|
var PAYOUT_STATEMENT = "Confirm this wallet receives vAPI Call payouts";
|
|
97116
97130
|
var CLAIM_STATEMENT_PREFIX = "Claim the vAPI Call listings served from";
|
|
97117
|
-
|
|
97131
|
+
function apiKeyConsoleUrl(baseUrl) {
|
|
97132
|
+
const url2 = listingsUrl(baseUrl, "/connect");
|
|
97133
|
+
url2.search = "advanced=keys";
|
|
97134
|
+
url2.hash = "api-keys";
|
|
97135
|
+
return url2;
|
|
97136
|
+
}
|
|
97118
97137
|
var RegistryApiError = class extends Error {
|
|
97119
97138
|
constructor(status, message, body) {
|
|
97120
97139
|
super(message);
|
|
@@ -97274,7 +97293,7 @@ async function registryError(response, baseUrl) {
|
|
|
97274
97293
|
[
|
|
97275
97294
|
"The vAPI API key was rejected.",
|
|
97276
97295
|
detail,
|
|
97277
|
-
`Create a key in the console at ${
|
|
97296
|
+
`Create a key in the console at ${apiKeyConsoleUrl(baseUrl).href} and store it with vapi auth set-key.`
|
|
97278
97297
|
].filter(Boolean).join(" "),
|
|
97279
97298
|
body
|
|
97280
97299
|
);
|
|
@@ -100498,7 +100517,7 @@ async function readProcessStdin() {
|
|
|
100498
100517
|
}
|
|
100499
100518
|
|
|
100500
100519
|
// ../cli/src/version.ts
|
|
100501
|
-
var CLI_VERSION = "0.12.
|
|
100520
|
+
var CLI_VERSION = "0.12.1";
|
|
100502
100521
|
|
|
100503
100522
|
// ../cli/src/status.ts
|
|
100504
100523
|
async function statusCommand(argv, json2, io, dependencies) {
|
|
@@ -110294,7 +110313,7 @@ function sameOrigin2(left, right) {
|
|
|
110294
110313
|
function noApiKeyMessage(baseUrl) {
|
|
110295
110314
|
return [
|
|
110296
110315
|
"No vAPI API key on this machine.",
|
|
110297
|
-
`Create one in the console at ${
|
|
110316
|
+
`Create one in the console at ${apiKeyConsoleUrl(baseUrl).href}, then store it with vapi auth set-key.`,
|
|
110298
110317
|
`In CI, set ${API_KEY_ENV} instead.`
|
|
110299
110318
|
].join("\n");
|
|
110300
110319
|
}
|