@vapi-network/mcp 0.7.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/dist/server.d.ts CHANGED
@@ -1,5 +1,6 @@
1
- import { type SecretStore, type VapiPaymentAccount, type VapiConfig, type WalletStore } from "@vapi-network/core";
1
+ import { type SecretStore, type SwarmCapitalDeps, type VapiPaymentAccount, type VapiConfig, type WalletStore } from "@vapi-network/core";
2
2
  import { z } from "zod";
3
+ import { type Runtime } from "./agent/runtime.js";
3
4
  import { callService, type CallToolInput, type CallToolResult } from "./tools/call.js";
4
5
  import { type AccountsToolOverrides } from "./tools/accounts.js";
5
6
  import { type AuthAgentLinkOverrides } from "./tools/auth.js";
@@ -32,6 +33,10 @@ export type VapiServerOptions = {
32
33
  status?: StatusCoreOverrides | undefined;
33
34
  /** Account-link functions, device identity and clock overridden by deterministic tests. */
34
35
  accounts?: AccountsToolOverrides | undefined;
36
+ /** Swarm capital seams overridden by deterministic tests. */
37
+ swarm?: Pick<SwarmCapitalDeps, "balanceReader" | "transfer" | "randomId" | "randomNonce"> | undefined;
38
+ /** Background runtime used by detached swarm runs. */
39
+ runtime?: Runtime | undefined;
35
40
  };
36
41
  type ToolResult = {
37
42
  isError?: boolean;
@@ -1,6 +1,8 @@
1
1
  import { type AddAccountArgs, type SecretStore, type TransferArgs, type WalletStore } from "@vapi-network/core";
2
2
  import { z } from "zod";
3
+ import type { AccountsPort } from "../actions/context.js";
3
4
  import type { WalletSession } from "../wallet-session.js";
5
+ export { accountsSendInputSchema, accountsSendOutputSchema } from "../actions/accounts.js";
4
6
  export declare const accountsAddTool: {
5
7
  description: string;
6
8
  strictInput: boolean;
@@ -108,6 +110,7 @@ export type AccountsToolsOptions = AccountsToolOverrides & {
108
110
  env?: NodeJS.ProcessEnv | undefined;
109
111
  signal?: AbortSignal | undefined;
110
112
  };
113
+ export type CreateAccountsPortOptions = Pick<AccountsToolsOptions, "session" | "secrets" | "wallets" | "fetchImpl" | "apiBase" | "now" | "nonce">;
111
114
  type ToolResult = {
112
115
  structuredContent: Record<string, unknown>;
113
116
  content: Array<{
@@ -138,11 +141,5 @@ export declare function createAccountsTools(options: AccountsToolsOptions): {
138
141
  perDayUsd?: number;
139
142
  ceilingUsd?: number | "off";
140
143
  }): Promise<ToolResult>;
141
- send(input: {
142
- from: string;
143
- to: string;
144
- amountUsd: string | number;
145
- network?: "base" | "arc";
146
- }): Promise<ToolResult>;
147
144
  };
148
- export {};
145
+ export declare function createAccountsPort(options: CreateAccountsPortOptions): AccountsPort;
@@ -1,4 +1,4 @@
1
- import { type ListingVerification, type LookupFn, type MarketplaceHit, type CeilingSweepHook, type SpendCaps, type VapiPaymentAccount, type VapiConfig, type WalletName } from "@vapi-network/core";
1
+ import { type ListingVerification, type LookupFn, type MarketplaceHit, type RunBudget, type RunRef, 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;
@@ -44,6 +44,8 @@ export declare class VapiCallError extends Error {
44
44
  export type CallToolResult = {
45
45
  status: number;
46
46
  body: unknown;
47
+ /** The final resource URL after guarded redirects, present when a payment settled. */
48
+ resourceUrl?: string;
47
49
  /**
48
50
  * How far the paid listing got through vAPI review. Absent when there was no
49
51
  * listing to disclose — a call made against an explicit URL.
@@ -78,8 +80,11 @@ export type CallServiceArgs = {
78
80
  /** The caps of that wallet. Without it, the machine-wide config caps apply. */
79
81
  spendCaps?: SpendCaps;
80
82
  now?: Date;
83
+ allowanceExpiresAt?: Date;
81
84
  nowMs?: () => number;
82
85
  timeoutMs?: number;
86
+ runBudget?: RunBudget;
87
+ run?: RunRef;
83
88
  /** Best-effort account ceiling enforcement after decisive settlement. */
84
89
  ceilingSweep?: CeilingSweepHook | false;
85
90
  };
@@ -35,8 +35,8 @@ export declare const vapiStatusTool: {
35
35
  link: z.ZodEnum<{
36
36
  unknown: "unknown";
37
37
  paused: "paused";
38
- active: "active";
39
38
  not_linked: "not_linked";
39
+ active: "active";
40
40
  revoked: "revoked";
41
41
  }>;
42
42
  }, z.core.$strip>>;
@@ -71,8 +71,8 @@ export declare const vapiAccountsTool: {
71
71
  link: z.ZodEnum<{
72
72
  unknown: "unknown";
73
73
  paused: "paused";
74
- active: "active";
75
74
  not_linked: "not_linked";
75
+ active: "active";
76
76
  revoked: "revoked";
77
77
  }>;
78
78
  }, z.core.$strip>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vapi-network/mcp",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Local, non-custodial MCP server for discovering and paying x402 APIs",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {