@visa/cli 4.1.0-rc.298 → 4.1.0-rc.299

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 (77) hide show
  1. package/README.md +29 -45
  2. package/dist/cli.js +556 -786
  3. package/dist/mcp-server/index.js +408 -622
  4. package/dist/merchant-ucp-mcp/index.js +6 -6
  5. package/dist/skills/pair-visa-agent/SKILL.md +175 -240
  6. package/native/bin/win32-arm64/visa-runtime-signer.exe +0 -0
  7. package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
  8. package/native/bin/win32-x64/visa-runtime-signer.exe +0 -0
  9. package/package.json +2 -4
  10. package/server.json +2 -2
  11. package/dist/checkout-engine/adapters/generic.d.ts +0 -88
  12. package/dist/checkout-engine/adapters/generic.js +0 -526
  13. package/dist/checkout-engine/adapters/index.d.ts +0 -10
  14. package/dist/checkout-engine/adapters/index.js +0 -24
  15. package/dist/checkout-engine/adapters/shopify.d.ts +0 -98
  16. package/dist/checkout-engine/adapters/shopify.js +0 -744
  17. package/dist/checkout-engine/adapters/stripe-like.d.ts +0 -10
  18. package/dist/checkout-engine/adapters/stripe-like.js +0 -21
  19. package/dist/checkout-engine/amount.d.ts +0 -17
  20. package/dist/checkout-engine/amount.js +0 -72
  21. package/dist/checkout-engine/browser-launch.d.ts +0 -51
  22. package/dist/checkout-engine/browser-launch.js +0 -96
  23. package/dist/checkout-engine/browserbase-browser.d.ts +0 -24
  24. package/dist/checkout-engine/browserbase-browser.js +0 -186
  25. package/dist/checkout-engine/ceremony.d.ts +0 -64
  26. package/dist/checkout-engine/ceremony.js +0 -261
  27. package/dist/checkout-engine/cli-engine.d.ts +0 -417
  28. package/dist/checkout-engine/cli-engine.js +0 -1331
  29. package/dist/checkout-engine/confirmed-merchants.d.ts +0 -31
  30. package/dist/checkout-engine/confirmed-merchants.js +0 -165
  31. package/dist/checkout-engine/detect.d.ts +0 -61
  32. package/dist/checkout-engine/detect.js +0 -398
  33. package/dist/checkout-engine/evidence.d.ts +0 -25
  34. package/dist/checkout-engine/evidence.js +0 -104
  35. package/dist/checkout-engine/executor.d.ts +0 -262
  36. package/dist/checkout-engine/executor.js +0 -1837
  37. package/dist/checkout-engine/hosted-approval.d.ts +0 -195
  38. package/dist/checkout-engine/hosted-approval.js +0 -501
  39. package/dist/checkout-engine/index.d.ts +0 -12
  40. package/dist/checkout-engine/index.js +0 -13
  41. package/dist/checkout-engine/instrument.d.ts +0 -61
  42. package/dist/checkout-engine/instrument.js +0 -87
  43. package/dist/checkout-engine/known-merchants.d.ts +0 -10
  44. package/dist/checkout-engine/known-merchants.js +0 -38
  45. package/dist/checkout-engine/live-fill-approval.d.ts +0 -37
  46. package/dist/checkout-engine/live-fill-approval.js +0 -76
  47. package/dist/checkout-engine/mandate/card-mandate.d.ts +0 -121
  48. package/dist/checkout-engine/mandate/card-mandate.js +0 -226
  49. package/dist/checkout-engine/mandate/mandate-ledger.d.ts +0 -175
  50. package/dist/checkout-engine/mandate/mandate-ledger.js +0 -425
  51. package/dist/checkout-engine/mandate.d.ts +0 -33
  52. package/dist/checkout-engine/mandate.js +0 -135
  53. package/dist/checkout-engine/outcome.d.ts +0 -30
  54. package/dist/checkout-engine/outcome.js +0 -225
  55. package/dist/checkout-engine/owner-only-file.d.ts +0 -19
  56. package/dist/checkout-engine/owner-only-file.js +0 -41
  57. package/dist/checkout-engine/package.json +0 -3
  58. package/dist/checkout-engine/receipt-dir.d.ts +0 -6
  59. package/dist/checkout-engine/receipt-dir.js +0 -8
  60. package/dist/checkout-engine/receipt.d.ts +0 -135
  61. package/dist/checkout-engine/receipt.js +0 -148
  62. package/dist/checkout-engine/shopify-primary-domain.d.ts +0 -25
  63. package/dist/checkout-engine/shopify-primary-domain.js +0 -96
  64. package/dist/checkout-engine/trace-handles.d.ts +0 -8
  65. package/dist/checkout-engine/trace-handles.js +0 -12
  66. package/dist/checkout-engine/types.d.ts +0 -52
  67. package/dist/checkout-engine/types.js +0 -2
  68. package/dist/checkout-engine/unresolved-charges.d.ts +0 -34
  69. package/dist/checkout-engine/unresolved-charges.js +0 -134
  70. package/dist/checkout-engine/vgs-gateway/server-mint-client.d.ts +0 -155
  71. package/dist/checkout-engine/vgs-gateway/server-mint-client.js +0 -493
  72. package/dist/checkout-engine/vgs-live-instrument.d.ts +0 -144
  73. package/dist/checkout-engine/vgs-live-instrument.js +0 -229
  74. package/dist/checkout-engine/vic-confirmation.d.ts +0 -52
  75. package/dist/checkout-engine/vic-confirmation.js +0 -45
  76. package/dist/checkout-engine/web-bot-auth.d.ts +0 -98
  77. package/dist/checkout-engine/web-bot-auth.js +0 -218
