@vapi-network/mcp 0.3.0 → 0.7.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 +49 -5
- package/dist/actions/call.d.ts +453 -0
- package/dist/actions/context.d.ts +44 -0
- package/dist/actions/define.d.ts +16 -0
- package/dist/actions/policy.d.ts +17 -0
- package/dist/actions/register.d.ts +342 -0
- package/dist/agent/deps.d.ts +18 -0
- package/dist/agent/guards.d.ts +21 -0
- package/dist/agent/run.d.ts +108 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8101 -1563
- package/dist/index.js.map +3 -3
- package/dist/server.d.ts +20 -5
- package/dist/tools/accounts.d.ts +148 -0
- package/dist/tools/auth.d.ts +83 -0
- package/dist/tools/call.d.ts +9 -1
- package/dist/tools/inspect.d.ts +12 -1
- package/dist/tools/router.d.ts +135 -0
- package/dist/tools/siblings.d.ts +70 -0
- package/dist/tools/status.d.ts +116 -0
- package/dist/wallet-session.d.ts +21 -25
- package/dist/x402.d.ts +2 -0
- package/package.json +1 -1
package/dist/wallet-session.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type SecretStore, type SpendCaps, type VapiPaymentAccount, type WalletName, type WalletStore } from "@vapi-network/core";
|
|
2
2
|
import type { WalletAddresses } from "./tools/wallet.js";
|
|
3
|
-
/** The
|
|
3
|
+
/** The account one tool call acts on. `path` is absent on a single-account home. */
|
|
4
4
|
export type SessionWallet = {
|
|
5
5
|
name: WalletName;
|
|
6
|
-
/** The keystore
|
|
6
|
+
/** The legacy keystore path, when this machine has an account store. */
|
|
7
7
|
path?: string;
|
|
8
8
|
};
|
|
9
9
|
/** One row of `wallet.list`, before balances are read. */
|
|
@@ -13,24 +13,22 @@ export type SessionWalletInfo = {
|
|
|
13
13
|
solanaAddress?: string;
|
|
14
14
|
label?: string;
|
|
15
15
|
isDefault: boolean;
|
|
16
|
-
/** Whether this is the
|
|
16
|
+
/** Whether this is the account the session currently pays from. */
|
|
17
17
|
isActive: boolean;
|
|
18
18
|
spendCaps?: SpendCaps;
|
|
19
19
|
};
|
|
20
20
|
export type WalletSessionOptions = {
|
|
21
|
-
/** The
|
|
21
|
+
/** The account opened before stdio was connected, for a store-less home. */
|
|
22
22
|
account: VapiPaymentAccount;
|
|
23
|
-
/** The
|
|
23
|
+
/** The accounts on this machine. Without it the session has exactly one. */
|
|
24
24
|
store?: WalletStore | undefined;
|
|
25
25
|
/** The name the session starts on, before `VAPI_WALLET` and the default. */
|
|
26
26
|
wallet?: string | undefined;
|
|
27
27
|
env?: NodeJS.ProcessEnv | undefined;
|
|
28
28
|
/**
|
|
29
|
-
* The passphrase a
|
|
30
|
-
* `VAPI_KEYSTORE_PASSWORD` nor the OS secret store has one.
|
|
31
|
-
* over what it read at startup
|
|
32
|
-
* terminal — so switching wallets never needs a prompt on a stdout that
|
|
33
|
-
* belongs to MCP frames.
|
|
29
|
+
* The passphrase for a legacy 0.5 keystore that has not been migrated yet,
|
|
30
|
+
* used when neither `VAPI_KEYSTORE_PASSWORD` nor the OS secret store has one.
|
|
31
|
+
* The CLI hands over what it read at startup, so MCP stdout is never prompted.
|
|
34
32
|
*/
|
|
35
33
|
passphrase?: (() => string | Promise<string>) | undefined;
|
|
36
34
|
/** The OS secret store to read `vapi unlock` entries from. */
|
|
@@ -38,49 +36,47 @@ export type WalletSessionOptions = {
|
|
|
38
36
|
now?: (() => Date) | undefined;
|
|
39
37
|
};
|
|
40
38
|
/**
|
|
41
|
-
* Which
|
|
39
|
+
* Which account an MCP session pays from, for the lifetime of the process.
|
|
42
40
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* passphrase at all, because the wallet store can read a keystore's addresses
|
|
48
|
-
* without opening it. Only a payment unlocks a key, once, for that one call.
|
|
41
|
+
* `wallet.use` is memory-only. The account tools may derive an account or lower
|
|
42
|
+
* its caps in `wallets.json`, but this package never renames, removes, backs up
|
|
43
|
+
* or exports one. Reads — addresses, balances, network accounts, funding links
|
|
44
|
+
* — need no passphrase or opened vault. Only signing operations open a signer.
|
|
49
45
|
*/
|
|
50
46
|
export declare class WalletSession {
|
|
51
47
|
#private;
|
|
52
48
|
private readonly options;
|
|
53
49
|
constructor(options: WalletSessionOptions);
|
|
54
|
-
/** The
|
|
50
|
+
/** The account the next tool call uses when it names none. */
|
|
55
51
|
get activeName(): WalletName | undefined;
|
|
56
52
|
get store(): WalletStore | undefined;
|
|
57
53
|
/** The home the audit log lives in, honouring `VAPI_HOME`. */
|
|
58
54
|
get home(): string;
|
|
59
55
|
/**
|
|
60
|
-
* An explicit name first, then the session's active
|
|
56
|
+
* An explicit name first, then the session's active account — which already
|
|
61
57
|
* absorbed `VAPI_WALLET` and the registry default when the session started.
|
|
62
58
|
*/
|
|
63
59
|
resolve(name?: string): SessionWallet;
|
|
64
|
-
/** The addresses of
|
|
60
|
+
/** The addresses of an account, read from the vault or a legacy keystore header. */
|
|
65
61
|
addressesFor(name?: string): Promise<{
|
|
66
62
|
wallet: SessionWallet;
|
|
67
63
|
} & WalletAddresses>;
|
|
68
64
|
/**
|
|
69
|
-
* The
|
|
65
|
+
* The signer for one payment, plus the caps of that account. Nothing
|
|
70
66
|
* here is cached: the account is created for this call and dropped with it,
|
|
71
|
-
* so switching
|
|
67
|
+
* so switching accounts mid-session pays from the account that was asked for.
|
|
72
68
|
*/
|
|
73
69
|
payment(name?: string): Promise<{
|
|
74
70
|
wallet: SessionWallet;
|
|
75
71
|
account: VapiPaymentAccount;
|
|
76
72
|
spendCaps?: SpendCaps;
|
|
77
73
|
}>;
|
|
78
|
-
/** Every
|
|
74
|
+
/** Every account this machine knows, with the session's own marker on one. */
|
|
79
75
|
list(): Promise<SessionWalletInfo[]>;
|
|
80
76
|
/**
|
|
81
|
-
* Points the session at another
|
|
77
|
+
* Points the session at another account. Memory only: the human's default in
|
|
82
78
|
* `wallets.json` is not touched, so the next `vapi` command in their terminal
|
|
83
|
-
* still uses the
|
|
79
|
+
* still uses the account they chose. The switch is audited, because the account
|
|
84
80
|
* an agent pays from changed.
|
|
85
81
|
*/
|
|
86
82
|
use(name: string): Promise<{
|
package/dist/x402.d.ts
CHANGED