@vapi-network/mcp 0.9.0 → 0.9.4
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 +1 -1
- package/dist/actions/call.d.ts +56 -10
- package/dist/actions/register.d.ts +30 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1335 -873
- package/dist/index.js.map +3 -3
- package/dist/server.d.ts +7 -1
- package/dist/tools/call.d.ts +13 -3
- package/dist/tools/tasks.d.ts +6 -0
- package/package.json +1 -1
package/dist/server.d.ts
CHANGED
|
@@ -62,7 +62,6 @@ type ListedTool = {
|
|
|
62
62
|
inputSchema: unknown;
|
|
63
63
|
outputSchema?: unknown;
|
|
64
64
|
};
|
|
65
|
-
/** Minimal MCP server implementation for stdio and deterministic in-memory tests. */
|
|
66
65
|
export declare class VapiMcpServer {
|
|
67
66
|
#private;
|
|
68
67
|
constructor(onClose?: () => void);
|
|
@@ -108,3 +107,10 @@ export declare function loadServerConfig(): Promise<{
|
|
|
108
107
|
tasksEscrowFactoryOverrides?: Record<string, string> | undefined;
|
|
109
108
|
device?: string | undefined;
|
|
110
109
|
}>;
|
|
110
|
+
export declare function toolError(error: unknown): {
|
|
111
|
+
isError: true;
|
|
112
|
+
content: {
|
|
113
|
+
type: "text";
|
|
114
|
+
text: string;
|
|
115
|
+
}[];
|
|
116
|
+
};
|
package/dist/tools/call.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type CallToolInput = {
|
|
|
9
9
|
network?: string;
|
|
10
10
|
expectedPayTo?: string;
|
|
11
11
|
contentType?: string;
|
|
12
|
+
timeoutSeconds?: number;
|
|
12
13
|
};
|
|
13
14
|
export type PossibleSettlement = {
|
|
14
15
|
network: string;
|
|
@@ -19,7 +20,6 @@ export type PossibleSettlement = {
|
|
|
19
20
|
paymentId?: string;
|
|
20
21
|
authorizationNonce?: string;
|
|
21
22
|
authorizationExpiresAt?: string;
|
|
22
|
-
authorizationTransaction?: string;
|
|
23
23
|
receipt: unknown | null;
|
|
24
24
|
};
|
|
25
25
|
export type PaymentRejection = {
|
|
@@ -31,16 +31,26 @@ export type ConfirmedSettlement = {
|
|
|
31
31
|
receipt: unknown;
|
|
32
32
|
};
|
|
33
33
|
export declare class VapiCallError extends Error {
|
|
34
|
-
readonly code: "invalid_request" | "payment_rejected" | "receipt_write_failed" | "response_unreadable" | "settlement_unknown";
|
|
34
|
+
readonly code: "invalid_request" | "unsupported_network" | "unsupported_payment" | "payment_rejected" | "receipt_write_failed" | "response_unreadable" | "settlement_unknown";
|
|
35
35
|
readonly possibleSettlement?: PossibleSettlement | undefined;
|
|
36
36
|
readonly name = "VapiCallError";
|
|
37
37
|
readonly paymentRejection?: PaymentRejection;
|
|
38
38
|
readonly confirmedSettlement?: ConfirmedSettlement;
|
|
39
|
-
constructor(code: "invalid_request" | "payment_rejected" | "receipt_write_failed" | "response_unreadable" | "settlement_unknown", message: string, possibleSettlement?: PossibleSettlement | undefined, options?: ErrorOptions & {
|
|
39
|
+
constructor(code: "invalid_request" | "unsupported_network" | "unsupported_payment" | "payment_rejected" | "receipt_write_failed" | "response_unreadable" | "settlement_unknown", message: string, possibleSettlement?: PossibleSettlement | undefined, options?: ErrorOptions & {
|
|
40
40
|
paymentRejection?: PaymentRejection;
|
|
41
41
|
confirmedSettlement?: ConfirmedSettlement;
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* The Solana network a listing pays on: its endpoint's payment network, or —
|
|
46
|
+
* when the endpoint carries none, as for mirrored rows resolved through the
|
|
47
|
+
* services API — the service's declared networks when every one is Solana.
|
|
48
|
+
*/
|
|
49
|
+
export declare function listingPaymentNetwork(endpointNetwork: string | undefined, serviceNetworks: readonly string[] | undefined): string | undefined;
|
|
50
|
+
/** Refuse listing payments before any request, reservation, or signing. */
|
|
51
|
+
export declare function assertSupportedListingNetwork(network: string | undefined): void;
|
|
52
|
+
/** A selector cannot make a service payable when all its endpoints use Solana. */
|
|
53
|
+
export declare function assertSupportedListingResolution(error: unknown): void;
|
|
44
54
|
export type CallToolResult = {
|
|
45
55
|
status: number;
|
|
46
56
|
body: unknown;
|
package/dist/tools/tasks.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare const tasksPostTool: {
|
|
|
38
38
|
}>>;
|
|
39
39
|
maxAwards: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
webhookUrl: z.ZodOptional<z.ZodURL>;
|
|
41
|
+
vendor: z.ZodOptional<z.ZodString>;
|
|
41
42
|
wallet: z.ZodOptional<z.ZodString>;
|
|
42
43
|
};
|
|
43
44
|
strictInput: true;
|
|
@@ -75,6 +76,7 @@ export declare const tasksAwardTool: {
|
|
|
75
76
|
export declare const tasksSignTool: {
|
|
76
77
|
description: string;
|
|
77
78
|
inputSchema: {
|
|
79
|
+
wait: z.ZodDefault<z.ZodBoolean>;
|
|
78
80
|
counterparty: z.ZodOptional<z.ZodString>;
|
|
79
81
|
wallet: z.ZodOptional<z.ZodString>;
|
|
80
82
|
id: z.ZodUUID;
|
|
@@ -84,6 +86,7 @@ export declare const tasksSignTool: {
|
|
|
84
86
|
export declare const tasksFundTool: {
|
|
85
87
|
description: string;
|
|
86
88
|
inputSchema: {
|
|
89
|
+
wait: z.ZodDefault<z.ZodBoolean>;
|
|
87
90
|
counterparty: z.ZodOptional<z.ZodString>;
|
|
88
91
|
wallet: z.ZodOptional<z.ZodString>;
|
|
89
92
|
id: z.ZodUUID;
|
|
@@ -93,6 +96,7 @@ export declare const tasksFundTool: {
|
|
|
93
96
|
export declare const tasksDeliverTool: {
|
|
94
97
|
description: string;
|
|
95
98
|
inputSchema: {
|
|
99
|
+
wait: z.ZodDefault<z.ZodBoolean>;
|
|
96
100
|
files: z.ZodArray<z.ZodString>;
|
|
97
101
|
note: z.ZodString;
|
|
98
102
|
counterparty: z.ZodOptional<z.ZodString>;
|
|
@@ -104,6 +108,7 @@ export declare const tasksDeliverTool: {
|
|
|
104
108
|
export declare const tasksReleaseTool: {
|
|
105
109
|
description: string;
|
|
106
110
|
inputSchema: {
|
|
111
|
+
wait: z.ZodDefault<z.ZodBoolean>;
|
|
107
112
|
counterparty: z.ZodOptional<z.ZodString>;
|
|
108
113
|
wallet: z.ZodOptional<z.ZodString>;
|
|
109
114
|
id: z.ZodUUID;
|
|
@@ -193,6 +198,7 @@ export declare const tasksWatchTool: {
|
|
|
193
198
|
export declare const tasksStatusTool: {
|
|
194
199
|
description: string;
|
|
195
200
|
inputSchema: {
|
|
201
|
+
wallet: z.ZodOptional<z.ZodString>;
|
|
196
202
|
id: z.ZodUUID;
|
|
197
203
|
};
|
|
198
204
|
strictInput: true;
|