@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/dist/server.d.ts CHANGED
@@ -1,9 +1,13 @@
1
1
  import { type SecretStore, type VapiPaymentAccount, type VapiConfig, type WalletStore } from "@vapi-network/core";
2
2
  import { z } from "zod";
3
3
  import { callService, type CallToolInput, type CallToolResult } from "./tools/call.js";
4
+ import { type AccountsToolOverrides } from "./tools/accounts.js";
5
+ import { type AuthAgentLinkOverrides } from "./tools/auth.js";
6
+ import { type RouterCoreOverrides } from "./tools/router.js";
7
+ import { type StatusCoreOverrides } from "./tools/status.js";
4
8
  export { callService, type CallToolInput, type CallToolResult };
5
9
  export type VapiServerOptions = {
6
- /** The wallet unlocked before stdio was connected. */
10
+ /** The account opened before stdio was connected. */
7
11
  account: VapiPaymentAccount;
8
12
  config: VapiConfig;
9
13
  fetchImpl?: typeof fetch;
@@ -11,15 +15,23 @@ export type VapiServerOptions = {
11
15
  receiptsPath?: string;
12
16
  searchesPath?: string;
13
17
  reportsDirectory?: string;
14
- /** The wallets on this machine. Without it the server has exactly one. */
18
+ /** The accounts on this machine. Without it the server has exactly one. */
15
19
  store?: WalletStore | undefined;
16
- /** The wallet the session starts on; `VAPI_WALLET` and the default follow. */
20
+ /** The account the session starts on; `VAPI_WALLET` and the default follow. */
17
21
  wallet?: string | undefined;
18
22
  env?: NodeJS.ProcessEnv | undefined;
19
- /** The passphrase a payment unlocks with; see `WalletSession`. */
23
+ /** The passphrase for a legacy 0.5 keystore that has not been migrated yet. */
20
24
  passphrase?: (() => string | Promise<string>) | undefined;
21
- /** The OS secret store `vapi unlock` writes to; see `WalletSession`. */
25
+ /** The OS secret store used by the vault and any legacy keystore entries. */
22
26
  secretStore?: SecretStore | undefined;
27
+ /** Device-link functions and API base overridden by deterministic tests. */
28
+ agentLink?: AuthAgentLinkOverrides | undefined;
29
+ /** Core Router functions overridden by deterministic tests. */
30
+ router?: RouterCoreOverrides | undefined;
31
+ /** Status probes and clock overridden by deterministic tests. */
32
+ status?: StatusCoreOverrides | undefined;
33
+ /** Account-link functions, device identity and clock overridden by deterministic tests. */
34
+ accounts?: AccountsToolOverrides | undefined;
23
35
  };
24
36
  type ToolResult = {
25
37
  isError?: boolean;
@@ -33,6 +45,7 @@ type ToolDefinition<Shape extends z.ZodRawShape> = {
33
45
  description?: string;
34
46
  deprecatedReplacement?: string;
35
47
  inputSchema: Shape;
48
+ strictInput?: boolean;
36
49
  outputSchema?: z.ZodType;
37
50
  };
38
51
  type ListedTool = {
@@ -44,6 +57,7 @@ type ListedTool = {
44
57
  /** Minimal MCP server implementation for stdio and deterministic in-memory tests. */
45
58
  export declare class VapiMcpServer {
46
59
  #private;
60
+ constructor(onClose?: () => void);
47
61
  registerTool<Shape extends z.ZodRawShape>(name: string, definition: ToolDefinition<Shape>, handler: (input: z.infer<z.ZodObject<Shape>>) => Promise<ToolResult>): void;
48
62
  listTools(): Promise<{
49
63
  tools: ListedTool[];
@@ -79,4 +93,5 @@ export declare function loadServerConfig(): Promise<{
79
93
  marketplaceDiscoveryUrl: string;
80
94
  }[] | undefined;
81
95
  allowPrivateNetwork?: boolean | undefined;
96
+ device?: string | undefined;
82
97
  }>;
@@ -0,0 +1,148 @@
1
+ import { type AddAccountArgs, type SecretStore, type TransferArgs, type WalletStore } from "@vapi-network/core";
2
+ import { z } from "zod";
3
+ import type { WalletSession } from "../wallet-session.js";
4
+ export declare const accountsAddTool: {
5
+ description: string;
6
+ strictInput: boolean;
7
+ inputSchema: {
8
+ name: z.ZodString;
9
+ caps: z.ZodOptional<z.ZodObject<{
10
+ perCallUsd: z.ZodOptional<z.ZodNumber>;
11
+ perDayUsd: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>>;
13
+ routerAllowanceUsd: z.ZodOptional<z.ZodNumber>;
14
+ link: z.ZodOptional<z.ZodBoolean>;
15
+ };
16
+ outputSchema: z.ZodObject<{
17
+ account: z.ZodString;
18
+ address: z.ZodString;
19
+ caps: z.ZodObject<{
20
+ perCallUsd: z.ZodString;
21
+ perDayUsd: z.ZodString;
22
+ }, z.core.$strip>;
23
+ created: z.ZodBoolean;
24
+ linked: z.ZodBoolean;
25
+ autoApproved: z.ZodBoolean;
26
+ link: z.ZodOptional<z.ZodObject<{
27
+ userCode: z.ZodString;
28
+ verificationUri: z.ZodURL;
29
+ verificationUriComplete: z.ZodURL;
30
+ expiresInSeconds: z.ZodNumber;
31
+ }, z.core.$strip>>;
32
+ message: z.ZodString;
33
+ }, z.core.$strip>;
34
+ };
35
+ export declare const accountsCapsTool: {
36
+ description: string;
37
+ strictInput: boolean;
38
+ inputSchema: {
39
+ name: z.ZodString;
40
+ perCallUsd: z.ZodOptional<z.ZodNumber>;
41
+ perDayUsd: z.ZodOptional<z.ZodNumber>;
42
+ ceilingUsd: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"off">]>>;
43
+ };
44
+ outputSchema: z.ZodObject<{
45
+ account: z.ZodString;
46
+ address: z.ZodString;
47
+ caps: z.ZodObject<{
48
+ perCallUsd: z.ZodString;
49
+ perDayUsd: z.ZodString;
50
+ ceilingUsd: z.ZodString;
51
+ }, z.core.$strip>;
52
+ message: z.ZodString;
53
+ }, z.core.$strip>;
54
+ };
55
+ export declare const accountsSendTool: {
56
+ description: string;
57
+ strictInput: boolean;
58
+ inputSchema: {
59
+ from: z.ZodString;
60
+ to: z.ZodString;
61
+ amountUsd: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
62
+ network: z.ZodOptional<z.ZodEnum<{
63
+ base: "base";
64
+ arc: "arc";
65
+ }>>;
66
+ };
67
+ outputSchema: z.ZodObject<{
68
+ status: z.ZodEnum<{
69
+ unknown: "unknown";
70
+ sent: "sent";
71
+ }>;
72
+ from: z.ZodString;
73
+ to: z.ZodString;
74
+ toName: z.ZodString;
75
+ toKind: z.ZodEnum<{
76
+ account: "account";
77
+ owner: "owner";
78
+ }>;
79
+ amountUsd: z.ZodString;
80
+ amountAtomic: z.ZodString;
81
+ network: z.ZodEnum<{
82
+ "eip155:8453": "eip155:8453";
83
+ "eip155:5042": "eip155:5042";
84
+ }>;
85
+ txHash: z.ZodNullable<z.ZodString>;
86
+ nonce: z.ZodString;
87
+ replayed: z.ZodBoolean;
88
+ message: z.ZodString;
89
+ }, z.core.$strip>;
90
+ };
91
+ export type AccountsToolOverrides = {
92
+ configPath?: string | undefined;
93
+ hostname?: string | undefined;
94
+ now?: (() => number) | undefined;
95
+ sleep?: AddAccountArgs["sleep"];
96
+ startDeviceLink?: AddAccountArgs["startDeviceLink"];
97
+ pollDeviceLink?: AddAccountArgs["pollDeviceLink"];
98
+ saveAgentLink?: AddAccountArgs["saveAgentLink"];
99
+ scopes?: AddAccountArgs["scopes"];
100
+ nonce?: TransferArgs["nonce"];
101
+ };
102
+ export type AccountsToolsOptions = AccountsToolOverrides & {
103
+ session: WalletSession;
104
+ secrets: SecretStore;
105
+ wallets?: WalletStore | undefined;
106
+ fetchImpl: typeof fetch;
107
+ apiBase: string;
108
+ env?: NodeJS.ProcessEnv | undefined;
109
+ signal?: AbortSignal | undefined;
110
+ };
111
+ type ToolResult = {
112
+ structuredContent: Record<string, unknown>;
113
+ content: Array<{
114
+ type: "text";
115
+ text: string;
116
+ }>;
117
+ } | {
118
+ isError: true;
119
+ content: Array<{
120
+ type: "text";
121
+ text: string;
122
+ }>;
123
+ };
124
+ /** Account mutation tools. Link credentials and the device code stay inside core. */
125
+ export declare function createAccountsTools(options: AccountsToolsOptions): {
126
+ add(input: {
127
+ name: string;
128
+ caps?: {
129
+ perCallUsd?: number;
130
+ perDayUsd?: number;
131
+ };
132
+ routerAllowanceUsd?: number;
133
+ link?: boolean;
134
+ }): Promise<ToolResult>;
135
+ caps(input: {
136
+ name: string;
137
+ perCallUsd?: number;
138
+ perDayUsd?: number;
139
+ ceilingUsd?: number | "off";
140
+ }): Promise<ToolResult>;
141
+ send(input: {
142
+ from: string;
143
+ to: string;
144
+ amountUsd: string | number;
145
+ network?: "base" | "arc";
146
+ }): Promise<ToolResult>;
147
+ };
148
+ export {};
@@ -0,0 +1,83 @@
1
+ import type { SecretStore, WalletStore } from "@vapi-network/core";
2
+ import { pollDeviceLink, saveAgentLink, startDeviceLink } from "@vapi-network/core/agent-link";
3
+ import { z } from "zod";
4
+ import type { WalletSession } from "../wallet-session.js";
5
+ export declare const authStatusTool: {
6
+ description: string;
7
+ inputSchema: {
8
+ wallet: z.ZodOptional<z.ZodString>;
9
+ };
10
+ outputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
11
+ linked: z.ZodLiteral<false>;
12
+ wallet: z.ZodString;
13
+ address: z.ZodString;
14
+ pending: z.ZodOptional<z.ZodObject<{
15
+ userCode: z.ZodString;
16
+ verificationUriComplete: z.ZodURL;
17
+ expiresAt: z.ZodISODateTime;
18
+ }, z.core.$strip>>;
19
+ lastError: z.ZodOptional<z.ZodString>;
20
+ }, z.core.$strip>, z.ZodObject<{
21
+ linked: z.ZodLiteral<true>;
22
+ owner: z.ZodString;
23
+ label: z.ZodString;
24
+ scopes: z.ZodArray<z.ZodString>;
25
+ linkedAt: z.ZodISODateTime;
26
+ router: z.ZodBoolean;
27
+ wallet: z.ZodString;
28
+ address: z.ZodString;
29
+ pending: z.ZodOptional<z.ZodObject<{
30
+ userCode: z.ZodString;
31
+ verificationUriComplete: z.ZodURL;
32
+ expiresAt: z.ZodISODateTime;
33
+ }, z.core.$strip>>;
34
+ lastError: z.ZodOptional<z.ZodString>;
35
+ }, z.core.$strip>], "linked">;
36
+ };
37
+ export declare const authLinkTool: {
38
+ description: string;
39
+ inputSchema: {
40
+ label: z.ZodOptional<z.ZodString>;
41
+ account: z.ZodOptional<z.ZodString>;
42
+ };
43
+ outputSchema: z.ZodObject<{
44
+ wallet: z.ZodString;
45
+ address: z.ZodString;
46
+ userCode: z.ZodString;
47
+ verificationUriComplete: z.ZodURL;
48
+ expiresAt: z.ZodISODateTime;
49
+ }, z.core.$strip>;
50
+ };
51
+ export type AuthAgentLinkOverrides = {
52
+ apiBase?: string | undefined;
53
+ startDeviceLink?: typeof startDeviceLink | undefined;
54
+ pollDeviceLink?: typeof pollDeviceLink | undefined;
55
+ saveAgentLink?: typeof saveAgentLink | undefined;
56
+ now?: (() => number) | undefined;
57
+ };
58
+ export type AuthToolsOptions = AuthAgentLinkOverrides & {
59
+ session: WalletSession;
60
+ secrets: SecretStore;
61
+ wallets?: WalletStore | undefined;
62
+ fetchImpl: typeof fetch;
63
+ apiBase: string;
64
+ };
65
+ type ToolResult = {
66
+ isError?: boolean;
67
+ structuredContent?: Record<string, unknown>;
68
+ content: Array<{
69
+ type: "text";
70
+ text: string;
71
+ }>;
72
+ };
73
+ /** One server instance's link state. No device code or token crosses the tool boundary. */
74
+ export declare function createAuthTools(options: AuthToolsOptions): {
75
+ link(input: {
76
+ label?: string;
77
+ account?: string;
78
+ }): Promise<ToolResult>;
79
+ status(input: {
80
+ wallet?: string;
81
+ }): Promise<ToolResult>;
82
+ };
83
+ export {};
@@ -1,4 +1,4 @@
1
- import { type LookupFn, type MarketplaceHit, type SpendCaps, type VapiPaymentAccount, type VapiConfig, type WalletName } from "@vapi-network/core";
1
+ import { type ListingVerification, type LookupFn, type MarketplaceHit, type CeilingSweepHook, type SpendCaps, type VapiPaymentAccount, type VapiConfig, type WalletName } from "@vapi-network/core";
2
2
  export type CallToolInput = {
3
3
  id?: string;
4
4
  url?: string;
@@ -16,6 +16,7 @@ export type PossibleSettlement = {
16
16
  amountAtomic: string;
17
17
  payTo: string;
18
18
  payer: string;
19
+ paymentId?: string;
19
20
  authorizationNonce?: string;
20
21
  authorizationExpiresAt?: string;
21
22
  authorizationTransaction?: string;
@@ -43,6 +44,11 @@ export declare class VapiCallError extends Error {
43
44
  export type CallToolResult = {
44
45
  status: number;
45
46
  body: unknown;
47
+ /**
48
+ * How far the paid listing got through vAPI review. Absent when there was no
49
+ * listing to disclose — a call made against an explicit URL.
50
+ */
51
+ verification?: ListingVerification;
46
52
  outcome?: "signed_in";
47
53
  payment: null | {
48
54
  network: string;
@@ -74,5 +80,7 @@ export type CallServiceArgs = {
74
80
  now?: Date;
75
81
  nowMs?: () => number;
76
82
  timeoutMs?: number;
83
+ /** Best-effort account ceiling enforcement after decisive settlement. */
84
+ ceilingSweep?: CeilingSweepHook | false;
77
85
  };
78
86
  export declare function callService(args: CallServiceArgs): Promise<CallToolResult>;
@@ -1,4 +1,4 @@
1
- import { type DiscoveryEndpoint, type ListingFee, type ListingGroup, type VapiConfig } from "@vapi-network/core";
1
+ import { type DiscoveryEndpoint, type ListingConformance, type ListingFee, type ListingGroup, type ListingIdentity, type ListingLiveness, type ListingVerification, type VapiConfig } from "@vapi-network/core";
2
2
  export type InspectToolInput = {
3
3
  id: string;
4
4
  endpoint?: string;
@@ -9,6 +9,17 @@ export type InspectToolResult = Omit<Pick<DiscoveryEndpoint, "name" | "method" |
9
9
  /** Registry-owned listing disclosures; absent when the registry omits them. */
10
10
  group?: ListingGroup;
11
11
  fee?: ListingFee;
12
+ /**
13
+ * How far the listing got through vAPI review. Reads as `none` for a registry
14
+ * that predates the tier, and for every mirrored external row.
15
+ */
16
+ verification: ListingVerification;
17
+ /** Seven days of the registry's hourly re-probe; absent when it sends none. */
18
+ liveness?: ListingLiveness;
19
+ /** How closely the listing's 402 follows its declared x402 version. */
20
+ conformance?: ListingConformance;
21
+ /** ERC-8004 agent identity on Base, when the registry has read one. */
22
+ identity?: ListingIdentity;
12
23
  payment: DiscoveryEndpoint["payment"] | null;
13
24
  };
14
25
  export declare function inspectService(input: InspectToolInput, config: VapiConfig, fetchImpl?: typeof fetch): Promise<InspectToolResult>;
@@ -0,0 +1,135 @@
1
+ import type { SecretStore, VapiConfig, VapiPaymentAccount, WalletStore } from "@vapi-network/core";
2
+ import { buyRouterBalance, listRouterModels, ownerStake, routerChat, routerUsage } from "@vapi-network/core/router-client";
3
+ import { z } from "zod";
4
+ import type { WalletSession } from "../wallet-session.js";
5
+ declare const routerChatInputSchema: z.ZodObject<{
6
+ wallet: z.ZodOptional<z.ZodString>;
7
+ model: z.ZodString;
8
+ messages: z.ZodArray<z.ZodObject<{
9
+ role: z.ZodEnum<{
10
+ system: "system";
11
+ user: "user";
12
+ assistant: "assistant";
13
+ }>;
14
+ content: z.ZodString;
15
+ }, z.core.$strict>>;
16
+ max_tokens: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$strict>;
18
+ declare const routerBuyInputSchema: z.ZodObject<{
19
+ wallet: z.ZodOptional<z.ZodString>;
20
+ usd: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<5>, z.ZodLiteral<20>, z.ZodLiteral<50>]>;
21
+ }, z.core.$strict>;
22
+ export declare const routerModelsTool: {
23
+ description: string;
24
+ inputSchema: {};
25
+ outputSchema: z.ZodObject<{
26
+ models: z.ZodArray<z.ZodString>;
27
+ }, z.core.$strip>;
28
+ };
29
+ export declare const routerUsageTool: {
30
+ description: string;
31
+ inputSchema: {
32
+ wallet: z.ZodOptional<z.ZodString>;
33
+ };
34
+ outputSchema: z.ZodObject<{
35
+ stake: z.ZodObject<{
36
+ owner: z.ZodString;
37
+ stake: z.ZodString;
38
+ computeTodayUsd: z.ZodNumber;
39
+ }, z.core.$strip>;
40
+ compute: z.ZodObject<{
41
+ allowanceUsd: z.ZodNumber;
42
+ spentTodayUsd: z.ZodNumber;
43
+ remainingTodayUsd: z.ZodNumber;
44
+ resetsAt: z.ZodString;
45
+ ownerLimitUsd: z.ZodNumber;
46
+ ownerSpentUsd: z.ZodNumber;
47
+ }, z.core.$strip>;
48
+ balance: z.ZodNullable<z.ZodObject<{
49
+ purchasedUsd: z.ZodNumber;
50
+ spentUsd: z.ZodNumber;
51
+ remainingUsd: z.ZodNumber;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>;
54
+ };
55
+ export declare const routerChatTool: {
56
+ description: string;
57
+ inputSchema: {
58
+ wallet: z.ZodOptional<z.ZodString>;
59
+ model: z.ZodString;
60
+ messages: z.ZodArray<z.ZodObject<{
61
+ role: z.ZodEnum<{
62
+ system: "system";
63
+ user: "user";
64
+ assistant: "assistant";
65
+ }>;
66
+ content: z.ZodString;
67
+ }, z.core.$strict>>;
68
+ max_tokens: z.ZodOptional<z.ZodNumber>;
69
+ };
70
+ strictInput: boolean;
71
+ outputSchema: z.ZodObject<{
72
+ content: z.ZodNullable<z.ZodString>;
73
+ model: z.ZodString;
74
+ usage: z.ZodOptional<z.ZodObject<{
75
+ prompt_tokens: z.ZodNumber;
76
+ completion_tokens: z.ZodNumber;
77
+ total_tokens: z.ZodNumber;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ };
81
+ export declare const routerBuyTool: {
82
+ description: string;
83
+ inputSchema: {
84
+ wallet: z.ZodOptional<z.ZodString>;
85
+ usd: z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<5>, z.ZodLiteral<20>, z.ZodLiteral<50>]>;
86
+ };
87
+ strictInput: boolean;
88
+ outputSchema: z.ZodObject<{
89
+ receipt: z.ZodObject<{
90
+ id: z.ZodString;
91
+ amountUsd: z.ZodNumber;
92
+ network: z.ZodString;
93
+ transaction: z.ZodOptional<z.ZodString>;
94
+ }, z.core.$strip>;
95
+ balance: z.ZodNullable<z.ZodObject<{
96
+ purchasedUsd: z.ZodNumber;
97
+ spentUsd: z.ZodNumber;
98
+ remainingUsd: z.ZodNumber;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>;
101
+ };
102
+ export type RouterCoreOverrides = {
103
+ listRouterModels?: typeof listRouterModels | undefined;
104
+ routerUsage?: typeof routerUsage | undefined;
105
+ routerChat?: typeof routerChat | undefined;
106
+ ownerStake?: typeof ownerStake | undefined;
107
+ buyRouterBalance?: typeof buyRouterBalance | undefined;
108
+ };
109
+ export type RouterToolsOptions = RouterCoreOverrides & {
110
+ session: WalletSession;
111
+ secrets: SecretStore;
112
+ wallets?: WalletStore | undefined;
113
+ fetchImpl: typeof fetch;
114
+ apiBase: string;
115
+ account: VapiPaymentAccount;
116
+ config: VapiConfig;
117
+ ledgerPath?: string | undefined;
118
+ receiptsPath?: string | undefined;
119
+ };
120
+ type ToolResult = {
121
+ structuredContent: Record<string, unknown>;
122
+ content: Array<{
123
+ type: "text";
124
+ text: string;
125
+ }>;
126
+ };
127
+ export declare function createRouterTools(options: RouterToolsOptions): {
128
+ models(input: Record<string, never>): Promise<ToolResult>;
129
+ usage(input: {
130
+ wallet?: string;
131
+ }): Promise<ToolResult>;
132
+ chat(input: z.infer<typeof routerChatInputSchema>): Promise<ToolResult>;
133
+ buy(input: z.infer<typeof routerBuyInputSchema>): Promise<ToolResult>;
134
+ };
135
+ export {};
@@ -0,0 +1,70 @@
1
+ import { type SecretStore, type WalletStore } from "@vapi-network/core";
2
+ import { z } from "zod";
3
+ declare const siblingsOutputSchema: z.ZodObject<{
4
+ owner: z.ZodNullable<z.ZodString>;
5
+ siblings: z.ZodArray<z.ZodObject<{
6
+ name: z.ZodString;
7
+ address: z.ZodString;
8
+ device: z.ZodNullable<z.ZodString>;
9
+ status: z.ZodEnum<{
10
+ active: "active";
11
+ revoked: "revoked";
12
+ }>;
13
+ allowance: z.ZodObject<{
14
+ routerPerDayUsd: z.ZodNullable<z.ZodNumber>;
15
+ perCallUsd: z.ZodNullable<z.ZodNumber>;
16
+ perDayUsd: z.ZodNullable<z.ZodNumber>;
17
+ }, z.core.$strip>;
18
+ self: z.ZodBoolean;
19
+ onThisDevice: z.ZodBoolean;
20
+ }, z.core.$strip>>;
21
+ note: z.ZodOptional<z.ZodString>;
22
+ }, z.core.$strip>;
23
+ export declare const vapiSiblingsTool: {
24
+ description: string;
25
+ inputSchema: {
26
+ account: z.ZodOptional<z.ZodString>;
27
+ };
28
+ outputSchema: z.ZodObject<{
29
+ owner: z.ZodNullable<z.ZodString>;
30
+ siblings: z.ZodArray<z.ZodObject<{
31
+ name: z.ZodString;
32
+ address: z.ZodString;
33
+ device: z.ZodNullable<z.ZodString>;
34
+ status: z.ZodEnum<{
35
+ active: "active";
36
+ revoked: "revoked";
37
+ }>;
38
+ allowance: z.ZodObject<{
39
+ routerPerDayUsd: z.ZodNullable<z.ZodNumber>;
40
+ perCallUsd: z.ZodNullable<z.ZodNumber>;
41
+ perDayUsd: z.ZodNullable<z.ZodNumber>;
42
+ }, z.core.$strip>;
43
+ self: z.ZodBoolean;
44
+ onThisDevice: z.ZodBoolean;
45
+ }, z.core.$strip>>;
46
+ note: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>;
48
+ };
49
+ type ToolResult = {
50
+ structuredContent: z.infer<typeof siblingsOutputSchema>;
51
+ content: Array<{
52
+ type: "text";
53
+ text: string;
54
+ }>;
55
+ } | {
56
+ isError: true;
57
+ content: Array<{
58
+ type: "text";
59
+ text: string;
60
+ }>;
61
+ };
62
+ export declare function createSiblingsTool(options: {
63
+ wallets?: WalletStore | undefined;
64
+ secrets: SecretStore;
65
+ fetchImpl: typeof fetch;
66
+ now?: (() => Date) | undefined;
67
+ }): (input: {
68
+ account?: string;
69
+ }) => Promise<ToolResult>;
70
+ export {};
@@ -0,0 +1,116 @@
1
+ import { type SecretStore, type StatusDeps, type VapiConfig, type WalletStore } from "@vapi-network/core";
2
+ import { routerUsage } from "@vapi-network/core/router-client";
3
+ import { z } from "zod";
4
+ export declare const vapiStatusTool: {
5
+ description: string;
6
+ inputSchema: {};
7
+ outputSchema: z.ZodObject<{
8
+ version: z.ZodString;
9
+ home: z.ZodString;
10
+ registry: z.ZodString;
11
+ owner: z.ZodOptional<z.ZodObject<{
12
+ address: z.ZodString;
13
+ linked: z.ZodBoolean;
14
+ console: z.ZodString;
15
+ }, z.core.$strip>>;
16
+ vault: z.ZodObject<{
17
+ exists: z.ZodBoolean;
18
+ unlocked: z.ZodBoolean;
19
+ store: z.ZodString;
20
+ protected: z.ZodBoolean;
21
+ }, z.core.$strip>;
22
+ accounts: z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ default: z.ZodBoolean;
25
+ address: z.ZodString;
26
+ usdc: z.ZodOptional<z.ZodString>;
27
+ routerTodayUsd: z.ZodOptional<z.ZodString>;
28
+ routerAllowanceUsd: z.ZodOptional<z.ZodString>;
29
+ caps: z.ZodObject<{
30
+ perCallUsd: z.ZodString;
31
+ perDayUsd: z.ZodString;
32
+ ceilingUsd: z.ZodString;
33
+ ceilingFloorUsd: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strip>;
35
+ link: z.ZodEnum<{
36
+ unknown: "unknown";
37
+ paused: "paused";
38
+ active: "active";
39
+ not_linked: "not_linked";
40
+ revoked: "revoked";
41
+ }>;
42
+ }, z.core.$strip>>;
43
+ unfinishedMovements: z.ZodArray<z.ZodObject<{
44
+ id: z.ZodString;
45
+ from: z.ZodString;
46
+ network: z.ZodString;
47
+ createdAt: z.ZodString;
48
+ pendingLegs: z.ZodNumber;
49
+ unknownLegs: z.ZodNumber;
50
+ }, z.core.$strip>>;
51
+ next: z.ZodArray<z.ZodString>;
52
+ }, z.core.$strip>;
53
+ };
54
+ export declare const vapiAccountsTool: {
55
+ description: string;
56
+ inputSchema: {};
57
+ outputSchema: z.ZodObject<{
58
+ accounts: z.ZodArray<z.ZodObject<{
59
+ name: z.ZodString;
60
+ default: z.ZodBoolean;
61
+ address: z.ZodString;
62
+ usdc: z.ZodOptional<z.ZodString>;
63
+ routerTodayUsd: z.ZodOptional<z.ZodString>;
64
+ routerAllowanceUsd: z.ZodOptional<z.ZodString>;
65
+ caps: z.ZodObject<{
66
+ perCallUsd: z.ZodString;
67
+ perDayUsd: z.ZodString;
68
+ ceilingUsd: z.ZodString;
69
+ ceilingFloorUsd: z.ZodOptional<z.ZodString>;
70
+ }, z.core.$strip>;
71
+ link: z.ZodEnum<{
72
+ unknown: "unknown";
73
+ paused: "paused";
74
+ active: "active";
75
+ not_linked: "not_linked";
76
+ revoked: "revoked";
77
+ }>;
78
+ }, z.core.$strip>>;
79
+ }, z.core.$strip>;
80
+ };
81
+ export type StatusCoreOverrides = {
82
+ usdcBalance?: StatusDeps["chain"]["usdcBalance"] | undefined;
83
+ routerUsage?: StatusDeps["agents"]["routerUsage"] | undefined;
84
+ linkStatus?: StatusDeps["agents"]["linkStatus"] | undefined;
85
+ timeoutMs?: number | undefined;
86
+ now?: (() => Date) | undefined;
87
+ };
88
+ export type StatusToolsOptions = StatusCoreOverrides & {
89
+ version: string;
90
+ home: string;
91
+ registry: string;
92
+ wallets?: WalletStore | undefined;
93
+ secrets: SecretStore;
94
+ env?: NodeJS.ProcessEnv | undefined;
95
+ fetchImpl: typeof fetch;
96
+ config: VapiConfig;
97
+ routerClientUsage?: typeof routerUsage | undefined;
98
+ };
99
+ type StatusToolResult = {
100
+ structuredContent: Record<string, unknown>;
101
+ content: Array<{
102
+ type: "text";
103
+ text: string;
104
+ }>;
105
+ } | {
106
+ isError: true;
107
+ content: Array<{
108
+ type: "text";
109
+ text: string;
110
+ }>;
111
+ };
112
+ export declare function createStatusTools(options: StatusToolsOptions): {
113
+ status(input: Record<string, never>): Promise<StatusToolResult>;
114
+ accounts(input: Record<string, never>): Promise<StatusToolResult>;
115
+ };
116
+ export {};