@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
package/README.md CHANGED
@@ -7,13 +7,12 @@ a mailbox, or a `.visa` name. New paired agents request publication of their
7
7
  public key to the TAP directory by default; owners can durably remove it with
8
8
  `visa agent tap-opt-out <agent-id>`.
9
9
 
10
- The product flow has three explicit parts:
10
+ The protected product flow has three explicit parts:
11
11
 
12
- 1. **Identity** — `setup_start` (or `visa setup start`) opens ONE browser
13
- review that covers the exact runtime, its public-key fingerprint, and every
14
- requested rail in a single owner approval. The private key stays on the
15
- runtime device. The older identity-only doors remain callable for an
16
- already-started integration but are hidden from normal discovery.
12
+ 1. **Enrollment** — in this build the owner runs `visa agent enroll-protected`
13
+ and approves the exact device and its limits in the browser. The private key
14
+ stays on the runtime device. Retired setup, pairing, handoff, and per-rail
15
+ grant names return `legacy_door_removed`; they never resume or proxy work.
17
16
  2. **Capabilities** — payment methods, spend grants, email and directory
18
17
  bindings are configured separately, each with its own human-visible terms.
19
18
  3. **Use** — when a separately provisioned capability exists, the wallet and
@@ -134,51 +133,31 @@ Visa sidebands no longer pollute business JSON. Clients receive keys such as `io
134
133
 
135
134
  ## Setup doors
136
135
 
137
- There is one blessed door for each transition. Recovery commands are kept
138
- discoverable only where a shipped flow prints them; legacy starts remain callable
139
- for compatibility but do not appear in normal CLI or MCP discovery.
136
+ There is one protected enrollment workflow. The CLI is its only entrance in
137
+ this build; a future canonical MCP entrance may call the same workflow. Legacy
138
+ names are hidden refusals, not compatibility paths.
140
139
 
141
140
  | Transition | Blessed door | Status |
142
141
  |---|---|---|
143
- | New agent from an AI runtime or terminal | `setup_start` / `visa setup start` | Canonical: identity and requested rails on one review page |
144
- | Agent already created in Console | `agent_handoff_claim` / `visa agent handoff-claim <code>` | Canonical Console handoff |
145
- | Existing owner account on this device | `agent_login` / `visa agent login` | Canonical sign-in |
146
- | Resume the canonical setup after restart | `setup_status`, then `setup_resume` / `visa setup status`, then `visa setup open` | Canonical recovery |
147
- | Finish an already-started legacy pairing | `enroll_agent` action `claim` / `visa agent enroll-claim`, `claim`, or `pairing-resume` as printed | Recovery compatibility only |
142
+ | New agent, from any runtime | `visa agent enroll-protected --authority-url <origin> --auth-url <origin> --url <origin>` | Current entrance to protected enrollment |
143
+ | Existing owner account on this device | `agent_login` / `visa agent login` | Canonical sign-in; adds no agent |
148
144
  | Resume a paused agent | `visa agent resume <agent-id>` | Live lifecycle control, not enrollment |
149
- | Start an identity-only legacy pairing | `enroll_agent` / `visa agent enroll`, `pair`, `create`, `verify` | Hidden compatibility; do not start here |
150
145
 
151
146
  ## Pair an agent identity
152
147
 
153
- For a NEW agent, call **`setup_start`** with the name the human chooses: one
154
- resumable setup covers identity plus every requested rail in a single owner
155
- approval on one review page, and `setup_status` / `setup_resume` carry it
156
- across restarts. From a terminal, `visa setup start "<name>"` begins the same
157
- operation.
158
-
159
- For a wallet setup, `completed` on the server is necessary but not sufficient
160
- for the runtime to report ready. `setup_status` first verifies the exact-agent
161
- local signing path used by wallet preflight and payments; managed runtimes make
162
- one bounded recovery attempt. Until that evidence is readable, the result is
163
- `wallet_runtime_not_ready`, no payment is attempted, and the setup record stays
164
- available for a later resume.
165
-
166
- The identity-only legacy handler remains callable for an existing integration or
167
- an already-started ceremony, but it is deliberately absent from normal discovery.
168
- Do not start a new agent there.
148
+ For a new agent, the owner starts the protected command with the three trusted
149
+ origins supplied by the operator, opens the printed URL, enters its short code,
150
+ and approves the device and limits. Repeat the same command with `--wait` to
151
+ finish an interrupted local wait. The old setup and pairing names do not resume
152
+ an earlier ceremony; they return one deterministic refusal and the current
153
+ command.
169
154
 
170
155
  ```bash
171
- visa setup start "Name" # one review page, one approval, every rail
156
+ visa agent enroll-protected --authority-url <origin> --auth-url <origin> --url <origin> --wait
172
157
  visa agent list
173
158
  visa agent show <agent-id>
174
159
  ```
175
160
 
176
- The advanced `create` → `claim` → `verify` → `pairing-resume` commands are the
177
- split-device choreography of this same v2 ceremony, not a second enrollment
178
- system. The review shows the runtime, context, stable agent ID, full public-key
179
- fingerprint, and expiry. It grants identity only; no spend limits or instruments
180
- are implied.
181
-
182
161
  On macOS and Linux, the private identity key is stored under
183
162
  `~/.visa-cli/agents` in an owner-only directory with file mode `0600`. It is
184
163
  currently an exportable local file: copying it transfers identity proof, and
@@ -261,17 +240,15 @@ is required so the CLI never guesses which agent can spend.
261
240
 
262
241
  ## MCP tools (v4 surface)
263
242
 
243
+ Rows marked **Removed** are kept so old transcripts still resolve: the tool is
244
+ no longer in `tools/list`, and a direct call by name answers
245
+ `legacy_door_removed` naming the one door for a new agent,
246
+ `visa agent enroll-protected`.
247
+
264
248
  | Tool | Description |
265
249
  |------|-------------|
266
250
  | `agent_capabilities` | Derived live capability map (identity, wallet, card, mail, tap, subway) with upgrade paths |
267
- | `setup_agent` | Next-step resolver for the wallet rail: `{state, nextAction, blockedBy, steps}`; never spends |
268
251
  | `agent_login` | Start/claim the owner's device account session (required before a grant) |
269
- | `setup_start` | Start ONE resumable setup (identity + rails) in a single human approval; returns the review link and this device's half of the compare code |
270
- | `setup_status` | Read the server's one `nextAction` and polling cadence; terminal wallet results additionally require exact-agent local signing evidence before reporting ready |
271
- | `setup_resume` | Put the review link and compare code back in front of the human after a restart or a closed tab |
272
- | `setup_cancel` | Abandon a setup still waiting on the human; never undoes an approval |
273
- | `agent_connect` | Initiate an owner-approved spending grant for a paired agent |
274
- | `agent_connect_poll` | Poll that grant ceremony to activation (returns caps, and the funding address for wallet) |
275
252
  | `wallet_status` | Delegated wallet address, network, and policy state |
276
253
  | `wallet_policy_set` | Set per-transaction / daily caps (with human approval) |
277
254
  | `wallet_discover` | Sweep x402 directories for services, with live re-probing |
@@ -281,6 +258,13 @@ is required so the CLI never guesses which agent can spend.
281
258
  | `wallet_history` | Journaled payment receipts |
282
259
  | `wallet_fund` | Funding instructions for the wallet address |
283
260
  | `checkout_merchants` | Read-only: merchants where your card has completed real checkouts, from this device's receipts |
261
+ | `setup_agent` | **Removed.** Use `visa agent enroll-protected` |
262
+ | `setup_start` | **Removed.** Use `visa agent enroll-protected` |
263
+ | `setup_status` | **Removed.** Use `visa agent enroll-protected` |
264
+ | `setup_resume` | **Removed.** Use `visa agent enroll-protected` |
265
+ | `setup_cancel` | **Removed.** Use `visa agent enroll-protected` |
266
+ | `agent_connect` | **Removed.** Authority is approved during `visa agent enroll-protected` |
267
+ | `agent_connect_poll` | **Removed.** Authority is approved during `visa agent enroll-protected` |
284
268
  | `get_status` | Account and wallet state summary |
285
269
  | `feedback` | Submit feedback on a tool result |
286
270
  | `reset` | Clear local auth state and credentials |