@vapi-network/mcp 0.5.0 → 0.8.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
@@ -2,13 +2,67 @@
2
2
 
3
3
  The stdio MCP server behind `vapi mcp`: namespaced tools that let an agent
4
4
  search the vAPI catalogue, read a listing's request contract, pay an x402 API
5
- from a local wallet, and read balances and receipts. It never creates, renames,
6
- removes, backs up or exports a wallet, and no tool of its returns a recovery
7
- phrase, a private key or a passphrase.
5
+ from a local wallet, read paid origins during an agent run, and read balances, receipts and the status screen
6
+ (`vapi.status`, `vapi.accounts`, `vapi.siblings`). It can derive an account and lower its caps,
7
+ but it never renames, removes, backs up or exports one, and no tool returns a
8
+ recovery phrase, private key or passphrase.
8
9
 
9
10
  One entry point, `@vapi-network/mcp`, exporting `createVapiServer`,
10
11
  `startStdioServer`, `loadServerConfig`, `WalletSession` and the individual
11
12
  `callService`, `inspectService`, `searchMarketplace` and `getWallet` tools.
12
13
 
13
- See the [root README](https://github.com/vAPI-Network/vapi-network#readme) for
14
- the editor configuration, the full tool table and the deprecated aliases.
14
+ ## Exports
15
+
16
+ ### Runtime exports
17
+
18
+ | Name | What it is | Since |
19
+ | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
20
+ | `buildSIWxProof` | function (args: { signer: SIWxSigner; challenge: SIWxChallenge; responseUrl: string; }): unknown | 0.5.0 or earlier |
21
+ | `callService` | function (args: CallServiceArgs): Promise<CallToolResult> | 0.5.0 or earlier |
22
+ | `callRead` | action `call.read`: GET an HTTPS URL from an origin paid in the current agent run; SIWX sign-in is allowed, but it never pays | 0.8.0 |
23
+ | `createAgentRunDeps` | function (input: { profile: AgentProfile; config: VapiConfig; home: string; account: VapiPaymentAccount; wallet: WalletName; spendCaps: SpendCaps; chat: (req: ChatRequest) => Promise<ChatResult>; approve: RunAgentDeps["approve"]; onEvent?: (event: AgentEven... | 0.5.0 or earlier |
24
+ | `createVapiServer` | function (options: VapiServerOptions): unknown | 0.5.0 or earlier |
25
+ | `decidePayment` | function (input: { ref: string; priceUsd: number \| null; verification: string; seenRefs: ReadonlySet<string>; verifiedOnly: boolean; approveAboveUsd: number; maxPerCallUsd: number; }): PayDecision | 0.5.0 or earlier |
26
+ | `getWallet` | function (account: Address \| WalletAddresses \| VapiPaymentAccount, config: VapiConfig, options: { fetchImpl?: typeof fetch; lookup?: LookupFn } = {}): Promise<{ address: Address; balances: WalletBalance[] }> | 0.5.0 or earlier |
27
+ | `inspectService` | function (input: InspectToolInput, config: VapiConfig, fetchImpl?: typeof fetch): Promise<InspectToolResult> | 0.5.0 or earlier |
28
+ | `loadServerConfig` | function (): unknown | 0.5.0 or earlier |
29
+ | `parseSIWxResponse` | function (response: Response, configuredNetworks: VapiConfig["networks"], responseUrl: string, requiredNetwork?: string): Promise<SIWxChallenge \| null> | 0.5.0 or earlier |
30
+ | `readPaidOrigin` | function (args: { url; paidOrigins; account; config; fetchImpl?; lookup?; timeoutMs? }): Promise<CallReadOutput> | 0.8.0 |
31
+ | `resolveServiceEndpoint` | function (id: string, config: VapiRegistryConfig, fetchImpl?: Fetch, endpointName?: string): Promise<DiscoveryEndpoint> | 0.5.0 or earlier |
32
+ | `resolveServiceListing` | function (id: string, config: VapiRegistryConfig, fetchImpl?: Fetch, endpointName?: string): Promise<ResolvedListing> | 0.5.0 or earlier |
33
+ | `runAgent` | function (task: string, deps: RunAgentDeps): Promise<RunAgentResult> | 0.5.0 or earlier |
34
+ | `searchMarketplace` | function (input: MarketplaceSearchInput, config: VapiRegistryConfig, fetchImpl?: Fetch, options?: MarketplaceSearchOptions): Promise<MarketplaceDiscoveryPage> | 0.5.0 or earlier |
35
+ | `startStdioServer` | function (options: VapiServerOptions): unknown | 0.5.0 or earlier |
36
+ | `UNTRUSTED_NOTICE` | constant UNTRUSTED_NOTICE: string | 0.5.0 or earlier |
37
+ | `WalletSession` | class WalletSession | 0.5.0 or earlier |
38
+ | `wrapUntrusted` | function (tool: string, value: unknown): string | 0.5.0 or earlier |
39
+
40
+ ### Types
41
+
42
+ | Name | What it is | Since |
43
+ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
44
+ | `AgentEvent` | type AgentEvent = \| { type: "step"; n: number } \| { type: "tool"; name: string; summary: string } \| { type: "paid"; ref: string; amountUsd: number; network: string } \| { type: "declined"; ref: string; reason: string } \| { type: "stopped"; reason: "finished"... | 0.5.0 or earlier |
45
+ | `CallToolInput` | type CallToolInput = { id?: string; url?: string; method?: string; endpoint?: string; body?: unknown; maxPriceUsd?: number \| string; network?: string; expectedPayTo?: string; contentType?: string; } | 0.5.0 or earlier |
46
+ | `CallToolResult` | type CallToolResult = { status: number; body: unknown; verification?: ListingVerification; outcome?: "signed_in"; payment: null \| { network: string; amountAtomic: string; amountUsd: string; asset: string; payTo: string; settlement: unknown \| null; proof: st... | 0.5.0 or earlier |
47
+ | `CallReadInput` | type CallReadInput = { url: string } | 0.8.0 |
48
+ | `CallReadOutput` | type CallReadOutput = { status: number; contentType: string \| null; body: unknown } | 0.8.0 |
49
+ | `InspectToolInput` | type InspectToolInput = { id: string; endpoint?: string; } | 0.5.0 or earlier |
50
+ | `InspectToolResult` | type InspectToolResult = Omit< Pick< DiscoveryEndpoint, \| "name" \| "method" \| "url" \| "price" \| "description" \| "operationId" \| "requestContentType" \| "requestSchema" \| "responseContentType" >, "method" > & { method: string \| null; network?: string; group?:... | 0.5.0 or earlier |
51
+ | `MarketplaceSearchInput` | type MarketplaceSearchInput = { query?: string; kinds?: MarketplaceKind[]; network?: string; limit?: number; cursor?: string; includeUnverified?: boolean; } | 0.5.0 or earlier |
52
+ | `PayDecision` | type PayDecision = { action: "pay" } \| { action: "ask"; reason: string } \| { action: "refuse"; reason: string } | 0.5.0 or earlier |
53
+ | `RunAgentDeps` | type RunAgentDeps = { profile: AgentProfile; config: VapiConfig; home: string; chat: (req: ChatRequest) => Promise<ChatResult>; search: (q: { query: string; network?: string; includeUnverified: boolean }) => Promise< Array<{ ref: string; name: string; price... | 0.5.0 or earlier |
54
+ | `RunAgentResult` | type RunAgentResult = { answer: string \| null; stoppedBecause: AgentEvent & { type: "stopped" }; paidUsd: number; steps: number; } | 0.5.0 or earlier |
55
+ | `SessionWallet` | type SessionWallet = { name: WalletName; path?: string; } | 0.5.0 or earlier |
56
+ | `SessionWalletInfo` | type SessionWalletInfo = { name: WalletName; address?: string; solanaAddress?: string; label?: string; isDefault: boolean; isActive: boolean; spendCaps?: SpendCaps; } | 0.5.0 or earlier |
57
+ | `VapiServerOptions` | type VapiServerOptions = { account: VapiPaymentAccount; config: VapiConfig; fetchImpl?: typeof fetch; ledgerPath?: string; receiptsPath?: string; searchesPath?: string; reportsDirectory?: string; store?: WalletStore \| undefined; wallet?: string \| undefined; status?: StatusCoreOverrides;... | 0.5.0 or earlier |
58
+ | `WalletAddresses` | type WalletAddresses = { address: Address; solana?: { address: string } \| undefined; } | 0.5.0 or earlier |
59
+ | `WalletBalance` | type WalletBalance = { network: string; name: string; usdcAtomic: string \| null; usdc: string \| null; error?: string; } | 0.5.0 or earlier |
60
+ | `WalletSessionOptions` | type WalletSessionOptions = { account: VapiPaymentAccount; store?: WalletStore \| undefined; wallet?: string \| undefined; env?: NodeJS.ProcessEnv \| undefined; passphrase?: (() => string \| Promise<string>) \| undefined; secretStore?: SecretStore \| undefined; n... | 0.5.0 or earlier |
61
+
62
+ See the [root README](https://github.com/vAPI-Network/vapi-network/blob/main/docs/mcp.md) for the editor configuration, the full tool table and the deprecated aliases.
63
+
64
+ `call.read` is available to agent runs with the `read` grant. It only sends
65
+ GET requests to HTTPS origins that the same agent paid in the current run,
66
+ follows guarded redirects, and never makes another payment. A 402 may be
67
+ retried once with a SIWX sign-in proof bound to that origin. The MCP surface
68
+ lists the tool for schema alignment, but calls outside an agent run are refused.
@@ -0,0 +1,53 @@
1
+ import { z } from "zod";
2
+ export declare const accountsSendInputSchema: z.ZodObject<{
3
+ from: z.ZodString;
4
+ to: z.ZodString;
5
+ amountUsd: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
6
+ network: z.ZodOptional<z.ZodEnum<{
7
+ base: "base";
8
+ arc: "arc";
9
+ }>>;
10
+ }, z.core.$strip>;
11
+ export type AccountsSendInput = z.infer<typeof accountsSendInputSchema>;
12
+ export declare const accountsSendOutputSchema: z.ZodObject<{
13
+ status: z.ZodEnum<{
14
+ unknown: "unknown";
15
+ sent: "sent";
16
+ }>;
17
+ from: z.ZodString;
18
+ to: z.ZodString;
19
+ toName: z.ZodString;
20
+ toKind: z.ZodEnum<{
21
+ account: "account";
22
+ owner: "owner";
23
+ }>;
24
+ amountUsd: z.ZodString;
25
+ amountAtomic: z.ZodString;
26
+ network: z.ZodEnum<{
27
+ "eip155:8453": "eip155:8453";
28
+ "eip155:5042": "eip155:5042";
29
+ }>;
30
+ txHash: z.ZodNullable<z.ZodString>;
31
+ nonce: z.ZodString;
32
+ replayed: z.ZodBoolean;
33
+ message: z.ZodString;
34
+ }, z.core.$strip>;
35
+ export declare const accountsSend: import("./define.js").Action<{
36
+ from: string;
37
+ to: string;
38
+ amountUsd: string | number;
39
+ network?: "base" | "arc" | undefined;
40
+ }, {
41
+ status: "unknown" | "sent";
42
+ from: string;
43
+ to: string;
44
+ toName: string;
45
+ toKind: "account" | "owner";
46
+ amountUsd: string;
47
+ amountAtomic: string;
48
+ network: "eip155:8453" | "eip155:5042";
49
+ txHash: string | null;
50
+ nonce: string;
51
+ replayed: boolean;
52
+ message: string;
53
+ }>;
@@ -0,0 +1,28 @@
1
+ import { type LookupFn, type VapiConfig, type VapiPaymentAccount } from "@vapi-network/core";
2
+ import { z } from "zod";
3
+ export declare const callReadInputSchema: z.ZodObject<{
4
+ url: z.ZodString;
5
+ }, z.core.$strip>;
6
+ export declare const callReadOutputSchema: z.ZodObject<{
7
+ status: z.ZodNumber;
8
+ contentType: z.ZodNullable<z.ZodString>;
9
+ body: z.ZodUnknown;
10
+ }, z.core.$strip>;
11
+ export type CallReadInput = z.infer<typeof callReadInputSchema>;
12
+ export type CallReadOutput = z.infer<typeof callReadOutputSchema>;
13
+ export declare const callRead: import("./define.js").Action<{
14
+ url: string;
15
+ }, {
16
+ status: number;
17
+ contentType: string | null;
18
+ body: unknown;
19
+ }>;
20
+ export declare function readPaidOrigin(args: {
21
+ url: string;
22
+ paidOrigins: ReadonlySet<string>;
23
+ account: VapiPaymentAccount;
24
+ config: VapiConfig;
25
+ fetchImpl?: typeof fetch;
26
+ lookup?: LookupFn;
27
+ timeoutMs?: number;
28
+ }): Promise<CallReadOutput>;
@@ -0,0 +1,458 @@
1
+ import { type CeilingSweepHook, type RunBudget, type RunRef, type SpendCaps, type VapiConfig, type VapiPaymentAccount } from "@vapi-network/core";
2
+ import { z } from "zod";
3
+ import { type CallToolResult } from "../tools/call.js";
4
+ import { type CallPort } from "./context.js";
5
+ export declare const MAX_CACHED_MARKETPLACE_REFS = 200;
6
+ export declare const walletArgument: {
7
+ wallet: z.ZodOptional<z.ZodString>;
8
+ };
9
+ export declare const callToolResultSchema: z.ZodObject<{
10
+ wallet: z.ZodString;
11
+ status: z.ZodNumber;
12
+ body: z.ZodUnknown;
13
+ resourceUrl: z.ZodOptional<z.ZodURL>;
14
+ verification: z.ZodOptional<z.ZodEnum<{
15
+ none: "none";
16
+ requested: "requested";
17
+ verified: "verified";
18
+ }>>;
19
+ payment: z.ZodNullable<z.ZodObject<{
20
+ network: z.ZodString;
21
+ amountAtomic: z.ZodString;
22
+ amountUsd: z.ZodString;
23
+ asset: z.ZodString;
24
+ payTo: z.ZodString;
25
+ settlement: z.ZodNullable<z.ZodUnknown>;
26
+ proof: z.ZodNullable<z.ZodString>;
27
+ }, z.core.$strip>>;
28
+ outcome: z.ZodOptional<z.ZodLiteral<"signed_in">>;
29
+ expectedRequest: z.ZodOptional<z.ZodObject<{
30
+ contentType: z.ZodOptional<z.ZodString>;
31
+ schema: z.ZodOptional<z.ZodUnknown>;
32
+ }, z.core.$strip>>;
33
+ }, z.core.$strip>;
34
+ export declare const inspectToolResultSchema: z.ZodObject<{
35
+ name: z.ZodString;
36
+ method: z.ZodNullable<z.ZodString>;
37
+ url: z.ZodURL;
38
+ price: z.ZodString;
39
+ description: z.ZodString;
40
+ operationId: z.ZodOptional<z.ZodString>;
41
+ requestContentType: z.ZodOptional<z.ZodString>;
42
+ requestSchema: z.ZodOptional<z.ZodUnknown>;
43
+ responseContentType: z.ZodOptional<z.ZodString>;
44
+ network: z.ZodOptional<z.ZodString>;
45
+ group: z.ZodOptional<z.ZodEnum<{
46
+ external: "external";
47
+ vapi: "vapi";
48
+ partner: "partner";
49
+ added: "added";
50
+ }>>;
51
+ fee: z.ZodOptional<z.ZodObject<{
52
+ bps: z.ZodNumber;
53
+ label: z.ZodString;
54
+ }, z.core.$loose>>;
55
+ verification: z.ZodEnum<{
56
+ none: "none";
57
+ requested: "requested";
58
+ verified: "verified";
59
+ }>;
60
+ liveness: z.ZodOptional<z.ZodObject<{
61
+ uptime7d: z.ZodNumber;
62
+ latencyP50Ms: z.ZodNullable<z.ZodNumber>;
63
+ latencyP95Ms: z.ZodNullable<z.ZodNumber>;
64
+ checks7d: z.ZodNumber;
65
+ }, z.core.$loose>>;
66
+ conformance: z.ZodOptional<z.ZodObject<{
67
+ declaredVersion: z.ZodNullable<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>]>>;
68
+ versionConformant: z.ZodBoolean;
69
+ offerTransport: z.ZodEnum<{
70
+ body: "body";
71
+ header: "header";
72
+ both: "both";
73
+ }>;
74
+ issues: z.ZodArray<z.ZodString>;
75
+ }, z.core.$loose>>;
76
+ identity: z.ZodOptional<z.ZodObject<{
77
+ erc8004Id: z.ZodString;
78
+ reputation: z.ZodCatch<z.ZodOptional<z.ZodObject<{
79
+ score: z.ZodNumber;
80
+ count: z.ZodNumber;
81
+ }, z.core.$loose>>>;
82
+ }, z.core.$loose>>;
83
+ payment: z.ZodNullable<z.ZodObject<{
84
+ scheme: z.ZodLiteral<"exact">;
85
+ network: z.ZodString;
86
+ asset: z.ZodString;
87
+ payTo: z.ZodString;
88
+ checkedAt: z.ZodString;
89
+ }, z.core.$strip>>;
90
+ }, z.core.$strip>;
91
+ export declare const callSearchInputSchema: z.ZodObject<{
92
+ query: z.ZodOptional<z.ZodString>;
93
+ kinds: z.ZodOptional<z.ZodArray<z.ZodEnum<{
94
+ api: "api";
95
+ service_offer: "service_offer";
96
+ open_request: "open_request";
97
+ }>>>;
98
+ network: z.ZodOptional<z.ZodString>;
99
+ limit: z.ZodOptional<z.ZodNumber>;
100
+ cursor: z.ZodOptional<z.ZodString>;
101
+ includeUnverified: z.ZodOptional<z.ZodBoolean>;
102
+ }, z.core.$strip>;
103
+ export declare const callInspectInputSchema: z.ZodObject<{
104
+ id: z.ZodString;
105
+ endpoint: z.ZodOptional<z.ZodString>;
106
+ }, z.core.$strip>;
107
+ export declare const callPayInputSchema: z.ZodObject<{
108
+ id: z.ZodOptional<z.ZodString>;
109
+ url: z.ZodOptional<z.ZodURL>;
110
+ method: z.ZodOptional<z.ZodString>;
111
+ endpoint: z.ZodOptional<z.ZodString>;
112
+ body: z.ZodOptional<z.ZodUnknown>;
113
+ contentType: z.ZodOptional<z.ZodString>;
114
+ network: z.ZodOptional<z.ZodString>;
115
+ expectedPayTo: z.ZodOptional<z.ZodString>;
116
+ maxPriceUsd: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
117
+ wallet: z.ZodOptional<z.ZodString>;
118
+ }, z.core.$strip>;
119
+ export declare const callSearch: import("./define.js").Action<{
120
+ query?: string | undefined;
121
+ kinds?: ("api" | "service_offer" | "open_request")[] | undefined;
122
+ network?: string | undefined;
123
+ limit?: number | undefined;
124
+ cursor?: string | undefined;
125
+ includeUnverified?: boolean | undefined;
126
+ }, {
127
+ [x: string]: unknown;
128
+ protocol: "vapi.marketplace.discovery/1";
129
+ items: ({
130
+ [x: string]: unknown;
131
+ kind: "api";
132
+ provenance: "self_listed" | "partner";
133
+ execution: {
134
+ [x: string]: unknown;
135
+ mode: "direct" | "gateway";
136
+ };
137
+ action: {
138
+ [x: string]: unknown;
139
+ type: "invoke_api";
140
+ href: string;
141
+ };
142
+ verification: "none" | "requested" | "verified";
143
+ ref: string;
144
+ card: {
145
+ [x: string]: unknown;
146
+ title: string;
147
+ summary: string;
148
+ badges: {
149
+ [x: string]: unknown;
150
+ code: "partner" | "live_x402" | "payout_wallet_confirmed" | "vapi_verified" | "external_catalog" | "approved_vendor";
151
+ label: string;
152
+ }[];
153
+ facts: {
154
+ [x: string]: unknown;
155
+ label: string;
156
+ value: string;
157
+ }[];
158
+ byline?: string | undefined;
159
+ bylineHref?: string | undefined;
160
+ };
161
+ group?: "partner" | "external" | "vapi" | "added" | undefined;
162
+ fee?: {
163
+ [x: string]: unknown;
164
+ bps: number;
165
+ label: string;
166
+ } | undefined;
167
+ liveness?: {
168
+ [x: string]: unknown;
169
+ uptime7d: number;
170
+ latencyP50Ms: number | null;
171
+ latencyP95Ms: number | null;
172
+ checks7d: number;
173
+ } | undefined;
174
+ conformance?: {
175
+ [x: string]: unknown;
176
+ declaredVersion: 1 | 2 | null;
177
+ versionConformant: boolean;
178
+ offerTransport: "body" | "header" | "both";
179
+ issues: string[];
180
+ } | undefined;
181
+ identity?: {
182
+ [x: string]: unknown;
183
+ erc8004Id: string;
184
+ reputation?: {
185
+ [x: string]: unknown;
186
+ score: number;
187
+ count: number;
188
+ } | undefined;
189
+ } | undefined;
190
+ } | {
191
+ [x: string]: unknown;
192
+ kind: "api";
193
+ provenance: "indexed";
194
+ execution: {
195
+ [x: string]: unknown;
196
+ mode: "direct";
197
+ url: string;
198
+ method: "HEAD" | "POST" | "GET" | "PUT" | "PATCH" | "DELETE" | null;
199
+ network: string;
200
+ };
201
+ action: {
202
+ [x: string]: unknown;
203
+ type: "invoke_api";
204
+ href: string;
205
+ };
206
+ verification: "none" | "requested" | "verified";
207
+ ref: string;
208
+ card: {
209
+ [x: string]: unknown;
210
+ title: string;
211
+ summary: string;
212
+ badges: {
213
+ [x: string]: unknown;
214
+ code: "partner" | "live_x402" | "payout_wallet_confirmed" | "vapi_verified" | "external_catalog" | "approved_vendor";
215
+ label: string;
216
+ }[];
217
+ facts: {
218
+ [x: string]: unknown;
219
+ label: string;
220
+ value: string;
221
+ }[];
222
+ byline?: string | undefined;
223
+ bylineHref?: string | undefined;
224
+ };
225
+ group?: "partner" | "external" | "vapi" | "added" | undefined;
226
+ fee?: {
227
+ [x: string]: unknown;
228
+ bps: number;
229
+ label: string;
230
+ } | undefined;
231
+ liveness?: {
232
+ [x: string]: unknown;
233
+ uptime7d: number;
234
+ latencyP50Ms: number | null;
235
+ latencyP95Ms: number | null;
236
+ checks7d: number;
237
+ } | undefined;
238
+ conformance?: {
239
+ [x: string]: unknown;
240
+ declaredVersion: 1 | 2 | null;
241
+ versionConformant: boolean;
242
+ offerTransport: "body" | "header" | "both";
243
+ issues: string[];
244
+ } | undefined;
245
+ identity?: {
246
+ [x: string]: unknown;
247
+ erc8004Id: string;
248
+ reputation?: {
249
+ [x: string]: unknown;
250
+ score: number;
251
+ count: number;
252
+ } | undefined;
253
+ } | undefined;
254
+ } | {
255
+ [x: string]: unknown;
256
+ kind: "service_offer";
257
+ action: {
258
+ [x: string]: unknown;
259
+ type: "start_engagement";
260
+ href: string;
261
+ };
262
+ verification: "none" | "requested" | "verified";
263
+ ref: string;
264
+ card: {
265
+ [x: string]: unknown;
266
+ title: string;
267
+ summary: string;
268
+ badges: {
269
+ [x: string]: unknown;
270
+ code: "partner" | "live_x402" | "payout_wallet_confirmed" | "vapi_verified" | "external_catalog" | "approved_vendor";
271
+ label: string;
272
+ }[];
273
+ facts: {
274
+ [x: string]: unknown;
275
+ label: string;
276
+ value: string;
277
+ }[];
278
+ byline?: string | undefined;
279
+ bylineHref?: string | undefined;
280
+ };
281
+ group?: "partner" | "external" | "vapi" | "added" | undefined;
282
+ fee?: {
283
+ [x: string]: unknown;
284
+ bps: number;
285
+ label: string;
286
+ } | undefined;
287
+ liveness?: {
288
+ [x: string]: unknown;
289
+ uptime7d: number;
290
+ latencyP50Ms: number | null;
291
+ latencyP95Ms: number | null;
292
+ checks7d: number;
293
+ } | undefined;
294
+ conformance?: {
295
+ [x: string]: unknown;
296
+ declaredVersion: 1 | 2 | null;
297
+ versionConformant: boolean;
298
+ offerTransport: "body" | "header" | "both";
299
+ issues: string[];
300
+ } | undefined;
301
+ identity?: {
302
+ [x: string]: unknown;
303
+ erc8004Id: string;
304
+ reputation?: {
305
+ [x: string]: unknown;
306
+ score: number;
307
+ count: number;
308
+ } | undefined;
309
+ } | undefined;
310
+ } | {
311
+ [x: string]: unknown;
312
+ kind: "open_request";
313
+ action: {
314
+ [x: string]: unknown;
315
+ type: "propose_to_request";
316
+ href: string;
317
+ };
318
+ verification: "none" | "requested" | "verified";
319
+ ref: string;
320
+ card: {
321
+ [x: string]: unknown;
322
+ title: string;
323
+ summary: string;
324
+ badges: {
325
+ [x: string]: unknown;
326
+ code: "partner" | "live_x402" | "payout_wallet_confirmed" | "vapi_verified" | "external_catalog" | "approved_vendor";
327
+ label: string;
328
+ }[];
329
+ facts: {
330
+ [x: string]: unknown;
331
+ label: string;
332
+ value: string;
333
+ }[];
334
+ byline?: string | undefined;
335
+ bylineHref?: string | undefined;
336
+ };
337
+ group?: "partner" | "external" | "vapi" | "added" | undefined;
338
+ fee?: {
339
+ [x: string]: unknown;
340
+ bps: number;
341
+ label: string;
342
+ } | undefined;
343
+ liveness?: {
344
+ [x: string]: unknown;
345
+ uptime7d: number;
346
+ latencyP50Ms: number | null;
347
+ latencyP95Ms: number | null;
348
+ checks7d: number;
349
+ } | undefined;
350
+ conformance?: {
351
+ [x: string]: unknown;
352
+ declaredVersion: 1 | 2 | null;
353
+ versionConformant: boolean;
354
+ offerTransport: "body" | "header" | "both";
355
+ issues: string[];
356
+ } | undefined;
357
+ identity?: {
358
+ [x: string]: unknown;
359
+ erc8004Id: string;
360
+ reputation?: {
361
+ [x: string]: unknown;
362
+ score: number;
363
+ count: number;
364
+ } | undefined;
365
+ } | undefined;
366
+ })[];
367
+ nextCursor: string | null;
368
+ unavailableKinds: ("api" | "service_offer" | "open_request")[];
369
+ rankingVersion: "marketplace-ranking-v1";
370
+ }>;
371
+ export declare const callInspect: import("./define.js").Action<{
372
+ id: string;
373
+ endpoint?: string | undefined;
374
+ }, {
375
+ name: string;
376
+ method: string | null;
377
+ url: string;
378
+ price: string;
379
+ description: string;
380
+ verification: "none" | "requested" | "verified";
381
+ payment: {
382
+ scheme: "exact";
383
+ network: string;
384
+ asset: string;
385
+ payTo: string;
386
+ checkedAt: string;
387
+ } | null;
388
+ operationId?: string | undefined;
389
+ requestContentType?: string | undefined;
390
+ requestSchema?: unknown;
391
+ responseContentType?: string | undefined;
392
+ network?: string | undefined;
393
+ group?: "partner" | "external" | "vapi" | "added" | undefined;
394
+ fee?: {
395
+ [x: string]: unknown;
396
+ bps: number;
397
+ label: string;
398
+ } | undefined;
399
+ liveness?: {
400
+ [x: string]: unknown;
401
+ uptime7d: number;
402
+ latencyP50Ms: number | null;
403
+ latencyP95Ms: number | null;
404
+ checks7d: number;
405
+ } | undefined;
406
+ conformance?: {
407
+ [x: string]: unknown;
408
+ declaredVersion: 1 | 2 | null;
409
+ versionConformant: boolean;
410
+ offerTransport: "body" | "header" | "both";
411
+ issues: string[];
412
+ } | undefined;
413
+ identity?: {
414
+ [x: string]: unknown;
415
+ erc8004Id: string;
416
+ reputation?: {
417
+ [x: string]: unknown;
418
+ score: number;
419
+ count: number;
420
+ } | undefined;
421
+ } | undefined;
422
+ }>;
423
+ export declare const callPay: import("./define.js").Action<{
424
+ id?: string | undefined;
425
+ url?: string | undefined;
426
+ method?: string | undefined;
427
+ endpoint?: string | undefined;
428
+ body?: unknown;
429
+ contentType?: string | undefined;
430
+ network?: string | undefined;
431
+ expectedPayTo?: string | undefined;
432
+ maxPriceUsd?: string | number | undefined;
433
+ wallet?: string | undefined;
434
+ }, {
435
+ wallet: string;
436
+ } & CallToolResult>;
437
+ export type PaymentResolution = {
438
+ account: VapiPaymentAccount;
439
+ wallet: string;
440
+ runBudget?: RunBudget;
441
+ run?: RunRef;
442
+ spendCaps?: SpendCaps;
443
+ ledgerPath: string;
444
+ receiptsPath: string;
445
+ fetchImpl?: typeof fetch;
446
+ ceilingSweep?: CeilingSweepHook | false;
447
+ now?: Date;
448
+ allowanceExpiresAt?: Date;
449
+ };
450
+ export type CreateCallPortOptions = {
451
+ config: VapiConfig;
452
+ fetchImpl?: typeof fetch;
453
+ searchesPath?: string;
454
+ notice?: (message: string) => void;
455
+ cacheMarketplaceHits?: boolean | "optional";
456
+ resolvePayment: (wallet?: string) => Promise<PaymentResolution>;
457
+ };
458
+ export declare function createCallPort(options: CreateCallPortOptions): CallPort;