@vapi-network/cli 0.14.0 → 0.15.0

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/login.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { targetWallet, type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
+ import { targetWallet } from "./wallet-session.js";
2
3
  export declare function loginCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
3
4
  /** Shared device-link flow used by `vapi login` and `vapi agent create`. */
4
5
  export declare function runLoginFlow(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies, options?: {
@@ -1,4 +1,4 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  type McpInstallApp = "claude-code" | "claude-desktop" | "cursor" | "codex";
3
3
  type McpFileInstallApp = Exclude<McpInstallApp, "claude-code">;
4
4
  export type McpInstallProcessResult = {
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Open a funding URL without ever failing the command: a headless or locked-down
3
+ * machine simply keeps the printed link.
4
+ */
5
+ export declare function openInBrowser(url: string): boolean;
6
+ export declare function fileExists(path: string): Promise<boolean>;
@@ -0,0 +1,27 @@
1
+ import { type VapiConfig } from "@vapi-network/core";
2
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
3
+ /**
4
+ * The provider side of the registry. `vapi publish <url>` probes, lets the
5
+ * person choose, signs one payout line with the local wallet and creates the
6
+ * listing; the three subcommands move it afterwards. Returns the exit code
7
+ * itself, because a probe the registry refuses is a `2` with the registry's
8
+ * own words rather than a thrown error.
9
+ */
10
+ export declare function publishCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<number>;
11
+ export declare function noApiKeyMessage(baseUrl: string): string;
12
+ /**
13
+ * The registry behind the configured discovery URLs. `VAPI_REGISTRY_URL` has
14
+ * already moved those by the time the config is loaded, so deriving the base
15
+ * from them follows the env override, a self-hosted registry and a mount
16
+ * prefix alike. A hand-edited discovery URL falls back to the shipped default.
17
+ */
18
+ export declare function registryBaseUrl(config: VapiConfig): string;
19
+ /**
20
+ * `vapi claim <origin>`: the owner of an API vAPI indexed from a public
21
+ * catalog takes the listings over. The registry sends an EIP-4361 message; the
22
+ * wallet the listings already pay signs it on the same path \`vapi publish\`
23
+ * signs its payout line, and the registry recovers the signer to match it
24
+ * against their payTo. Nothing is paid and the payout path does not change. A
25
+ * human act, like publishing: there is no MCP tool for it.
26
+ */
27
+ export declare function claimCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
@@ -0,0 +1,11 @@
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
+ export declare const CUSTODY_NOTICE: string;
3
+ /**
4
+ * The phrase is shown once, to a person, and waits until they say they have it.
5
+ * A script, a piped run or anything an agent drives gets the pointer to
6
+ * `vapi backup` instead: the wallet is still created, but nothing here may end
7
+ * up in a transcript or a log file.
8
+ */
9
+ export declare function showRecoveryPhrase(phrase: string, io: CliIo, dependencies: CliDependencies): Promise<void>;
10
+ /** One numbered word per line: the shape people copy onto paper without slips. */
11
+ export declare function formatRecoveryPhrase(phrase: string): string;
package/dist/router.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { type RouterClientDeps } from "@vapi-network/core/router-client";
2
- import { type CliDependencies, type CliIo, type WalletTarget } from "./cli.js";
2
+ import { type WalletTarget } from "./wallet-session.js";
3
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
3
4
  export declare function routerCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
4
5
  export declare function routerDeps(target: WalletTarget, dependencies: CliDependencies): RouterClientDeps;
@@ -0,0 +1,3 @@
1
+ export declare function redactDetachedRunValue<T>(value: T, environment: NodeJS.ProcessEnv): T;
2
+ /** Redacts one output line of a detached child; a JSON line stays valid JSON. */
3
+ export declare function redactDetachedRunText(value: string, environment: NodeJS.ProcessEnv): string;
@@ -1,6 +1,6 @@
1
1
  import { type ChildProcess } from "node:child_process";
2
2
  import { type Runtime, type RuntimeKind } from "@vapi-network/mcp";
3
- import { type CliDependencies } from "./cli.js";
3
+ import { type CliDependencies } from "./cli-context.js";
4
4
  import { type RailwayRuntimeOptions } from "./runtime-railway.js";
5
5
  type Spawn = (command: string, args: readonly string[], options: {
6
6
  detached: true;
package/dist/send.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  export declare function sendCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<number>;
package/dist/setup.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type VapiConfig } from "@vapi-network/core";
2
- import { type CliDependencies, type CliIo } from "./cli.js";
2
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
3
3
  export declare function setupCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
4
4
  export declare function restoreVaultFromPhrase(phrase: string, config: VapiConfig, io: CliIo, dependencies: CliDependencies, accountCount?: number): Promise<{
5
5
  names: string[];
package/dist/stake.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  export declare const STAKE_URL = "https://api.vapinetwork.ai/stake";
3
3
  export declare function stakeCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
package/dist/status.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { type StatusAccount, type StatusReport } from "@vapi-network/core";
2
- import { type CliDependencies, type CliIo } from "./cli.js";
2
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
3
3
  export declare function statusCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
4
4
  export declare function renderStatusScreen(report: StatusReport): string[];
5
5
  export declare function formatAccountLine(account: StatusAccount, nameWidth: number): string;
package/dist/swarm.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  export declare function swarmCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<number>;
@@ -1,4 +1,4 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  type UpdateCheckOptions = {
3
3
  argv?: string[];
4
4
  env?: NodeJS.ProcessEnv;
package/dist/vault.d.ts CHANGED
@@ -1,3 +1,35 @@
1
- import { type CliDependencies, type CliIo } from "./cli.js";
1
+ import { type CliDependencies, type CliIo } from "./cli-context.js";
2
2
  export declare function vaultCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
3
3
  export declare function restoreCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
4
+ /**
5
+ * Prints the private key of one wallet, to a person, on a terminal. The agent
6
+ * gate runs before the passphrase is read, and the person types the wallet name
7
+ * first, so a key never appears because a tool call asked for it.
8
+ */
9
+ export declare function exportKeyCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
10
+ /**
11
+ * Prints the recovery phrase of one wallet, to a person, on a terminal. The
12
+ * same gate and the same typed confirmation as `vapi export-key`.
13
+ */
14
+ export declare function backupCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
15
+ /**
16
+ * Restores a wallet from words or a private key the person types in. The secret
17
+ * never comes from argv, where a shell history would keep it, and an existing
18
+ * wallet is moved to the trash rather than overwritten.
19
+ */
20
+ export declare function importCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
21
+ /** Re-encrypts the same wallet under a new passphrase; the addresses stay. */
22
+ export declare function passphraseCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
23
+ /**
24
+ * Hands one wallet's passphrase to the OS secret store, so an agent can pay
25
+ * from it without the passphrase sitting in an editor's configuration file.
26
+ * The passphrase is typed by a person, on a terminal, and is verified against
27
+ * the keystore before anything is stored: a typo must not be kept.
28
+ */
29
+ export declare function unlockCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
30
+ /**
31
+ * Takes a passphrase back out of the OS secret store. Nothing about the wallet
32
+ * changes: the keystore, its addresses and its passphrase are untouched, and
33
+ * the next run asks for the passphrase again.
34
+ */
35
+ export declare function lockCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<void>;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const CLI_VERSION = "0.14.0";
1
+ export declare const CLI_VERSION = "0.15.0";
@@ -0,0 +1,93 @@
1
+ import { WalletStore } from "@vapi-network/core";
2
+ import { type CliDependencies } from "./cli-context.js";
3
+ import { type AuditEvent, type ResolvedPassphrase, type SecretsDecision, type SecretStore, type VapiPaymentAccount, type WalletEntry, type WalletName } from "@vapi-network/core";
4
+ import { type CliIo } from "./cli-context.js";
5
+ /** The wallet one invocation acts on, resolved before any passphrase is read. */
6
+ export type WalletTarget = {
7
+ store: WalletStore;
8
+ name: WalletName;
9
+ path: string;
10
+ entry: WalletEntry;
11
+ address?: string;
12
+ };
13
+ /** Opens the wallet store for this home, migrating a 0.2.x layout on the way. */
14
+ export declare function openWalletStore(dependencies: CliDependencies, home?: string): Promise<WalletStore>;
15
+ /**
16
+ * `--account`, then `VAPI_WALLET`, then the default in `wallets.json`. An
17
+ * unknown name fails here, before a passphrase prompt can cost anything.
18
+ */
19
+ export declare function selectWallet(store: WalletStore, parsed: {
20
+ one(name: string): string | undefined;
21
+ }, dependencies: CliDependencies): Promise<WalletTarget>;
22
+ /** Opens the store and picks the wallet in one step, for the usual command. */
23
+ export declare function targetWallet(parsed: {
24
+ one(name: string): string | undefined;
25
+ }, dependencies: CliDependencies, home?: string): Promise<WalletTarget>;
26
+ /** The OS secret store this run uses: the machine's, or the one a test injects. */
27
+ export declare function getSecretStore(dependencies: CliDependencies): SecretStore;
28
+ /**
29
+ * The passphrase for the wallet this command acts on: `VAPI_KEYSTORE_PASSWORD`,
30
+ * then the OS secret store entry `vapi unlock` left behind, then a prompt.
31
+ *
32
+ * The variable is read from the real process environment rather than from the
33
+ * injected one: it belongs to the process, while `dependencies.env` models
34
+ * wallet selection and agent markers.
35
+ */
36
+ export declare function walletPassphrase(target: {
37
+ name: string;
38
+ }, dependencies: CliDependencies, options?: {
39
+ confirm?: boolean;
40
+ }): Promise<ResolvedPassphrase>;
41
+ /**
42
+ * Runs one keystore operation with a resolved passphrase. A passphrase that
43
+ * came out of the secret store and no longer opens the wallet is worth its own
44
+ * sentence: the person has to know which copy went stale, and how to replace it.
45
+ */
46
+ export declare function withResolvedPassphrase<T>(resolved: ResolvedPassphrase, target: {
47
+ name: string;
48
+ }, dependencies: CliDependencies, use: (passphrase: string) => Promise<T>): Promise<T>;
49
+ /** Opens the selected wallet, and keeps the passphrase for callers that need it. */
50
+ export declare function unlockTarget(target: WalletTarget, dependencies: CliDependencies): Promise<{
51
+ account: VapiPaymentAccount;
52
+ passphrase: string;
53
+ }>;
54
+ export declare function walletHeader(target: {
55
+ name: string;
56
+ address?: string;
57
+ }): string;
58
+ /**
59
+ * The shape every wallet-aware command prints: the wallet name first in text
60
+ * mode, and a `wallet` field in `--json`, so a person and an agent always know
61
+ * which key just moved.
62
+ */
63
+ export declare function outputForWallet(io: CliIo, json: boolean, target: {
64
+ name: string;
65
+ address?: string;
66
+ }, value: Record<string, unknown>, human: string): void;
67
+ /** Whether this run may put a recovery phrase or a private key on the screen. */
68
+ export declare function secretsDecision(dependencies: CliDependencies): SecretsDecision;
69
+ /** One audit line. The home is the wallet store's, so `VAPI_HOME` is honoured. */
70
+ export declare function recordAudit(dependencies: CliDependencies, event: AuditEvent | "vault.cloud_backup_on" | "vault.cloud_backup_off", options?: {
71
+ wallet?: string;
72
+ detail?: string;
73
+ }): Promise<void>;
74
+ /**
75
+ * The gate in front of `vapi backup` and `vapi export-key`: refuse, log the
76
+ * attempt, and say which stream or which variable decided it. Nothing is
77
+ * printed to stdout, so a caller capturing it gets nothing either way.
78
+ */
79
+ export declare function requireSecretsAllowed(dependencies: CliDependencies, event: AuditEvent, wallet: string | undefined, options?: {
80
+ refusal?: string;
81
+ forcedReason?: string;
82
+ }): Promise<void>;
83
+ /**
84
+ * Printing a secret or trashing a wallet is worth one deliberate act: the
85
+ * person types the wallet's own name. A mismatch stops before anything moves.
86
+ */
87
+ export declare function confirmWalletName(name: string, prompt: string, refusal: string, dependencies: CliDependencies): Promise<void>;
88
+ /** The device vault key, read the one way every CLI key export reads it. */
89
+ export declare function deviceVaultKey(store: Pick<WalletStore, "home">, dependencies: CliDependencies): Promise<{
90
+ path: string;
91
+ key: Uint8Array;
92
+ }>;
93
+ export declare const SOLANA_VAULT_UNAVAILABLE = "Solana keys are not part of the device vault yet.";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-network/cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Command-line interface for the non-custodial vAPI Network wallet",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {