@vapi-network/cli 0.7.0 → 0.9.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/README.md CHANGED
@@ -6,6 +6,9 @@ discovery, payment, receipts, the OS secret store and the MCP launcher. The
6
6
  wallet key stays encrypted on the local machine and every x402 payment is signed
7
7
  locally.
8
8
 
9
+ The `vapi docs`, `vapi docs search` and `vapi docs read` commands access the
10
+ public documentation without a wallet, account or payment.
11
+
9
12
  Two entry points: `@vapi-network/cli` exports `runCli` and the `HELP` text for
10
13
  embedding, and `@vapi-network/cli/cli` is the executable itself.
11
14
 
package/dist/agent.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { listAgentProfiles, readAgentProfile, readSpendLedgerRows, removeAgentProfile, writeAgentProfile } from "@vapi-network/core";
2
- import { createAgentRunDeps, getWallet, runAgent } from "@vapi-network/mcp";
1
+ import { listAgentProfiles, readAgentProfile, readSpendLedgerRows, removeAgentProfile, writeAgentProfile, type AgentProfile, type RunBudget } from "@vapi-network/core";
2
+ import { createAgentRunDeps, getWallet, runAgent, type AgentEvent, type RunAgentDeps } from "@vapi-network/mcp";
3
3
  import { type CliDependencies, type CliIo } from "./cli.js";