@@ -1,98 +0,0 @@
1
- import type { Page } from 'playwright-core';
2
- import { type PageAmountRead } from '../amount.js';
3
- import { type DetectResult, type FieldMap } from '../detect.js';
4
- import type { CardCredential } from '../instrument.js';
5
- import type { Contact, FillResult, FilledField, PostalAddress } from '../types.js';
6
- import { type CheckoutAdapter } from './generic.js';
7
- type ShopifySummary = {
8
- subtotalMinor: number | null;
9
- shippingMinor: number | null;
10
- taxMinor: number | null;
11
- discountMinor: number;
12
- totalMinor: number | null;
13
- currency: string | null;
14
- verified: boolean;
15
- /**
16
- * Component rows that never rendered and were counted as zero to reconcile
17
- * the total (#8669). A summary that leans on an implied row is weaker than a
18
- * fully rendered one: the row may simply not have been painted yet.
19
- */
20
- impliedZeroRows: Array<'tax' | 'shipping'>;
21
- };
22
- export declare function parseShopifySummary(text: string): ShopifySummary;
23
- export declare function readShopifyAmount(page: Page, requireVerified: boolean): Promise<PageAmountRead>;
24
- /** Consecutive identical reads (200 ms apart) an implied-zero summary must hold. */
25
- export declare const IMPLIED_ZERO_STABLE_READS = 8;
26
- export type StableShopifyAmountOptions = {
27
- /**
28
- * A merchant-authoritative total (minor units) the page must equal before an
29
- * implied-zero summary is trusted: for a trusted UCP handoff this is the
30
- * server-settled checkout total. Without it, the page must hold the same
31
- * implied-zero summary for {@link IMPLIED_ZERO_STABLE_READS} reads.
32
- */
33
- expectedMinor?: number | null;
34
- };
35
- export declare function readStableShopifyAmount(page: Page, timeoutMs?: number, options?: StableShopifyAmountOptions): Promise<PageAmountRead>;
36
- export declare function isShopifyCheckoutPage(page: Page): Promise<boolean>;
37
- export type ShopifyCheckoutSurface = {
38
- signal: string;
39
- subtype: 'recognition' | 'authentication' | 'wallet';
40
- };
41
- export type ShopifyGuestCheckoutResult = {
42
- status: 'guest-ready';
43
- signal: 'guest-card-form';
44
- } | {
45
- status: 'transitioned';
46
- signal: string;
47
- } | {
48
- status: 'action-required';
49
- signal: string;
50
- detail: string;
51
- };
52
- export declare function detectShopifyCheckoutSurface(page: Page): Promise<ShopifyCheckoutSurface | null>;
53
- /**
54
- * Resolve Shopify's reversible Shop-wallet takeover before review. The helper
55
- * only clicks an exact guest action or a scoped accessible close control inside
56
- * a positively identified Shop surface. It never solves authentication, uses a
57
- * Shop-saved payment method, force-clicks, or mutates the DOM.
58
- */
59
- export declare function ensureShopifyGuestCheckout(page: Page, options?: {
60
- timeoutMs?: number;
61
- stableMs?: number;
62
- }): Promise<ShopifyGuestCheckoutResult>;
63
- /** Read-only assertion for the irreversible credential boundary. */
64
- export declare function assertShopifyGuestCheckout(page: Page): Promise<ShopifyGuestCheckoutResult>;
65
- /**
66
- * The en-US variant of a localized Shopify checkout URL, or null when it is
67
- * already English (or not locale-suffixed). Shopify renders the checkout in
68
- * the URL's trailing locale segment, and amount reconciliation reads the
69
- * order summary by its ENGLISH labels — a store whose primary market is not
70
- * English serves /checkouts/cn/<token>/<locale> and the total never parses
71
- * (observed live 2026-08-16: /es-us rendered "Precio total" and the review
72
- * refused fail-closed on a good checkout). The locale segment is
73
- * presentation-only: swapping it keeps the same checkout session and token.
74
- */
75
- export declare function shopifyEnglishCheckoutUrl(current: string): string | null;
76
- export declare function requiredAddressRoles(address: PostalAddress, prefix?: string): string[];
77
- export declare function missingContactRoles(filled: FilledField[], expected: string[]): string[];
78
- /**
79
- * The contact surface to prefill. Shipping fields when the checkout has them —
80
- * but a digital-goods (no-shipping) Shopify checkout renders exactly one
81
- * address block and marks every field autocomplete="billing ..." (observed
82
- * live 2026-08-16: all 18 candidates billing-classified, so the shipping map
83
- * came back empty and the prefill reported every role missing). That billing
84
- * block IS the primary contact surface, under its base roles.
85
- */
86
- export declare function contactPrefillFieldMap(detected: DetectResult): {
87
- fields: FieldMap;
88
- surface: 'shipping' | 'billing-only';
89
- };
90
- export declare class ShopifyAdapter implements CheckoutAdapter {
91
- private readonly detected;
92
- name: string;
93
- constructor(detected: DetectResult);
94
- matches(detected: DetectResult): boolean;
95
- prepareContact(page: Page, contact: Contact): Promise<FillResult>;
96
- fill(page: Page, _fields: FieldMap, credential: CardCredential, _contact: Contact): Promise<FillResult>;
97
- }
98
- export {};