lane-sdk 0.3.11 → 0.3.12

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.
Files changed (47) hide show
  1. package/dist/adapters/crewai/index.cjs +12 -14
  2. package/dist/adapters/crewai/index.d.cts +1 -1
  3. package/dist/adapters/crewai/index.d.ts +1 -1
  4. package/dist/adapters/crewai/index.js +12 -14
  5. package/dist/adapters/langchain/index.cjs +12 -14
  6. package/dist/adapters/langchain/index.d.cts +1 -1
  7. package/dist/adapters/langchain/index.d.ts +1 -1
  8. package/dist/adapters/langchain/index.js +12 -14
  9. package/dist/adapters/openai/index.cjs +12 -14
  10. package/dist/adapters/openai/index.d.cts +1 -1
  11. package/dist/adapters/openai/index.d.ts +1 -1
  12. package/dist/adapters/openai/index.js +12 -14
  13. package/dist/adapters/vercel-ai/index.cjs +12 -14
  14. package/dist/adapters/vercel-ai/index.d.cts +1 -1
  15. package/dist/adapters/vercel-ai/index.d.ts +1 -1
  16. package/dist/adapters/vercel-ai/index.js +12 -14
  17. package/dist/cli/index.js +6 -7
  18. package/dist/cli/postinstall.js +0 -1
  19. package/dist/index.cjs +12 -936
  20. package/dist/index.d.cts +3 -354
  21. package/dist/index.d.ts +3 -354
  22. package/dist/index.js +13 -928
  23. package/dist/{lane-CATn69s2.d.cts → lane-BgdqOeXo.d.cts} +5 -5
  24. package/dist/{lane-CATn69s2.d.ts → lane-BgdqOeXo.d.ts} +5 -5
  25. package/dist/server-http.cjs +12 -14
  26. package/dist/server-http.js +12 -14
  27. package/dist/server-stdio.cjs +12 -14
  28. package/dist/server-stdio.js +12 -14
  29. package/dist/skills/lane.md +5 -5
  30. package/package.json +5 -2
  31. package/plugin/skills/commerce-agent/SKILL.md +2 -2
  32. package/dist/adapters/crewai/index.cjs.map +0 -1
  33. package/dist/adapters/crewai/index.js.map +0 -1
  34. package/dist/adapters/langchain/index.cjs.map +0 -1
  35. package/dist/adapters/langchain/index.js.map +0 -1
  36. package/dist/adapters/openai/index.cjs.map +0 -1
  37. package/dist/adapters/openai/index.js.map +0 -1
  38. package/dist/adapters/vercel-ai/index.cjs.map +0 -1
  39. package/dist/adapters/vercel-ai/index.js.map +0 -1
  40. package/dist/cli/index.js.map +0 -1
  41. package/dist/cli/postinstall.js.map +0 -1
  42. package/dist/index.cjs.map +0 -1
  43. package/dist/index.js.map +0 -1
  44. package/dist/server-http.cjs.map +0 -1
  45. package/dist/server-http.js.map +0 -1
  46. package/dist/server-stdio.cjs.map +0 -1
  47. package/dist/server-stdio.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { T as TokenStore, C as Credentials, L as Lane, a as LaneConfig, R as ResolvedConfig, B as BudgetConfig, b as RoutingDecision } from './lane-CATn69s2.cjs';