4
4
  export type AgentCommandDependencies = {
5
5
  readAgentProfile?: typeof readAgentProfile;
@@ -12,3 +12,24 @@ export type AgentCommandDependencies = {
12
12
  getWallet?: typeof getWallet;
13
13
  };
14
14
  export declare function agentCommand(argv: string[], json: boolean, io: CliIo, dependencies: CliDependencies): Promise<number>;
15
+ export declare function buildAgentRunDeps(input: {
16
+ profile: AgentProfile;
17
+ runId: string;
18
+ budget?: RunBudget;
19
+ allowanceExpiresAt?: Date;
20
+ runMeta?: {
21
+ swarm?: string;
22
+ member?: string;
23
+ parentRunId?: string;
24
+ };
25
+ approvals: "tty" | "decline";
26
+ onEvent?: (event: AgentEvent) => void;
27
+ json: boolean;
28
+ io: CliIo;
29
+ dependencies: CliDependencies;
30
+ }): Promise<RunAgentDeps>;
31
+ export declare function positiveUsdOption(value: string, option: string): {
32
+ text: string;
33
+ number: number;
34
+ atomic: string;
35
+ };
package/dist/cli.d.ts CHANGED
@@ -1,8 +1,12 @@
1
- import { drainCeilingSweeps, sweepBack, WalletStore, type AuditEvent, type CeilingBalanceReader, type CeilingSiblingsFetcher, type CeilingTransfer, type DistributeArgs, type ListingVerification, type SecretStore, type VapiConfig, type VapiPaymentAccount, type WalletBalanceReader, type WalletEntry, type WalletName, type TransferArgs } from "@vapi-network/core";
1
+ import { drainCeilingSweeps, sweepAboveCeiling, sweepBack, WalletStore, type AuditEvent, type CeilingBalanceReader, type CeilingSiblingsFetcher, type CeilingTransfer, type DistributeArgs, type ListingVerification, type SecretStore, type SwarmCapitalDeps, type VapiConfig, type VapiPaymentAccount, type WalletBalanceReader, type WalletEntry, type WalletName, type TransferArgs } from "@vapi-network/core";
2
2
  import { type pollDeviceLink, type startDeviceLink } from "@vapi-network/core/agent-link";
3
3
  import type { buyRouterBalance, listRouterModels, ownerStake, rotateRouterKey, routerChat, routerCredentials, routerUsage } from "@vapi-network/core/router-client";
4
+ import { type Runtime, type RuntimeKind, type runSwarm } from "@vapi-network/mcp";
4
5
  import { type AgentCommandDependencies } from "./agent.js";
5
- export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,arc,solana>] [--json]\n vapi setup [--no-cloud-backup] [--json]\n vapi accounts [--all] [--json]\n vapi accounts add <name> [--label <text>] [--no-link] [--json]\n vapi accounts import <name> [--keystore <path> | --key-file <path>] [--label <text>] [--json]\n vapi accounts rename <old> <new> [--json]\n vapi accounts use <name> [--json]\n vapi accounts remove <name> [--force] [--json]\n vapi accounts restore <name> [--json]\n vapi accounts caps <name> [--per-call <usd>] [--per-day <usd>] [--ceiling <usd|off>] [--json]\n vapi accounts distribute <amount> --from <account> [--to <a,b,c>] [--network base|arc] [--json]\n vapi accounts distribute --resume <id> [--json]\n vapi send <amount> --from <account> --to <account|owner|0x\u2026> [--network base|arc] [--resume <nonce>] [--json]\n vapi fund [--amount <usd>] [--account <name>] [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--include-unverified] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--account <name>] [--json]\n vapi pay --resume <receipt-id> [--json]\n vapi check <url> [--method <method>] [--json]\n vapi balance [--account <name>] [--json]\n vapi receipts [--limit <n>] [--account <name>] [--all-wallets] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--account <name>] [--all-wallets]\n vapi stats [--range <24h|7d|30d>] [--account <name>] [--all-wallets] [--json]\n vapi sweep [<address>] [--network <caip2>] [--account <name>] [--json]\n vapi agent create <name> --model <id> --instructions <file> [--call-budget <usd>] [--max-per-call <usd>] [--router-budget <usd>] [--approve-above <usd>] [--include-unverified] [--max-steps <n>] [--json]\n vapi agent run <name> \"<task>\" [--json]\n vapi agent list [--json]\n vapi agent pause <name> [--json]\n vapi agent resume <name> [--json]\n vapi agent revoke <name> [--json]\n vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]\n vapi logout [--account <name>] [--json]\n vapi whoami [--account <name>] [--json]\n vapi router models [--account <name>] [--json]\n vapi router usage [--account <name>] [--json]\n vapi router chat --model <id> [--system <text>] [--max-tokens <n>] \"<prompt>\" [--account <name>] [--json]\n vapi router buy <1|5|20|50> [--account <name>] [--json]\n vapi router buy --auto <1|5|20|50> --below <usd> [--account <name>] [--json]\n vapi router buy --auto off [--account <name>] [--json]\n vapi router key [--rotate] [--account <name>] [--json]\n vapi stake status [--account <name>] [--json]\n vapi stake open [--account <name>] [--no-browser] [--json]\n vapi export-key [--network <caip2>] [--account <name>] [--json]\n vapi backup [--account <name>] [--cloud [off]] [--json]\n vapi restore [--from-owner [--owner <0x\u2026>]] [--json]\n vapi import (--phrase | --key) [--account <name>] [--networks <base,arc,solana>] [--replace] [--force] [--json]\n vapi passphrase [--account <name>] [--json]\n vapi vault protect [--json]\n vapi vault unprotect [--json]\n vapi vault lock [--json]\n vapi vault unlock [--json]\n vapi vault status [--json]\n vapi unlock [--account <name>] [--json]\n vapi lock [--account <name> | --all] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi auth set-key [--json]\n vapi auth status [--json]\n vapi auth clear [--json]\n vapi publish <url> [--method <method>] [--mode <origin|endpoint|openapi>] [--name <text>] [--description <text>] [--category <ai|data|crypto|compute|search>] [--select <names>] [--account <name>] [--yes] [--resume] [--json]\n vapi publish activate <slug> [--json]\n vapi publish verify-request <slug> [--json]\n vapi publish list [--json]\n vapi claim <origin> [--account <name>] [--json]\n vapi mcp [--account <name>] [--json]\n vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi help [--json]\n\nEvery command that touches a wallet takes `--account <name>`, falls back to `VAPI_WALLET`, then to the default account set by `vapi accounts use`, and names the wallet it used on its first line.\n\n`vapi search` answers with vAPI-verified listings plus the mirrored external catalogs. `--include-unverified` also returns self-listed APIs that passed vAPI's automated x402 probe but were never reviewed; every result is tagged `[verified]`, `[requested]`, `[unverified]` or `[external]`.\n\n`vapi check <url>` grades an x402 API's 402 without paying: status, transport, declared version and its required fields, the exact scheme, canonical USDC, payTo, maxTimeoutSeconds, advertised extensions, and the origin's /.well-known/x402. It looks for OpenAPI beside the checked path, at /openapi.json, then through same-origin service-desc links in /.well-known/api-catalog. No wallet, no payment, no registry call. It exits 1 when a rule fails. A 402 that answers with Stripe/Tempo's MPP challenge (WWW-Authenticate: Payment) is recognised and reported as transport mpp; vapi pay cannot pay it.\n\n`vapi pay --resume <receipt-id>` answers the one question a lost response leaves: did that payment settle? It reads the signed authorization's state on-chain \u2014 settled, expired, or still pending \u2014 and never pays.\n\n`vapi fund` opens the funding page: card via Coinbase (needs a Coinbase account; US guest checkout), send from MetaMask/Coinbase Wallet/WalletConnect, or bridge from another chain.\n\n`vapi vault protect` adds a password to the device vault. `vapi vault unlock` opens it on this device for 8 hours; for unattended use, set `VAPI_VAULT_PASSWORD`. `vapi unlock` and `vapi lock` remain aliases for one release.\n\n`vapi backup` and `vapi export-key` print a secret, so they run only on a real terminal, never for an agent, and ask you to type the wallet name first. `vapi backup --cloud` keeps an encrypted vault copy that only the owner can approve for recovery. `vapi restore` rebuilds the vault from the phrase and re-derives accounts until an unused address. Set `VAPI_NO_SECRETS=1` to switch exports off entirely. Every export and every wallet change is logged to ~/.vapi/audit.log.\n\n`vapi publish <url>` lists an API you own. vAPI probes the URL \u2014 an origin, one endpoint, or an OpenAPI document \u2014 you choose which endpoints to list, and your wallet signs one line naming where the payouts go. Listing is permissionless: a listing that passed the probe goes live with `vapi publish activate <slug>`, and `vapi publish verify-request <slug>` asks for the review that puts it in the default search. Deploying the FeeSplitter that receives the payouts is a wallet transaction and stays in the console. A catalog of more than 20 endpoints is listed as several listings of up to 20, with one result line per endpoint; `--resume` skips every endpoint this key already lists.\n\n`vapi claim <origin>` takes ownership of the listings vAPI indexed from your API. The wallet their payments go to signs one line, `Claim the vAPI Call listings served from <origin>`; the listings stay paid directly to that wallet, and `vapi publish list` shows them.\n\n`vapi auth set-key` types the registry API key once, on a terminal, into the same OS secret store as the passphrase. A key is a secret: it is never an argument, `VAPI_API_KEY` is the route for CI, and no agent or MCP tool can reach it.\n\nWith no command, vapi shows the status screen; vapi help prints this text. The MCP server starts only with `vapi mcp`; `vapi mcp install <app>` writes that app's MCP config and prints the file it touched.";
6
+ import { type TasksCommandDependencies } from "./task.js";
7
+ import { type RuntimeRequest } from "./runtime-local.js";
8
+ import { type RailwayExec } from "./runtime-railway.js";
9
+ export declare const HELP = "vAPI Network\n\nUsage:\n vapi init [--networks <base,arc,solana>] [--json]\n vapi setup [--no-cloud-backup] [--json]\n vapi accounts [--all] [--json]\n vapi accounts add <name> [--label <text>] [--no-link] [--json]\n vapi accounts import <name> [--keystore <path> | --key-file <path>] [--label <text>] [--json]\n vapi accounts rename <old> <new> [--json]\n vapi accounts use <name> [--json]\n vapi accounts remove <name> [--force] [--json]\n vapi accounts restore <name> [--json]\n vapi accounts caps <name> [--per-call <usd>] [--per-day <usd>] [--ceiling <usd|off>] [--json]\n vapi accounts distribute <amount> --from <account> [--to <a,b,c>] [--network base|arc] [--json]\n vapi accounts distribute --resume <id> [--replace-expired-restored] [--bind-legacy-addresses] [--json]\n vapi accounts distribute --cancel <id> [--replace-expired-restored] [--json]\n vapi swarm create <name> [--agents <n>|--roles <a,b,c>] [--fund <usd> --from <account>] [--strategy <targets|even|weights>] [--targets <role=usd,...>] [--caps <perCall>/<perDay>] [--treasury-caps <perCall>/<perDay>] [--network <base|arc>] [--model <id>] [--no-wait] [--json]\n vapi swarm add <name> <role> [--json]\n vapi swarm remove <name> <member> [--json]\n vapi swarm fund <name> <usd> [--from <account>] [--json]\n vapi swarm rebalance <name> [--targets <role=usd,...>] [--json]\n vapi swarm status <name> [--json]\n vapi swarm dissolve <name> [--json]\n vapi swarm run <name> \"<task>\" [--mode lead|each] [--lead <member>] [--budget <usd>] [--draw <usd>] [--detach] [--runtime local|railway] [--result-file <path>] [--json]\n vapi swarm run <name> \"<task>\" --mode each --runtime railway --checkpoint <name> --allow-remote-key [--budget <usd>] [--keep-sandbox] [--json]\n vapi swarm runs <name> [--json]\n vapi swarm stop <name> [<runId>|--all] [--confirm-worker-stopped] [--json]\n vapi send <amount> --from <account> --to <account|owner|0x\u2026> [--network base|arc] [--resume <nonce>] [--json]\n vapi fund [--amount <usd>] [--account <name>] [--json]\n vapi docs \"<question>\" [--json]\n vapi docs search \"<query>\" [--json]\n vapi docs read <url-or-path> [--json]\n vapi search [query] [--kind <kind>] [--network <caip2>] [--limit <n>] [--cursor <cursor>] [--include-unverified] [--json]\n vapi inspect <id> [--endpoint <name>] [--json]\n vapi pay <id-or-url> [--method <method>] [--endpoint <name>] [--body <json>] [--content-type <type>] [--network <caip2>] [--expected-pay-to <address>] [--max <amount>] [--account <name>] [--json]\n vapi pay --resume <receipt-id> [--json]\n vapi check <url> [--method <method>] [--json]\n vapi balance [--account <name>] [--json]\n vapi receipts [--limit <n>] [--account <name>] [--all-wallets] [--json]\n vapi receipts export --format <json|csv> [--range <24h|7d|30d>] [--account <name>] [--all-wallets]\n vapi stats [--range <24h|7d|30d>] [--account <name>] [--all-wallets] [--json]\n vapi sweep [<address>] [--network <caip2>] [--account <name>] [--json]\n vapi agent create <name> --model <id> --instructions <file> [--call-budget <usd>] [--max-per-call <usd>] [--router-budget <usd>] [--approve-above <usd>] [--max-per-task <usd>] [--auto-release-below <usd>] [--include-unverified] [--max-steps <n>] [--yes] [--json]\n vapi agent run <name> \"<task>\" [--budget <usd>] [--detach] [--runtime local] [--result-file <path>] [--json]\n vapi agent run --bundle-env <VAR> (\"<task>\" | --task-base64url <text>) [--budget <usd>] [--result-file <path>] [--json]\n vapi agent list [--json]\n vapi agent show <name> [--json]\n vapi agent pause <name> [--json]\n vapi agent resume <name> [--json]\n vapi agent revoke <name> [--json]\n vapi login [--account <name>] [--label <name>] [--publish] [--no-browser] [--json]\n vapi logout [--account <name>] [--json]\n vapi whoami [--account <name>] [--json]\n vapi router models [--account <name>] [--json]\n vapi router usage [--account <name>] [--json]\n vapi router chat --model <id> [--system <text>] [--max-tokens <n>] \"<prompt>\" [--account <name>] [--json]\n vapi router buy <1|5|20|50> [--account <name>] [--json]\n vapi router buy --auto <1|5|20|50> --below <usd> [--account <name>] [--json]\n vapi router buy --auto off [--account <name>] [--json]\n vapi router key [--rotate] [--account <name>] [--json]\n vapi stake status [--account <name>] [--json]\n vapi stake open [--account <name>] [--no-browser] [--json]\n vapi task search [--open] [--min <usd>] [--tab trending|new|closing|paid] [--limit <n>] [--json]\n vapi task show <id> [--account <name>] [--json]\n vapi task post --title <text> --brief <file|-> --amount <usd> --deadline <duration|ISO> [--intake proposals|submissions] [--max-awards <k>] [--webhook <https-url>] [--account <name>] [--json]\n vapi task propose <id> --price <usd> --duration <duration> --note <text> [--account <name>] [--json]\n vapi task submit <id> --proof <https-url> [--proof <https-url>...] [--file <path>...] [--account <name>] [--json]\n vapi task award <id> <proposalId> [--account <name>] [--json]\n vapi task sign <id> [--account <name>] [--json]\n vapi task fund <id> [--yes] [--account <name>] [--json]\n vapi task deliver <id> --files <path...> --note <text> [--account <name>] [--json]\n vapi task release <id> [--account <name>] [--json]\n vapi task refund <id> [--account <name>] [--json]\n vapi task dispute <id> --evidence-hash <0x + 64 hex> [--account <name>] [--json]\n vapi task message <id> <text> [--account <name>] [--json]\n vapi task thread <id> [--after <cursor>] [--account <name>] [--json]\n vapi task watch <id> [--until <state>] [--auto-release] [--timeout 7d] [--interval 5s] [--account <name>] [--json]\n vapi task status <id> [--account <name>] [--json]\n vapi export-key [--network <caip2>] [--account <name>] [--json]\n vapi backup [--account <name>] [--cloud [off]] [--json]\n vapi restore [--from-owner [--owner <0x\u2026>]] [--json]\n vapi import (--phrase | --key) [--account <name>] [--networks <base,arc,solana>] [--replace] [--force] [--json]\n vapi passphrase [--account <name>] [--json]\n vapi vault protect [--json]\n vapi vault unprotect [--json]\n vapi vault lock [--json]\n vapi vault unlock [--json]\n vapi vault status [--json]\n vapi unlock [--account <name>] [--json]\n vapi lock [--account <name> | --all] [--json]\n vapi report \"<what happened>\" [--include-addresses] [--send] [--json]\n vapi auth set-key [--json]\n vapi auth status [--json]\n vapi auth clear [--json]\n vapi publish <url> [--method <method>] [--mode <origin|endpoint|openapi>] [--name <text>] [--description <text>] [--category <ai|data|crypto|compute|search>] [--select <names>] [--account <name>] [--yes] [--resume] [--json]\n vapi publish activate <slug> [--json]\n vapi publish verify-request <slug> [--json]\n vapi publish list [--json]\n vapi claim <origin> [--account <name>] [--json]\n vapi mcp [--account <name>] [--json]\n vapi mcp install <claude|cursor|codex> [--home <dir>] [--registry <url>] [--json]\n vapi serve [--json]\n vapi version [--json]\n vapi help [--json]\n\nEvery command that touches a wallet takes `--account <name>`, falls back to `VAPI_WALLET`, then to the default account set by `vapi accounts use`, and names the wallet it used on its first line.\n\n`vapi search` answers with vAPI-verified listings plus the mirrored external catalogs. `--include-unverified` also returns self-listed APIs that passed vAPI's automated x402 probe but were never reviewed; every result is tagged `[verified]`, `[requested]`, `[unverified]` or `[external]`.\n\n`vapi docs` asks the public vAPI documentation assistant; `vapi docs search` searches documentation excerpts and `vapi docs read` reads one Markdown page. They need no account, wallet or payment.\n\n`vapi task --help` lists task options and availability. Task exit codes: 0 ok, 1 error, 2 policy refusal (JSON ok:false with a policy. reason) or invalid usage (JSON error), 3 approval needed in non-interactive mode. Posting moves no money; the current create-order contract does not store amount, deadline, intake, max awards or webhook yet.\n\n`vapi check <url>` grades an x402 API's 402 without paying: status, transport, declared version and its required fields, the exact scheme, canonical USDC, payTo, maxTimeoutSeconds, advertised extensions, and the origin's /.well-known/x402. It looks for OpenAPI beside the checked path, at /openapi.json, then through same-origin service-desc links in /.well-known/api-catalog. No wallet, no payment, no registry call. It exits 1 when a rule fails. A 402 that answers with Stripe/Tempo's MPP challenge (WWW-Authenticate: Payment) is recognised and reported as transport mpp; vapi pay cannot pay it.\n\n`vapi pay --resume <receipt-id>` answers the one question a lost response leaves: did that payment settle? It reads the signed authorization's state on-chain \u2014 settled, expired, or still pending \u2014 and never pays.\n\n`vapi fund` opens the funding page: card via Coinbase (needs a Coinbase account; US guest checkout), send from MetaMask/Coinbase Wallet/WalletConnect, or bridge from another chain.\n\n`vapi vault protect` adds a password to the device vault. `vapi vault unlock` opens it on this device for 8 hours; for unattended use, set `VAPI_VAULT_PASSWORD`. `vapi unlock` and `vapi lock` remain aliases for one release.\n\n`vapi backup` and `vapi export-key` print a secret, so they run only on a real terminal, never for an agent, and ask you to type the wallet name first. `vapi backup --cloud` keeps an encrypted vault copy that only the owner can approve for recovery. `vapi restore` rebuilds the vault from the phrase and re-derives accounts until an unused address. Set `VAPI_NO_SECRETS=1` to switch exports off entirely. Every export and every wallet change is logged to ~/.vapi/audit.log.\n\n`vapi publish <url>` lists an API you own. vAPI probes the URL \u2014 an origin, one endpoint, or an OpenAPI document \u2014 you choose which endpoints to list, and your wallet signs one line naming where the payouts go. Listing is permissionless: a listing that passed the probe goes live with `vapi publish activate <slug>`, and `vapi publish verify-request <slug>` asks for the review that puts it in the default search. Deploying the FeeSplitter that receives the payouts is a wallet transaction and stays in the console. A catalog of more than 20 endpoints is listed as several listings of up to 20, with one result line per endpoint; `--resume` skips every endpoint this key already lists.\n\n`vapi claim <origin>` takes ownership of the listings vAPI indexed from your API. The wallet their payments go to signs one line, `Claim the vAPI Call listings served from <origin>`; the listings stay paid directly to that wallet, and `vapi publish list` shows them.\n\n`vapi auth set-key` types the registry API key once, on a terminal, into the same OS secret store as the passphrase. A key is a secret: it is never an argument, `VAPI_API_KEY` is the route for CI, and no agent or MCP tool can reach it.\n\nWith no command, vapi shows the status screen; vapi help prints this text. The MCP server starts only with `vapi mcp`; `vapi mcp install <app>` writes that app's MCP config and prints the file it touched.";
6
10
  export type CliIo = {
7
11
  stdout(message: string): void;
8
12
  stderr(message: string): void;
@@ -26,6 +30,13 @@ export type CliDependencies = {
26
30
  stdinIsTTY?: boolean;
27
31
  /** The environment this run sees: wallet selection and agent detection. */
28
32
  env?: NodeJS.ProcessEnv;
33
+ /**
34
+ * Runtime adapter selection, injected so CLI tests never spawn real children.
35
+ * A `vapi swarm run --runtime railway` start passes its request as well.
36
+ */
37
+ runtime?: (kind: RuntimeKind, home: string, request?: RuntimeRequest) => Runtime;
38
+ /** The `railway` CLI executor, injected so tests never run the real binary. */
39
+ railwayExec?: RailwayExec;
29
40
  /** The OS secret store `vapi unlock` and `vapi lock` act on. */
30
41
  secretStore?: SecretStore;
31
42
  /** Injected clock, so a signed message is reproducible in a test. */
@@ -48,6 +59,8 @@ export type CliDependencies = {
48
59
  ownerStake?: typeof ownerStake;
49
60
  routerCredentials?: typeof routerCredentials;
50
61
  };
62
+ /** Task transport and chain seams for deterministic commands. */
63
+ tasks?: TasksCommandDependencies;
51
64
  /** Status-screen deadlines, injected so timeout behavior is deterministic in tests. */
52
65
  status?: {
53
66
  timeoutMs?: number;
@@ -84,8 +97,13 @@ export type CliDependencies = {
84
97
  };
85
98
  /** Distribution seams, injected so CLI tests never sign or relay live transfers. */
86
99
  distribute?: Pick<DistributeArgs, "balanceReader" | "siblingsReader" | "transfer" | "authorizationState" | "randomId" | "randomNonce" | "timeoutMs" | "lockTimeoutMs">;
100
+ /** Swarm capital seams, injected so CLI tests never sign or relay live transfers. */
101
+ swarm?: Pick<SwarmCapitalDeps, "balanceReader" | "transfer" | "authorizationState" | "addressReader" | "randomId" | "randomNonce" | "unlock" | "timeoutMs" | "lockTimeoutMs"> & {
102
+ runSwarm?: typeof runSwarm;
103
+ };
87
104
  /** Automatic ceiling sweep seams for status and short-lived paid calls. */
88
105
  ceiling?: {
106
+ sweepAboveCeiling?: typeof sweepAboveCeiling;
89
107
  sweepAllAboveCeiling?: typeof import("@vapi-network/core").sweepAllAboveCeiling;
90
108
  drainCeilingSweeps?: typeof drainCeilingSweeps;
91
109
  balanceReader?: CeilingBalanceReader;
@@ -150,6 +168,9 @@ export declare function requireSecretsAllowed(dependencies: CliDependencies, eve
150
168
  export declare function confirmWalletName(name: string, prompt: string, refusal: string, dependencies: CliDependencies): Promise<void>;
151
169
  /** Run one CLI invocation and return its process exit code. */
152
170
  export declare function runCli(argv?: string[], io?: CliIo, dependencies?: CliDependencies): Promise<number>;
171
+ export declare function redactDetachedRunValue<T>(value: T, environment: NodeJS.ProcessEnv): T;
172
+ export declare function shouldAutoUploadBackup(args: readonly string[]): boolean;
173
+ export declare function shouldAutoUploadAfterFailure(args: readonly string[]): boolean;
153
174
  /**
154
175
  * Creates another wallet on this machine, with the same custody notice and
155
176
  * the same one-time phrase as `vapi init`.
@@ -170,6 +191,11 @@ export declare function baseUsdcBalanceReader(config: VapiConfig, dependencies:
170
191
  * prefix alike. A hand-edited discovery URL falls back to the shipped default.
171
192
  */
172
193
  export declare function registryBaseUrl(config: VapiConfig): string;
194
+ /** The device vault key, read the one way every CLI key export reads it. */
195
+ export declare function deviceVaultKey(store: Pick<WalletStore, "home">, dependencies: CliDependencies): Promise<{
196
+ path: string;
197
+ key: Uint8Array;
198
+ }>;
173
199
  /** Loads the config and reports any retired registry URL it had to repair. */
174
200
  export declare function readConfig(path: string, io: CliIo): Promise<VapiConfig>;
175
201
  export declare function output(io: CliIo, json: boolean, value: unknown, human: string): void;