@visa/cli 4.1.0-rc.37 → 4.1.0-rc.38
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/README.md +79 -36
- package/dist/cli.js +372 -335
- package/dist/mcp-server/index.js +297 -260
- package/dist/skills/pair-visa-agent/RUNTIMES.md +92 -79
- package/dist/skills/pair-visa-agent/SKILL.md +197 -311
- package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
- package/package.json +2 -2
- package/server.json +3 -3
package/README.md
CHANGED
|
@@ -1,21 +1,19 @@
|
|
|
1
1
|
# @visa/cli
|
|
2
2
|
|
|
3
|
-
Visa CLI v4
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
USDC and explicit maxima; `checkout` / `mandate` handles larger VIC browser
|
|
18
|
-
purchases.
|
|
3
|
+
Visa CLI v4 pairs an AI runtime to a human-approved **Visa agent identity**.
|
|
4
|
+
The pairing ceremony creates one stable agent ID and activates one
|
|
5
|
+
runtime-custodied Ed25519 identity key. It does not silently create a wallet,
|
|
6
|
+
card credential, budget, mailbox, `.visa` name, or TAP listing.
|
|
7
|
+
|
|
8
|
+
The product flow has three explicit parts:
|
|
9
|
+
|
|
10
|
+
1. **Identity** — `enroll_agent` (or `visa agent enroll`) opens one browser
|
|
11
|
+
review for the exact runtime and public-key fingerprint. The private key
|
|
12
|
+
stays on the runtime device.
|
|
13
|
+
2. **Capabilities** — payment methods, spend grants, email and directory
|
|
14
|
+
bindings are configured separately, each with its own human-visible terms.
|
|
15
|
+
3. **Use** — when a separately provisioned capability exists, the wallet and
|
|
16
|
+
VIC commands enforce that capability's own policy and approval boundary.
|
|
19
17
|
|
|
20
18
|
## Install
|
|
21
19
|
|
|
@@ -65,27 +63,59 @@ args = ["<npm root -g>/@visa/cli/dist/mcp-server/index.js"]
|
|
|
65
63
|
|
|
66
64
|
There is no CLI subcommand for starting the MCP server directly — the MCP server is the bundled `dist/mcp-server/index.js` entrypoint, which `visa-cli connect <client>` registers for you.
|
|
67
65
|
|
|
68
|
-
##
|
|
66
|
+
## Pair an agent identity
|
|
67
|
+
|
|
68
|
+
From MCP, call **`enroll_agent`** with `{"action":"start"}`. It creates the
|
|
69
|
+
runtime's Ed25519 key locally, verifies the terminal/browser channel, and opens
|
|
70
|
+
the identity-only review. After the human approves, call `enroll_agent` with
|
|
71
|
+
`{"action":"claim"}` to activate and durably store the identity.
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
visa agent enroll # opens the one human review page
|
|
75
|
+
visa agent enroll-claim # resumes delivery/activation after approval
|
|
76
|
+
visa agent list
|
|
77
|
+
visa agent show <agent-id>
|
|
78
|
+
```
|
|
69
79
|
|
|
70
|
-
|
|
80
|
+
The advanced `create` → `claim` → `verify` → `resume` commands are the
|
|
81
|
+
split-device choreography of this same v2 ceremony, not a second enrollment
|
|
82
|
+
system. The review shows the runtime, context, stable agent ID, full public-key
|
|
83
|
+
fingerprint, and expiry. It grants identity only; no spend limits or instruments
|
|
84
|
+
are implied.
|
|
71
85
|
|
|
72
|
-
|
|
73
|
-
|
|
86
|
+
On macOS and Linux, the private identity key is stored under
|
|
87
|
+
`~/.visa-cli/agents` in an owner-only directory with file mode `0600`. It is
|
|
88
|
+
currently an exportable local file: copying it transfers identity proof, and
|
|
89
|
+
losing it blocks new proofs because same-agent key recovery is not yet
|
|
90
|
+
available. Protocol-v2 identity pairing fails closed on Windows until the CLI
|
|
91
|
+
can apply and verify an owner-only Windows ACL. The pairing link contains no
|
|
92
|
+
credential or private key.
|
|
74
93
|
|
|
75
|
-
##
|
|
94
|
+
## Recover an existing account session
|
|
76
95
|
|
|
77
|
-
|
|
96
|
+
`visa agent login` opens the Turnkey-first web sign-in for an existing v4
|
|
97
|
+
account, then `visa agent login-claim` stores the returned account session in
|
|
98
|
+
the OS keychain. `--wait` keeps the first command polling for the full
|
|
99
|
+
15-minute browser window.
|
|
78
100
|
|
|
79
101
|
```bash
|
|
80
|
-
visa agent
|
|
81
|
-
visa agent claim
|
|
82
|
-
visa agent verify <pairing-id> <code> # verifies the channel, opens the authorization page
|
|
83
|
-
visa agent list # shows the activated runtime
|
|
102
|
+
visa agent login # sign in and display the terminal confirmation code
|
|
103
|
+
visa agent login-claim # resume pickup after returning from the browser
|
|
84
104
|
```
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
This is account-session recovery, not agent pairing. It does not create or
|
|
107
|
+
replace an identity key, delegate a wallet, select a card, set a budget, or
|
|
108
|
+
grant spend authority. The pending PKCE verifier is kept under
|
|
109
|
+
`~/.visa-cli/session-recovery/` in owner-only local state and is pinned to the
|
|
110
|
+
exact web origin that started the flow.
|
|
111
|
+
Session recovery currently fails closed on Windows until the CLI can apply and
|
|
112
|
+
verify an owner-only ACL for this pending verifier.
|
|
113
|
+
|
|
114
|
+
## Existing wallet capability: caps, then funding
|
|
87
115
|
|
|
88
|
-
|
|
116
|
+
These commands apply only to a pre-cutover/test runtime that already has a
|
|
117
|
+
valid, separately provisioned wallet credential. Pairing again cannot create or
|
|
118
|
+
repair that payment capability.
|
|
89
119
|
|
|
90
120
|
```bash
|
|
91
121
|
visa wallet limits --per-transaction 0.25 --daily 2.00 # BEFORE any funds arrive
|
|
@@ -120,8 +150,8 @@ command.
|
|
|
120
150
|
|
|
121
151
|
| Tool | Description |
|
|
122
152
|
|------|-------------|
|
|
123
|
-
| `enroll_agent` | Two-step
|
|
124
|
-
| `wallet_status` |
|
|
153
|
+
| `enroll_agent` | Two-step identity-only pairing: start opens the exact runtime/key review; `{"action":"claim"}` activates and stores the agent identity |
|
|
154
|
+
| `wallet_status` | Separately provisioned wallet address, network, and policy state |
|
|
125
155
|
| `wallet_policy_set` | Set per-transaction / daily caps (with human approval) |
|
|
126
156
|
| `wallet_discover` | Sweep x402 directories for services, with live re-probing |
|
|
127
157
|
| `wallet_probe` | Fetch a service's live 402 challenge without paying |
|
|
@@ -163,7 +193,15 @@ visa pay <listing-id> --max <usd>
|
|
|
163
193
|
visa activity
|
|
164
194
|
visa receipt <receipt-id>
|
|
165
195
|
|
|
166
|
-
#
|
|
196
|
+
# Primary same-machine v2 identity pairing
|
|
197
|
+
visa agent enroll
|
|
198
|
+
visa agent enroll-claim
|
|
199
|
+
|
|
200
|
+
# Existing-account session recovery (separate from identity pairing)
|
|
201
|
+
visa agent login
|
|
202
|
+
visa agent login-claim
|
|
203
|
+
|
|
204
|
+
# Advanced split-device form of the same v2 ceremony
|
|
167
205
|
visa agent create
|
|
168
206
|
visa agent claim <pairing-id> --runtime <name> --context "<purpose>"
|
|
169
207
|
visa agent verify <pairing-id> <code>
|
|
@@ -200,14 +238,18 @@ visa-cli feedback # submit feedback
|
|
|
200
238
|
|
|
201
239
|
| Path | Contents |
|
|
202
240
|
|------|----------|
|
|
203
|
-
| `~/.visa-
|
|
204
|
-
| `~/.visa-cli/` |
|
|
241
|
+
| `~/.visa-cli/pairings/` | Pending ceremony verifier or runtime identity key (owner-only mode 0600 on macOS/Linux; v2 pairing currently disabled on Windows) |
|
|
242
|
+
| `~/.visa-cli/agents/` | Activated agent identity, runtime private key, and signed activation credentials (owner-only mode 0600 on macOS/Linux; v2 pairing currently disabled on Windows) |
|
|
243
|
+
| `~/.visa-cli/session-recovery/` | Pending login-only PKCE verifier and pinned web origin (owner-only mode 0600 on macOS/Linux) |
|
|
244
|
+
| `~/.visa-mcp/agent-credential.json` | Legacy checkout-credential compatibility record (mode 0600) |
|
|
205
245
|
| `~/.visa-v4/policy.json` | Wallet spend policy — never edit by hand; use `visa wallet limits` |
|
|
206
246
|
|
|
207
247
|
## Troubleshooting
|
|
208
248
|
|
|
209
|
-
**Wallet commands report
|
|
210
|
-
|
|
249
|
+
**Wallet commands report that payment setup is required**
|
|
250
|
+
Identity pairing deliberately grants no payment authority. Complete the
|
|
251
|
+
separate wallet/instrument and spend-policy setup when available; pairing again
|
|
252
|
+
will not upgrade an identity into a signer.
|
|
211
253
|
|
|
212
254
|
**`policy refused` from `pay`**
|
|
213
255
|
A cap or allowlist said no; nothing was signed. Raise caps only via `visa wallet limits` with the human's approval.
|
|
@@ -216,7 +258,8 @@ A cap or allowlist said no; nothing was signed. Raise caps only via `visa wallet
|
|
|
216
258
|
That URL isn't payment-gated — probe the service's actual paid route (`wallet_probe` / `visa find`).
|
|
217
259
|
|
|
218
260
|
**Pairing ended `expired` or `cancelled`**
|
|
219
|
-
The ceremony timed out —
|
|
261
|
+
The ceremony timed out — restart with `visa agent enroll`, then run
|
|
262
|
+
`visa agent enroll-claim` after approving the new browser review.
|
|
220
263
|
|
|
221
264
|
**Tools don't appear in the AI client**
|
|
222
265
|
Restart the client or reconnect the MCP server (`/mcp` → `visa-cli` → reconnect in Claude Code). Re-run `visa-cli connect <client>` to rewrite the config.
|