2
- export { A as APIResponse, c as Admin, d as AgentIdentity, e as AgentPolicy, f as AgentRecord, g as AgentUser, h as AgenticToken, i as Agents, j as AnalyticsParams, k as Audit, l as AuditEntry, m as AuditQueryParams, n as Auth, o as AutoReloadConfig, p as Budgets, q as Card, r as CardAttributes, s as Cards, t as Checkout, u as CheckoutConfigParams, v as CheckoutConfigResult, w as CheckoutSession, x as Commerce, y as CommerceAddress, z as CommerceCartItem, D as CommerceCatalog, E as CommerceCheckoutParams, F as CommerceLocation, G as CommerceMenuCategory, H as CommerceMenuItem, I as CommerceModifierGroup, J as CommerceModifierOption, K as CommerceOnboardingStatus, M as CommerceOrder, N as CommerceOrderResult, O as CommerceOrders, P as CommercePaymentMethod, Q as CommercePlatform, S as CommerceProfile, U as CommerceProviders, V as CommerceTimeSlot, W as ConnectProviderParams, X as ConnectedProvider, Y as CreateCheckoutParams, Z as CreateProductParams, _ as CreateSubscriptionParams, $ as CreateTeamParams, a0 as CreateTokenParams, a1 as CreateWalletParams, a2 as CredentialInjection, a3 as DepositParams, a4 as DepositResult, a5 as DeveloperProfile, a6 as DirectoryMerchant, a7 as EnhancedToken, a8 as ExecutePaymentParams, a9 as Fleet, aa as FleetAgent, ab as HierarchicalBudget, ac as Identity, ad as IdentityAttestation, ae as Instruction, af as InstructionConfirmation, ag as InstructionCredential, ah as Instructions, ai as KYCChain, aj as LaneAuthError, ak as LaneBudgetError, al as LaneClient, am as LaneConfirmationError, an as LaneError, ao as LaneNotFoundError, ap as LanePaymentError, aq as LaneRateLimitError, ar as LaneValidationError, as as Mandate, at as Merchant, au as MerchantSearchParams, av as MerchantType, aw as MerchantVerticalSummary, ax as Merchants, ay as Metering, az as MeteringConfig, aA as NetworkTokenPayload, aB as Order, aC as OrderIntentParams, aD as OrderIntentResult, aE as Organization, aF as PaginatedResponse, aG as Pay, aH as PaymentRoute, aI as PaymentSkill, aJ as Payout, aK as PayoutConfig, aL as Payouts, aM as PricingConfig, aN as Product, aO as ProductAnalytics, aP as ProductSearchParams, aQ as Products, aR as ProtocolDiscoveryResult, aS as ProvisionVICPaymentParams, aT as ProvisionVICPaymentResult, aU as Refund, aV as RefundParams, aW as RegisterAgentParams, aX as RegisterIdentityParams, aY as RequestOptions, aZ as Resource, a_ as RotateKeyResult, a$ as SCPManifest, b0 as SCPParameter, b1 as SCPPlan, b2 as SCPPricing, b3 as SCPProduct, b4 as SCPProvisioning, b5 as SCPSelectionParameters, b6 as SDKInfo, b7 as Sell, b8 as SoftwareCheckoutParams, b9 as SoftwareOrder, ba as SoftwareProductSearchParams, bb as SpendingSummary, bc as SubmitOrderParams, bd as SubmitOrderResult, be as Subscription, bf as Subscriptions, bg as Team, bh as TeamMember, bi as TeamSpending, bj as Teams, bk as Tokens, bl as Transaction, bm as Transactions, bn as UpdateSubscriptionParams, bo as UsageRecord, bp as UsageReport, bq as Users, br as VIC, bs as VICIssuanceParams, bt as VICToken, bu as VICTokenUsageEntry, bv as VerifyIdentityParams, bw as Wallet, bx as WalletBalance, by as Wallets, bz as WebhookConfig, bA as WebhookEvent, bB as WebhookPayload, bC as Webhooks, bD as createErrorFromResponse } from './lane-CATn69s2.cjs';
1
+ import { T as TokenStore, C as Credentials, L as Lane, a as LaneConfig, R as ResolvedConfig } from './lane-BgdqOeXo.cjs';
2
+ export { A as APIResponse, b as Admin, c as AgentIdentity, d as AgentPolicy, e as AgentRecord, f as AgentUser, g as AgenticToken, h as Agents, i as AnalyticsParams, j as Audit, k as AuditEntry, l as AuditQueryParams, m as Auth, n as AutoReloadConfig, B as BudgetConfig, o as Budgets, p as Card, q as CardAttributes, r as Cards, s as Checkout, t as CheckoutConfigParams, u as CheckoutConfigResult, v as CheckoutSession, w as Commerce, x as CommerceAddress, y as CommerceCartItem, z as CommerceCatalog, D as CommerceCheckoutParams, E as CommerceLocation, F as CommerceMenuCategory, G as CommerceMenuItem, H as CommerceModifierGroup, I as CommerceModifierOption, J as CommerceOnboardingStatus, K as CommerceOrder, M as CommerceOrderResult, N as CommerceOrders, O as CommercePaymentMethod, P as CommercePlatform, Q as CommerceProfile, S as CommerceProviders, U as CommerceTimeSlot, V as ConnectProviderParams, W as ConnectedProvider, X as CreateCheckoutParams, Y as CreateProductParams, Z as CreateSubscriptionParams, _ as CreateTeamParams, $ as CreateTokenParams, a0 as CreateWalletParams, a1 as CredentialInjection, a2 as DepositParams, a3 as DepositResult, a4 as DeveloperProfile, a5 as DirectoryMerchant, a6 as EnhancedToken, a7 as ExecutePaymentParams, a8 as Fleet, a9 as FleetAgent, aa as HierarchicalBudget, ab as Identity, ac as IdentityAttestation, ad as Instruction, ae as InstructionConfirmation, af as InstructionCredential, ag as Instructions, ah as KYCChain, ai as LaneAuthError, aj as LaneBudgetError, ak as LaneClient, al as LaneConfirmationError, am as LaneError, an as LaneNotFoundError, ao as LanePaymentError, ap as LaneRateLimitError, aq as LaneValidationError, ar as Mandate, as as Merchant, at as MerchantSearchParams, au as MerchantType, av as MerchantVerticalSummary, aw as Merchants, ax as Metering, ay as MeteringConfig, az as NetworkTokenPayload, aA as Order, aB as OrderIntentParams, aC as OrderIntentResult, aD as Organization, aE as PaginatedResponse, aF as Pay, aG as PaymentRoute, aH as PaymentSkill, aI as Payout, aJ as PayoutConfig, aK as Payouts, aL as PricingConfig, aM as Product, aN as ProductAnalytics, aO as ProductSearchParams, aP as Products, aQ as ProtocolDiscoveryResult, aR as ProvisionVICPaymentParams, aS as ProvisionVICPaymentResult, aT as Refund, aU as RefundParams, aV as RegisterAgentParams, aW as RegisterIdentityParams, aX as RequestOptions, aY as Resource, aZ as RotateKeyResult, a_ as RoutingDecision, a$ as SCPManifest, b0 as SCPParameter, b1 as SCPPlan, b2 as SCPPricing, b3 as SCPProduct, b4 as SCPProvisioning, b5 as SCPSelectionParameters, b6 as SDKInfo, b7 as Sell, b8 as SoftwareCheckoutParams, b9 as SoftwareOrder, ba as SoftwareProductSearchParams, bb as SpendingSummary, bc as SubmitOrderParams, bd as SubmitOrderResult, be as Subscription, bf as Subscriptions, bg as Team, bh as TeamMember, bi as TeamSpending, bj as Teams, bk as Tokens, bl as Transaction, bm as Transactions, bn as UpdateSubscriptionParams, bo as UsageRecord, bp as UsageReport, bq as Users, br as VIC, bs as VICIssuanceParams, bt as VICToken, bu as VICTokenUsageEntry, bv as VerifyIdentityParams, bw as Wallet, bx as WalletBalance, by as Wallets, bz as WebhookConfig, bA as WebhookEvent, bB as WebhookPayload, bC as Webhooks, bD as createErrorFromResponse } from './lane-BgdqOeXo.cjs';
3
3
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
4
4
  import 'node:events';
5
5
 
@@ -167,83 +167,6 @@ interface LaneInstructions {
167
167
  */
168
168
  declare function getLaneInstructions(): LaneInstructions;
169
169
 
170
- interface VGSTokenConfig {
171
- /** VGS vault ID (e.g., tntxxxxxxxx). */
172
- vaultId: string;
173
- /** VGS service account client ID. */
174
- clientId: string;
175
- /** VGS service account client secret. */
176
- clientSecret: string;
177
- /** VGS environment: 'sandbox' | 'live'. */
178
- environment: 'sandbox' | 'live';
179
- }
180
- /**
181
- * VGSTokenManager handles OAuth2 client_credentials flow for VGS vault access.
182
- * Tokens are cached and auto-refreshed before expiry.
183
- */
184
- declare class VGSTokenManager {
185
- private readonly config;
186
- private cached;
187
- private clearTimer;
188
- constructor(config: VGSTokenConfig);
189
- /**
190
- * Get a valid access token, refreshing if expired or near-expiry.
191
- */
192
- getAccessToken(): Promise<string>;
193
- /**
194
- * Force-refresh the token.
195
- */
196
- refresh(): Promise<string>;
197
- /**
198
- * Invalidate the cached token.
199
- */
200
- invalidate(): void;
201
- /**
202
- * Overwrite and release the cached token from memory.
203
- */
204
- private clearCachedToken;
205
- private getTokenUrl;
206
- }
207
-
208
- interface VGSProxyConfig extends VGSTokenConfig {
209
- /** Outbound route ID for PSP-bound requests. */
210
- routeId: string;
211
- }
212
- interface ProxyRequest {
213
- /** Target PSP endpoint URL. */
214
- url: string;
215
- /** HTTP method. */
216
- method: 'POST' | 'PUT' | 'PATCH';
217
- /** Request headers (Authorization, Content-Type, etc.). */
218
- headers: Record<string, string>;
219
- /** Request body containing VGS aliases that will be revealed by the proxy. */
220
- body: unknown;
221
- }
222
- interface ProxyResponse {
223
- status: number;
224
- headers: Record<string, string>;
225
- body: unknown;
226
- }
227
- /**
228
- * VGSOutboundProxy routes requests through VGS so that aliased card data
229
- * is revealed only to whitelisted PSP endpoints.
230
- */
231
- declare class VGSOutboundProxy {
232
- private readonly config;
233
- private readonly tokenManager;
234
- constructor(config: VGSProxyConfig);
235
- /**
236
- * Send a request through the VGS outbound proxy.
237
- * VGS aliases in the body are de-tokenized and revealed to the target PSP.
238
- */
239
- forward(request: ProxyRequest): Promise<ProxyResponse>;
240
- /**
241
- * Invalidate the cached VGS access token.
242
- */
243
- invalidateToken(): void;
244
- private getProxyUrl;
245
- }
246
-
247
170
  type CardBrand = 'visa' | 'mastercard' | 'amex' | 'discover' | 'diners' | 'jcb' | 'unionpay' | 'unknown';
248
171
  /**
249
172
  * Detect card brand from a card number or VGS alias token.
@@ -263,208 +186,6 @@ declare function luhnCheck(cardNumber: string): boolean;
263
186
  */
264
187
  declare function maskCardNumber(cardNumber: string): string;
265
188
 
266
- interface VGSCollectConfig {
267
- /** VGS vault ID. */
268
- vaultId: string;
269
- /** VGS environment. */
270
- environment: 'sandbox' | 'live';
271
- /** VGS route ID for inbound collection. */
272
- routeId: string;
273
- /** Callback URL after successful tokenization. */
274
- callbackUrl: string;
275
- /** Lane developer ID (for associating the card). */
276
- developerId: string;
277
- }
278
- /**
279
- * Generate the VGS Collect HTML page for secure card entry.
280
- * The page:
281
- * 1. Loads VGS Collect.js from VGS CDN
282
- * 2. Creates secure iframe fields for card number, CVV, expiry
283
- * 3. On submit, sends card data directly to VGS vault
284
- * 4. VGS returns aliases (tok_xxx) — Lane stores only the alias
285
- * 5. Redirects to callbackUrl with the alias + last4 + brand
286
- */
287
- declare function generateCollectPage(config: VGSCollectConfig): string;
288
-
289
- type PSPName = 'stripe' | 'worldpay' | 'cybersource';
290
- interface PSPChargeParams {
291
- /** Amount in cents. */
292
- amount: number;
293
- /** ISO 4217 currency code (e.g., 'USD'). */
294
- currency: string;
295
- /** VGS alias for the card PAN (de-tokenized by VGS outbound proxy). */
296
- cardAlias: string;
297
- /** VGS alias for the CVV. */
298
- cvvAlias?: string;
299
- /** Card expiry month (1-12). */
300
- expMonth: number;
301
- /** Card expiry year (4-digit). */
302
- expYear: number;
303
- /** Merchant descriptor. */
304
- merchantDescriptor: string;
305
- /** Idempotency key to prevent duplicate charges. */
306
- idempotencyKey?: string;
307
- /** Metadata attached to the charge. */
308
- metadata?: Record<string, string>;
309
- }
310
- interface PSPChargeResult {
311
- /** PSP's transaction/charge ID. */
312
- pspTransactionId: string;
313
- /** Charge status. */
314
- status: 'succeeded' | 'pending' | 'failed';
315
- /** Authorization code from the issuer. */
316
- authorizationCode?: string;
317
- /** Decline reason if failed. */
318
- declineReason?: string;
319
- /** Raw PSP response for audit logging. */
320
- rawResponse: unknown;
321
- }
322
- interface PSPRefundParams {
323
- /** Original PSP transaction ID. */
324
- pspTransactionId: string;
325
- /** Refund amount in cents. If omitted, full refund. */
326
- amount?: number;
327
- /** Reason for refund. */
328
- reason?: string;
329
- /** Idempotency key. */
330
- idempotencyKey?: string;
331
- }
332
- interface PSPRefundResult {
333
- /** PSP's refund ID. */
334
- pspRefundId: string;
335
- /** Refund status. */
336
- status: 'succeeded' | 'pending' | 'failed';
337
- /** Amount refunded in cents. */
338
- amount: number;
339
- /** Raw PSP response for audit logging. */
340
- rawResponse: unknown;
341
- }
342
- /**
343
- * PSP Adapter interface — strategy pattern.
344
- *
345
- * Each payment processor (Stripe, Worldpay, CyberSource) implements this
346
- * interface. The payment engine calls charge/refund without knowing which
347
- * PSP is handling the request.
348
- */
349
- interface PSPAdapter {
350
- /** PSP identifier. */
351
- readonly name: PSPName;
352
- /**
353
- * Create a charge. The card data arrives as VGS aliases;
354
- * the VGS outbound proxy reveals them to the PSP endpoint.
355
- */
356
- charge(params: PSPChargeParams): Promise<PSPChargeResult>;
357
- /**
358
- * Refund a previous charge (full or partial).
359
- */
360
- refund(params: PSPRefundParams): Promise<PSPRefundResult>;
361
- /**
362
- * Health check — verify PSP connectivity.
363
- */
364
- healthCheck(): Promise<boolean>;
365
- }
366
-
367
- /**
368
- * PSPRegistry manages available payment processor adapters.
369
- *
370
- * The payment engine queries the registry to find the best adapter
371
- * for a given transaction based on priority, card brand support,
372
- * and availability.
373
- */
374
- declare class PSPRegistry {
375
- private adapters;
376
- /**
377
- * Register an adapter with a priority (lower = higher priority).
378
- */
379
- register(adapter: PSPAdapter, priority?: number): void;
380
- /**
381
- * Remove an adapter from the registry.
382
- */
383
- unregister(name: PSPName): void;
384
- /**
385
- * Get a specific adapter by name.
386
- */
387
- get(name: PSPName): PSPAdapter | undefined;
388
- /**
389
- * Get the highest-priority adapter (lowest priority number).
390
- * Optionally exclude specific adapters (e.g., after a failure).
391
- */
392
- getPrimary(exclude?: Set<PSPName>): PSPAdapter | undefined;
393
- /**
394
- * Get all registered adapters sorted by priority.
395
- */
396
- getAll(): PSPAdapter[];
397
- /**
398
- * Run health checks on all adapters. Returns names of healthy adapters.
399
- */
400
- healthCheckAll(): Promise<PSPName[]>;
401
- }
402
-
403
- interface StripeAdapterConfig {
404
- /** Stripe secret key (sk_live_... or sk_test_...). */
405
- secretKey: string;
406
- /** VGS outbound proxy instance. */
407
- proxy: VGSOutboundProxy;
408
- /** Stripe API version. */
409
- apiVersion?: string;
410
- }
411
- declare class StripeAdapter implements PSPAdapter {
412
- readonly name: "stripe";
413
- private readonly config;
414
- constructor(config: StripeAdapterConfig);
415
- charge(params: PSPChargeParams): Promise<PSPChargeResult>;
416
- refund(params: PSPRefundParams): Promise<PSPRefundResult>;
417
- healthCheck(): Promise<boolean>;
418
- }
419
-
420
- interface WorldpayAdapterConfig {
421
- /** Worldpay merchant ID. */
422
- merchantId: string;
423
- /** Worldpay API key. */
424
- apiKey: string;
425
- /** Worldpay API endpoint. */
426
- baseUrl: string;
427
- /** VGS outbound proxy instance. */
428
- proxy: VGSOutboundProxy;
429
- }
430
- declare class WorldpayAdapter implements PSPAdapter {
431
- readonly name: "worldpay";
432
- private readonly config;
433
- constructor(config: WorldpayAdapterConfig);
434
- charge(params: PSPChargeParams): Promise<PSPChargeResult>;
435
- refund(params: PSPRefundParams): Promise<PSPRefundResult>;
436
- healthCheck(): Promise<boolean>;
437
- }
438
-
439
- interface CyberSourceAdapterConfig {
440
- /** CyberSource merchant ID. */
441
- merchantId: string;
442
- /** CyberSource API key ID. */
443
- apiKeyId: string;
444
- /** CyberSource shared secret. */
445
- sharedSecret: string;
446
- /** API endpoint. */
447
- baseUrl: string;
448
- /** VGS outbound proxy instance. */
449
- proxy: VGSOutboundProxy;
450
- }
451
- interface CyberSourceChargeParams extends PSPChargeParams {
452
- /** VIC network token cryptogram (for token-based payments). */
453
- cryptogram?: string;
454
- /** ECI value for network token transactions. */
455
- eci?: string;
456
- /** Whether this is a network token (DPAN) or regular PAN. */
457
- isNetworkToken?: boolean;
458
- }
459
- declare class CyberSourceAdapter implements PSPAdapter {
460
- readonly name: "cybersource";
461
- private readonly config;
462
- constructor(config: CyberSourceAdapterConfig);
463
- charge(params: PSPChargeParams): Promise<PSPChargeResult>;
464
- refund(params: PSPRefundParams): Promise<PSPRefundResult>;
465
- healthCheck(): Promise<boolean>;
466
- }
467
-
468
189
  /** Merchant capability data used for routing decisions. */
469
190
  interface MerchantCapabilities {
470
191
  merchantId: string;
@@ -478,78 +199,6 @@ interface MerchantCapabilities {
478
199
  acceptsMastercard: boolean;
479
200
  mccs: string[];
480
201
  }
481
- /** Context for a routing decision. */
482
- interface RoutingContext {
483
- /** Amount in cents. */
484
- amount: number;
485
- currency: string;
486
- merchantId: string;
487
- /** Card brand being used. */
488
- cardBrand: string;
489
- /** Whether a VIC token is available (used for credential selection, not routing). */
490
- hasVICToken: boolean;
491
- /** Whether a Mastercard Agent Pay token is available (credential selection). */
492
- hasMCAPToken?: boolean;
493
- /** Current effective budget. */
494
- budget?: BudgetConfig;
495
- /** Current spend for the period. */
496
- currentSpend?: number;
497
- }
498
- /** Registry of merchant capabilities (populated from Lane backend). */
499
- declare class MerchantRegistry {
500
- private merchants;
501
- register(capabilities: MerchantCapabilities): void;
502
- get(merchantId: string): MerchantCapabilities | undefined;
503
- registerBatch(merchants: MerchantCapabilities[]): void;
504
- /** Create a registry pre-populated from directory capabilities. */
505
- static fromDirectory(capabilities: MerchantCapabilities[]): MerchantRegistry;
506
- /** Clear and repopulate with new capabilities. */
507
- reload(capabilities: MerchantCapabilities[]): void;
508
- /** Number of registered merchants. */
509
- get size(): number;
510
- /** List all registered merchant IDs. */
511
- listIds(): string[];
512
- /**
513
- * Create a registry pre-seeded with the built-in UCP merchant directory.
514
- *
515
- * These merchants have verified `/.well-known/ucp` endpoints, so the
516
- * routing engine can immediately route to Tier 3 (UCP) without a server
517
- * round-trip for discovery. Additional merchants from the Lane backend
518
- * can be merged in later via `register()` or `registerBatch()`.
519
- */
520
- static withUCPDirectory(): MerchantRegistry;
521
- /**
522
- * Create a registry pre-seeded with ALL built-in merchant directories:
523
- * - Billing API merchants (Tier 1) — SaaS/API merchants with direct endpoints
524
- * - UCP merchants (Tier 3) — ecommerce merchants with /.well-known/ucp
525
- *
526
- * This gives agents instant routing for known merchants without any server
527
- * round-trip. Use this for the best out-of-the-box experience.
528
- */
529
- static withBuiltinDirectory(): MerchantRegistry;
530
- }
531
- /**
532
- * PaymentRouter determines the optimal payment path for a transaction.
533
- *
534
- * Priority order (acceptance protocols):
535
- * 1. Billing API — direct merchant API integration (cheapest, fastest)
536
- * 2. ACP — Agent Commerce Protocol checkout (Stripe-compatible, most merchant adoption)
537
- * 3. UCP — Universal Checkout Protocol (Google, genuinely open)
538
- * 4. x402 — HTTP 402 standard (requires active 402 responses)
539
- * 5. Fallback — Rye / browser use / VGS proxy (probe-based selection)
540
- *
541
- * VIC/MC Agent Pay are the CREDENTIAL layer, not routing tiers. They produce
542
- * the network tokens that flow through whatever acceptance protocol is selected.
543
- */
544
- declare class PaymentRouter {
545
- private readonly registry;
546
- constructor(registry: MerchantRegistry);
547
- /**
548
- * Decide the payment route for a transaction.
549
- */
550
- route(context: RoutingContext): RoutingDecision;
551
- private filterFallbacks;
552
- }
553
202
 
554
203
  /** A merchant with a known UCP endpoint. */
555
204
  interface UCPMerchant {
@@ -634,4 +283,4 @@ declare function listUCPByVertical(vertical: string): readonly UCPMerchant[];
634
283
  */
635
284
  declare function toMerchantCapabilities(): MerchantCapabilities[];
636
285
 
637
- export { type InstructionConfirmation as BiometricInstructionConfirmation, type BiometricMethod, type BiometricOptions, type BiometricProof, BiometricVerifier, BudgetConfig, type CardBrand, Credentials, CyberSourceAdapter, type CyberSourceAdapterConfig, type CyberSourceChargeParams, FileTokenStore, HMACSignature, Lane, LaneConfig, type LaneInstructions, LaneMCPServer, type LaneMCPServerOptions, type MerchantCapabilities, MerchantRegistry, type PSPAdapter, type PSPChargeParams, type PSPChargeResult, type PSPName, type PSPRefundParams, type PSPRefundResult, PSPRegistry, PaymentRouter, type ProxyRequest, type ProxyResponse, ResolvedConfig, type RoutingContext, RoutingDecision, StripeAdapter, type StripeAdapterConfig, TokenStore, type UCPMerchant, type VGSCollectConfig, VGSOutboundProxy, type VGSProxyConfig, type VGSTokenConfig, VGSTokenManager, WorldpayAdapter, type WorldpayAdapterConfig, Lane as default, detectCardBrand, generateCollectPage, getLaneInstructions, listUCPByVertical, listUCPMerchants, luhnCheck, maskCardNumber, requireBiometricConfirmation, resolveConfig, resolveUCPByBrand, resolveUCPByDomain, toUCPEndpoint, toMerchantCapabilities as toUCPMerchantCapabilities, verifyWebhookSignature };
286
+ export { type InstructionConfirmation as BiometricInstructionConfirmation, type BiometricMethod, type BiometricOptions, type BiometricProof, BiometricVerifier, type CardBrand, Credentials, FileTokenStore, HMACSignature, Lane, LaneConfig, type LaneInstructions, LaneMCPServer, type LaneMCPServerOptions, ResolvedConfig, TokenStore, type UCPMerchant, Lane as default, detectCardBrand, getLaneInstructions, listUCPByVertical, listUCPMerchants, luhnCheck, maskCardNumber, requireBiometricConfirmation, resolveConfig, resolveUCPByBrand, resolveUCPByDomain, toUCPEndpoint, toMerchantCapabilities as toUCPMerchantCapabilities, verifyWebhookSignature };