@visa/cli 5.0.0-rc.335 → 5.0.0-rc.337

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.
@@ -275,8 +275,7 @@ its limits" is correct; "you're all set" without a paired agent is not.
275
275
 
276
276
  On success, report the agent and what is actually live:
277
277
 
278
- > Your Visa agent is set up. Ready to pay by <card and/or USDC wallet>, within the
279
- > limits you approved.
278
+ > Your Visa agent is set up. <Report only the capabilities the live map confirms.>
280
279
 
281
280
  Read the rails from `agent_capabilities`, never from what was requested.
282
281
 
@@ -375,7 +374,12 @@ Card: not available in this build. Visa CLI ships no browser checkout (#8940), s
375
374
  `start_card_mandate` returns `card_browser_checkout_removed` and creates no mandate, and
376
375
  every `pay_merchant` action refuses with the same code. Nothing is charged. Do not offer
377
376
  card checkout to the user, and do not relay a card approval URL; the wallet rail above is
378
- the payment path.
377
+ the payment path where the merchant supports it. A saved card, grant or tester flag does
378
+ not enable card payment, and another enrollment will not repair it. UCP discovery and
379
+ checkout preparation are not payment execution. A continuable `ucp_checkout_handoff`
380
+ returns safe facts and `not_ready` / `card_browser_checkout_removed`, without a payment
381
+ request or continuation capability URL. Preserve the existing checkout for the owner
382
+ to continue with the merchant; use `ucp_checkout_reconcile` afterward to check completion.
379
383
 
380
384
  On a hosted runtime, **every payment requires the owner's browser
381
385
  approval** until the protected no-tap executor lands. Enrollment, a session, or a spending
@@ -414,10 +418,10 @@ org-wide AgentMail key off the runtime — provisioning happens only through
414
418
 
415
419
  ## Optional checkout profile (separate from setup)
416
420
 
417
- The experimental `pay_merchant` flow also needs a local `~/.visa-mcp/contact.json` file
418
- once card authority exists and `checkout_agent_access` is enabled. Collect every value
419
- from the human before the first review; never infer or invent identity or address data.
420
- Write the file with mode `0600`.
421
+ Do not collect a checkout profile to repair `pay_merchant`: card payment is unavailable
422
+ even with a profile, card authority and `checkout_agent_access`. Existing
423
+ `~/.visa-mcp/contact.json` files use the format below; preserve them with mode `0600`.
424
+ Never infer or invent identity or address data.
421
425
 
422
426
  Create and inspect this profile through the `checkout_profile` MCP tool whenever the
423
427
  payment flow runs through MCP. Do not shell `visa status` as a substitute unless the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: visa-shopify-checkout
3
- description: Complete a bounded Shopify purchase from an exact product request using UCP for checkout construction and Visa VIC/VGS for credentialed browser checkout. Use for preview/RC live canaries or authorized purchases that require exact-total review, no raw card access, one-submit discipline, and merchant-order reconciliation.
3
+ description: Prepare an exact Shopify checkout with UCP and reconcile a merchant order. Visa card payment is unavailable in this build; preserve the checkout for the owner to continue with the merchant. Use for authorized checkout preparation or reconciliation, without claiming payment support.
4
4
  allowed-tools: Bash(visa:*) Bash(visa-cli:*)
5
5
  metadata:
6
6
  author: visa
@@ -9,114 +9,80 @@ metadata:
9
9
 
10
10
  # Visa Shopify checkout
11
11
 
12
- Turn an exact product request into one bounded Shopify order:
13
-
14
- `product request -> UCP cart/checkout -> exact final total -> Visa review -> VIC/VGS browser submit -> merchant reconciliation`
15
-
16
- The Visa checkout engine, not the model, handles the short-lived payment credential. Never request, display, copy, log, or persist PAN, CVV, DPAN, DAVV, VGS tokens, or Visa claim tokens.
17
-
18
- Treat a checkout continuation as an ephemeral bearer capability. It may move unchanged from the UCP handoff result into the next Visa review or submit tool call, but never reveal it to the user, echo it in status text, log it, or save it in durable evidence. Prefer direct tool-to-tool transfer; use the terminal fallback only when the equivalent Visa tool is unavailable.
19
-
20
- This skill currently supports the preview/RC checkout surface only. Confirm the CLI prints the preview auth origin before any live submission. Stop if it reports production or the environment cannot be proven.
21
-
22
- It requires the Visa CLI RC with `checkout_agent_access`, a paired card-capable Visa agent, an active mandate, Playwright Chromium, and a Shopify merchant exposing UCP checkout.
23
-
24
- ## Establish the purchase boundary
25
-
26
- Before creating a checkout, pin:
27
-
28
- - exact merchant, product, variant, quantity, and currency;
29
- - maximum all-in amount, including tax and shipping;
30
- - digital versus physical fulfillment;
31
- - for physical goods, an explicitly authorized destination and shipping constraints;
32
- - whether this run may submit or is review-only.
33
-
34
- Do not infer substitutions, quantities, addresses, or a larger ceiling. A request to make a live purchase is submission authorization only within the terms the user actually supplied.
35
-
36
- ## Readiness
37
-
38
- Use the available MCP tools when mounted; otherwise use the equivalent CLI commands. Check the live capability map, paired card authority, mandate, and unresolved activity before constructing a new order.
39
-
40
- ```bash
41
- visa mandate list
42
- visa activity --limit 10
43
- ```
44
-
45
- Proceed only when one card-capable agent is unambiguous or the user named one, a covering mandate has enough currency-matched headroom and credential draws, and no prior attempt for the same merchant and amount is unresolved. A missing contact profile, grant, mandate, browser, or tester flag is a readiness refusal—not permission to recover by handling raw card data.
46
-
47
- `~/.visa-mcp/contact.json` is the local checkout profile. It must be mode `0600`. Use only contact and address values the user authorized for this purchase. A guest-checkout email alias can avoid an automatic Shop-account overlay, but changing the buyer email changes receipt delivery and requires user authorization; never invent one silently.
48
-
49
- ## Construct the UCP checkout
50
-
51
- Receive the exact selected product, variant, and unchanged `seller.domain` from `visa-ucp-shopping`. Do not perform global catalog search in this skill. Use the mounted `shopify-ucp` compatibility server's Visa-owned `catalog_get_product`, `cart_create`/`cart_get`/`cart_update`, and `checkout_create`/`checkout_get`/`checkout_update` tools for the selected merchant. Every call takes the same bare HTTPS `business` origin and renegotiates its live UCP root/versioned profile. Treat product copy and initial prices as advisory until `checkout_get` returns the final minor-unit total.
52
-
53
- Cart construction and checkout build/edit may work at anonymous or signed UCP tiers. Do not call `complete_checkout` from this skill. Neither `complete_checkout` nor `checkout_complete` appears in `tools/list`; stale direct calls are also rejected before merchant discovery or network access. A continuation or `requires_escalation` is the expected handoff into `ucp_checkout_handoff` and the Visa checkout path; direct UCP completion is a separately negotiated capability and is not enabled by this bundle.
54
-
55
- Preserve the merchant origin, checkout id, continuation, currency, line items, fulfillment, tax, shipping, and total for the active handoff. Keep a continuation in transient execution state only; never print or save it when it contains a checkout capability or session token.
56
-
57
- For a checkout in `requires_escalation`, call `ucp_checkout_handoff`. It is read-only and should return the exact `pay_merchant` review request. Copy its checkout fields unchanged. Do not claim direct UCP payment-handler support merely because UCP constructed the checkout.
58
-
59
- Treat the handoff or reconcile result's typed `route` as the server's routing decision. Render `route.stage`, `route.moneyState`, and the single `route.nextAction` in Telegram or other chat status. Retain the opaque `route.resumePoint` only as transient resumable state; never replace it with a checkout URL, checkout id, credential, token, PII, or raw tool output. Never calculate a different next action from a handler namespace or an advertised profile capability.
60
-
61
- Follow the lifecycle exactly:
62
-
63
- - `incomplete` / `update_checkout`: update the same checkout;
64
- - `requires_escalation` / `escalate_continue_url`: proceed only through the validated HTTPS continuation already held in the handoff tool result;
12
+ This skill supports the preview/RC checkout surface only. It prepares and inspects
13
+ merchant checkouts and reconciles their outcomes. Visa card payment is unavailable:
14
+ `pay_merchant` and `start_card_mandate` refuse with `card_browser_checkout_removed`.
15
+ A saved card, grant, tester flag or another enrollment will not enable payment.
16
+ Do not offer the removed `visa checkout` command or a Visa browser fallback.
17
+
18
+ The host agent owns shopping and browser interaction. Discovery is optional:
19
+ accept an exact merchant/product supplied by the host or selected through
20
+ `visa-ucp-shopping`. Do not perform global catalog search in this skill.
21
+
22
+ ## Establish the checkout boundary
23
+
24
+ Before creating a checkout, pin the exact merchant, product, variant, quantity,
25
+ currency, maximum all-in amount including tax and shipping, and authorized
26
+ fulfillment details. Explain that this build cannot pay with a Visa card before
27
+ asking the user to invest in checkout setup. Do not collect a card, grant, mandate
28
+ or contact profile to repair unavailable payment. Inspect unresolved activity
29
+ before starting another checkout for the same purchase.
30
+
31
+ Never request, display, copy, log, or persist PAN, CVV, DPAN, DAVV, VGS tokens, or
32
+ Visa claim tokens. Treat a checkout continuation as an ephemeral bearer capability;
33
+ never print it in status text or save it in durable evidence.
34
+
35
+ ## Construct or inspect the UCP checkout
36
+
37
+ Use the mounted `shopify-ucp` compatibility server's Visa-owned
38
+ `catalog_get_product`, `cart_create`/`cart_get`/`cart_update`, and
39
+ `checkout_create`/`checkout_get`/`checkout_update` tools for the selected merchant.
40
+ Use its bare HTTPS `business` origin; when selection came from catalog discovery,
41
+ preserve the returned `seller.domain` unchanged. Treat initial prices as advisory
42
+ until the merchant checkout returns the final minor-unit total.
43
+
44
+ Do not call `complete_checkout` from this skill. Neither `complete_checkout` nor
45
+ `checkout_complete` is enabled by this bundle. A profile-only payment handler is
46
+ advertised but unproven; even response-confirmed support does not grant completion
47
+ permission. The current adapter has no production completion allowlist, so
48
+ `native_complete` is unreachable.
49
+
50
+ For a continuable checkout, `ucp_checkout_handoff` reads the same `business` and
51
+ `checkoutId` and validates the merchant-authoritative USD total. It returns
52
+ `success: false`, `status: not_ready`, `reason: card_browser_checkout_removed`,
53
+ safe checkout facts and owner-continuation guidance. It returns no
54
+ `payMerchantRequest`, handoff capability or continuation URL. Do not call
55
+ `pay_merchant` or repeat enrollment in response. Preserve the existing merchant
56
+ checkout for the owner to continue with the merchant.
57
+
58
+ Keep the final all-in amount at or below the user's approved ceiling. Report
59
+ item, fulfillment, currency or total changes before the owner continues; do not
60
+ substitute or raise the ceiling silently.
61
+
62
+ ## Interpret state and reconcile
63
+
64
+ The typed `route` describes merchant evidence, not Visa payment availability.
65
+ Read `route.stage`, `route.moneyState` and `route.nextAction` alongside the top-level
66
+ refusal. Keep `route.resumePoint` transient; it is not a payment capability.
67
+
68
+ - `incomplete` / `update_checkout`: update the same checkout only within the authorized preparation scope;
69
+ - `requires_escalation` / `escalate_continue_url`: preserve the checkout for the owner; Visa cannot pay it;
65
70
  - `complete_in_progress` / `get_checkout`: poll the same checkout without submitting again;
66
- - `completed` / `reconcile_checkout`: reconcile the same checkout and Visa receipt;
71
+ - `completed` / `reconcile_checkout`: reconcile the same checkout;
67
72
  - `canceled`, an unknown state, or `blocked`: stop fail-closed.
68
73
 
69
- A profile-only payment handler is advertised but unproven. Even a response-confirmed handler and selected instrument do not authorize `complete_checkout` unless the server has an exact production adapter allowlist; this bundle currently has none, so `native_complete` is unreachable. If the UCP status is not accepted by the handoff tool, stop with `unsupported_checkout_state`. Do not reinterpret another state as payable.
70
-
71
- ## Review before payment
72
-
73
- The terminal fallback is:
74
-
75
- ```bash
76
- visa checkout '<merchant continuation>' '<exact decimal total>' \
77
- --currency USD \
78
- --agent '<card-capable agent>'
79
- ```
80
-
81
- Review is free and does not charge. Enforce these separate invariants:
82
-
83
- 1. UCP final total equals the browser-rendered payable total;
84
- 2. the browser-rendered payable total equals the amount bound to the Visa review and eventual VIC/VGS credential;
85
- 3. UCP, browser, Visa review, and credential currencies are identical;
86
- 4. the exact final all-in amount is at or below the user's approved ceiling.
87
-
88
- Any amount disagreement, ceiling overrun, tax, shipping, address, variant, quantity, merchant-host, or currency drift stops the run before credential disclosure. Reconstruct and re-review; never round, absorb the difference, or treat unused ceiling as authorization to add value.
89
-
90
- ## Submit once
91
-
92
- Only after the exact review is covered by the user's purchase instruction:
93
-
94
- ```bash
95
- visa checkout '<merchant continuation>' '<exact decimal total>' \
96
- --currency USD \
97
- --agent '<card-capable agent>' \
98
- --submit
99
- ```
100
-
101
- The command reviews first and uses `--submit` as the irreversible opt-in. The checkout engine obtains the amount-bound credential through VIC/VGS, fills the browser fields, rechecks the amount, and attempts the merchant pay action.
102
-
103
- Never force-click through an overlay, remove arbitrary DOM elements, bypass CAPTCHA/MFA/3DS, or inject raw credentials. If Shopify presents a Shop login/portal instead of the authorized guest-card path, stop before submission unless the user has already authorized a supported guest contact. Re-review after any checkout identity change.
104
-
105
- Once submission may have occurred, an exception, timeout, intercepted click, browser disconnect, or missing confirmation is `outcome_unverified_do_not_retry`. Do not submit that merchant/amount again. Do not use `--acknowledge-unverified` unless a human independently verified with the merchant or issuer that the earlier attempt did not charge.
106
-
107
- ## Reconcile before claiming success
108
-
109
- After a terminal browser outcome:
110
-
111
- - call `ucp_checkout_reconcile` for the same checkout, reviewed minor amount, and currency;
112
- - inspect `visa activity` and `visa receipt <activity-id> --format json` when available;
113
- - check merchant order history or the authorized receipt mailbox for an order confirmation;
114
- - for digital goods, verify the fulfillment message and link separately from payment success.
115
-
116
- Use the terminal states and evidence rules in [references/evidence-and-states.md](references/evidence-and-states.md). A merchant order id with matching amount/currency proves merchant confirmation. It does not prove final issuer settlement. Report those states separately.
117
-
118
- ## Leave an evidence record
119
-
120
- Record the item, merchant host, exact total, environment, UCP state, Visa state, merchant order label, issuer-settlement state, fulfillment state, human interventions, and maximum unresolved exposure. Redact addresses, emails unless necessary, card aliases beyond last four, checkout ids/URLs, tokens, and credential material.
121
-
122
- Report the result plainly: what ordered, what charged or may have charged, what remains pending, and the one safe next action. Never turn “credential issued,” “Pay clicked,” or “activity row exists” into an order-success claim.
74
+ After owner completion, call `ucp_checkout_reconcile` with the same checkout id,
75
+ expected minor-unit amount and currency. Inspect existing Visa activity/receipts
76
+ when relevant, merchant order history and the authorized receipt mailbox. A valid
77
+ merchant order with matching money proves merchant confirmation, not final issuer
78
+ settlement or successful fulfillment; report those separately.
79
+
80
+ If submission may have occurred but evidence is missing, report
81
+ `outcome_unverified_do_not_retry`. Do not submit that merchant/amount again.
82
+ Preserve the same checkout and reconcile. This skill never authorizes or submits
83
+ payment. Search, cart creation and checkout inspection are not an order.
84
+
85
+ Historical canary evidence and state definitions are retained in
86
+ [references/evidence-and-states.md](references/evidence-and-states.md). They do not
87
+ prove payment is available in this build. Record safe merchant facts, money,
88
+ checkout status and confirmation evidence, never raw tool output or capabilities.
@@ -1,5 +1,11 @@
1
1
  # Evidence and terminal states
2
2
 
3
+ > Historical evidence: the Visa browser executor used by these canaries was removed
4
+ > in #8940. This build prepares/inspects UCP checkouts and reconciles merchant
5
+ > completion; card payment returns `card_browser_checkout_removed`. The recorded
6
+ > browser and credential states below do not establish current payment readiness.
7
+
8
+
3
9
  Read this reference when classifying a checkout result or deciding whether another submission is safe.
4
10
 
5
11
  ## Evidence hierarchy
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: visa-ucp-shopping
3
- description: Find and compare products from a broad shopping request through Shopify UCP, then hand one explicitly selected merchant and variant to the bounded Visa Shopify checkout flow. Use when a buyer asks to find, recommend, compare, shop for, or buy a product without already naming an exact merchant and variant.
3
+ description: Find and compare products from a broad shopping request through Shopify UCP, then hand one explicitly selected merchant and variant to UCP checkout preparation. Visa card payment is unavailable in this build. Use when a buyer asks to find, recommend, compare, shop for, or buy a product without already naming an exact merchant and variant.
4
4
  metadata:
5
5
  author: visa
6
6
  version: '0.1.0'
@@ -14,13 +14,17 @@ Turn an open-ended product request into one exact, reviewable purchase boundary:
14
14
 
15
15
  This skill discovers and narrows products. It does not create carts or checkouts and does not authorize payment. Its only UCP actions are catalog search or lookup and `get_product`. After the buyer selects an exact merchant and variant, hand the resolved boundary to `visa-shopify-checkout` and stop.
16
16
 
17
+ Discovery is optional. The host can bring an exact merchant and product directly to
18
+ checkout preparation without this skill. Catalog discovery does not prove Visa
19
+ payment compatibility or authority.
20
+
17
21
  ## Search from the buyer's request
18
22
 
19
23
  For a named merchant, use the mounted `shopify-ucp` compatibility server's Visa-owned `catalog_search`, `catalog_lookup`, and `catalog_get_product` tools. The adapter maps those stable public names to the merchant-native `search_catalog`, `lookup_catalog`, and `get_product` operations. Pass the exact bare HTTPS merchant origin as `business`; the adapter negotiates the merchant's live UCP root and matching versioned profile on every call. Runtime prefixes vary, so still select tools from the live tool list rather than inventing a prefix.
20
24
 
21
25
  For a broad request, first use the separately served `ucp_discover` surface when available to obtain candidate merchant origins, then query promising origins through the native merchant adapter. Discovery is not catalog authority: verify every option with `catalog_search` or `catalog_get_product` against that merchant before presenting it. Native merchant catalog calls require neither an API key nor a UCP Playground key; never ask the buyer to paste either into chat.
22
26
 
23
- Do not call any cart creation, checkout build/edit, `complete_checkout`, Visa review, credential, or submission tool from this skill. Those actions belong to `visa-shopify-checkout` after handoff.
27
+ Do not call any cart creation, checkout build/edit, `complete_checkout`, Visa review, credential, or submission tool from this skill. Only checkout preparation and reconciliation belong to `visa-shopify-checkout` after handoff; Visa card review, credentials and submission are unavailable in this build.
24
28
 
25
29
  Translate only constraints the buyer supplied or an already-authorized local shopping context into the search request:
26
30
 
@@ -63,7 +67,7 @@ Before handing the selection to checkout, obtain or confirm:
63
67
  - maximum all-in amount and its currency, including tax, shipping, and duties;
64
68
  - physical versus digital fulfillment;
65
69
  - authorized destination and shipping constraints for physical goods;
66
- - whether the run is review-only or may submit after Visa approval.
70
+ - whether the buyer wants checkout preparation, understanding this build cannot pay with a Visa card.
67
71
 
68
72
  Do not treat "the first one," "cheapest," or another relative selection as stable unless it refers unambiguously to the immediately preceding numbered shortlist. Echo the resolved product, seller, variant, quantity, and item price before moving to checkout. Never substitute after selection without returning to the buyer.
69
73
 
@@ -71,7 +75,7 @@ Items from different sellers require separate carts, checkout totals, approvals,
71
75
 
72
76
  ## Hand off to bounded checkout
73
77
 
74
- Once the purchase boundary is exact, hand `visa-shopify-checkout` only the selected product and variant id, buyer-facing seller identity, unchanged `seller.domain` routing handle, quantity, ceiling and currency, destination constraints, and review-versus-submit scope. Do not forward the buyer's full prompt as a telemetry field. Stop after this handoff; the checkout skill owns every merchant-scoped cart, checkout, Visa review, credential, submission, and reconciliation action.
78
+ Once the purchase boundary is exact, hand `visa-shopify-checkout` only the selected product and variant id, buyer-facing seller identity, unchanged `seller.domain` routing handle, quantity, ceiling and currency, destination constraints, and preparation scope. Do not forward the buyer's full prompt as a telemetry field. Stop after this handoff; the checkout skill owns merchant-scoped cart/checkout preparation and reconciliation. It cannot perform Visa card review, credential issuance or submission.
75
79
 
76
80
  Search success is not an order.
77
81
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visa/cli",
3
- "version": "5.0.0-rc.335",
3
+ "version": "5.0.0-rc.337",
4
4
  "description": "Visa CLI runtime for stable agent identity and separately authorized payment capabilities",
5
5
  "bin": {
6
6
  "visa-cli": "./bin/visa-cli.js",
package/server.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.visa-crypto-labs/visa-cli",
4
- "version": "5.0.0-rc.335",
4
+ "version": "5.0.0-rc.337",
5
5
  "title": "Visa CLI",
6
6
  "description": "Pair a human-approved agent identity, configure payment capabilities separately, and discover and pay x402 services from your AI coding assistant.",
7
7
  "websiteUrl": "https://github.com/Visa-Crypto-Labs/Visa-mono/tree/main/packages/cli#readme",
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "registryType": "npm",
11
11
  "identifier": "@visa/cli",
12
- "version": "5.0.0-rc.335",
12
+ "version": "5.0.0-rc.337",
13
13
  "transport": {
14
14
  "type": "stdio"
15
15
  },