@visa/cli 4.1.0-rc.72 → 4.1.0-rc.74
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/dist/cli.js +287 -286
- package/dist/mcp-server/index.js +217 -216
- package/dist/skills/pair-visa-agent/SKILL.md +71 -54
- package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -6,7 +6,7 @@ allowed-tools: Bash(visa:*) Bash(visa-cli:*) Bash(node:*) Bash(npm:*) Bash(npx:*
|
|
|
6
6
|
metadata:
|
|
7
7
|
author: visa
|
|
8
8
|
homepage: https://visacli.sh/agents
|
|
9
|
-
version: '0.6.
|
|
9
|
+
version: '0.6.8'
|
|
10
10
|
# OpenClaw-namespaced extension (agentskills.io keeps `metadata` free-form, so
|
|
11
11
|
# non-standard runtime config lives here — `user-invocable` is not a standard
|
|
12
12
|
# top-level field). OpenClaw auto-installs `install[]` when `requires.bins` are
|
|
@@ -189,59 +189,76 @@ possible (re-pairing an existing identity silently dead-ends). Do this instead:
|
|
|
189
189
|
Missing **spend** blocks _checkout mandates_, not a delegated x402 wallet — but that
|
|
190
190
|
wallet must first be acquired by owner approval (below); it is never self-minted.
|
|
191
191
|
|
|
192
|
-
## What you can do once paired —
|
|
193
|
-
|
|
194
|
-
Pairing binds **identity only**. To let this agent pay
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
(`
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
`
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
`
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
192
|
+
## What you can do once paired — granting spend authority (card or wallet)
|
|
193
|
+
|
|
194
|
+
Pairing binds **identity only**. To let this agent pay, the human owner must **delegate**
|
|
195
|
+
a spend rail — the runtime never self-mints one. There are two rails, and **one** ceremony
|
|
196
|
+
drives both:
|
|
197
|
+
|
|
198
|
+
- **`wallet:x402`** (Turnkey stablecoin) — owner approves with their **sign-in session, no
|
|
199
|
+
passkey**. On mainnet `wallet_init` throws `WalletCredentialRequiredError` until this
|
|
200
|
+
delegation lands, so never call it as a setup step.
|
|
201
|
+
- **`card:vic`** (Visa card checkout) — owner approves with a **passkey**.
|
|
202
|
+
|
|
203
|
+
The contract is identical for both rails, and it is **one command from you, one approval
|
|
204
|
+
from the owner**. You never hand a command, code, or URL back to the human after they
|
|
205
|
+
approve — you poll to completion yourself:
|
|
206
|
+
|
|
207
|
+
1. **You run one command** naming the rail and caps.
|
|
208
|
+
2. **The owner opens the returned link and approves once** (they may adjust the amount).
|
|
209
|
+
3. **You poll to activation** — the owner does nothing further.
|
|
210
|
+
|
|
211
|
+
- [ ] **Pair** the identity (the flow above). Identity only — no rail yet.
|
|
212
|
+
- [ ] **Establish the owner session once.** Grant creation is an account operation, so this
|
|
213
|
+
runtime needs a live owner session: `agent_login` (MCP) or `visa agent login` (CLI).
|
|
214
|
+
This is a short-lived session established once for the grant — **not** a re-pair, and
|
|
215
|
+
**not** something the owner repeats per payment. If `agent_connect` later returns
|
|
216
|
+
`{"code":"session_required"}`, the session lapsed — run `agent_login` again.
|
|
217
|
+
- [ ] **Initiate the grant from MCP — no shelling, no invented URLs.** Call `agent_connect`
|
|
218
|
+
with the rail and caps: `{"rail":"card","ceiling":"<usd>","perTransaction":"<usd>"}`
|
|
219
|
+
(or `"rail":"wallet"`); omit `agentId` to target the most recently paired agent. It
|
|
220
|
+
returns `{ url, code, attachId, willGrant, expiresAt }`. Present the **bare `url` and
|
|
221
|
+
`code` exactly as returned** — never construct, shorten, or guess a Visa URL, and never
|
|
222
|
+
open it yourself. The crypto approval happens in the owner's browser and cannot run
|
|
223
|
+
inline in chat. (`setup_agent {"rail":"card"|"wallet"}` returns the same next-step map
|
|
224
|
+
if you need it.)
|
|
225
|
+
- [ ] **Owner approves once** on the **v4 agent dashboard** (`app.visacli.sh/agent/enroll`),
|
|
226
|
+
confirming the caps — **card with a passkey, wallet with their sign-in session**. You
|
|
227
|
+
cannot approve on their behalf.
|
|
228
|
+
- [ ] **Poll to activation from MCP.** Call `agent_connect_poll` (`{"attachId":"<from
|
|
229
|
+
agent_connect>"}`; or resume by `agentId`) — one bounded poll per call. It returns
|
|
230
|
+
`{"ok":false,"state":"...","blockedByKind":"awaiting_human_approval"}` while pending;
|
|
231
|
+
call again until `{"ok":true,"state":"grant_activated","caps":...}` (wallet also
|
|
232
|
+
returns `fundAddress`). Activation registers the delegated signer + caps: wallet writes
|
|
233
|
+
the Turnkey credential (`turnkey.json`); card writes the card pointer. It never spends.
|
|
234
|
+
- [ ] **Confirm the rail is live.** Wallet: `wallet_status` / `visa wallet show`
|
|
235
|
+
(`agent_capabilities.wallet.available`). Card: `agent_capabilities.card.available`.
|
|
236
|
+
Only a delegated credential — not the served tool list — means the rail is usable.
|
|
237
|
+
- [ ] **Then spend against the owner-approved caps.** Wallet: set the policy with
|
|
238
|
+
`wallet_policy_set` (per-transaction / daily / session USD caps + optional network and
|
|
239
|
+
merchant allow/deny lists that refuse an x402 payment BEFORE it is signed), then
|
|
240
|
+
`wallet_pay`. Card: `start_card_mandate` then `pay_merchant`. Never raise a
|
|
241
|
+
human-approved limit yourself.
|
|
242
|
+
|
|
243
|
+
**Raw CLI equivalent (one shot).** If you cannot drive MCP, the same ceremony runs from the
|
|
244
|
+
CLI and `--wait` polls to activation in a single call. Present the URL it prints — don't
|
|
245
|
+
invent one:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
visa agent grant-card <agentId> --ceiling <usd> --per-transaction <usd> --wait
|
|
249
|
+
visa agent grant-wallet <agentId> --ceiling <usd> --per-transaction <usd> --wait
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Use the stable `agentId` from pairing or `visa agent list` — never invent or alter the id.
|
|
253
|
+
A policy refusal or timeout means **nothing was signed**: report it and stop; do not retry
|
|
254
|
+
with a different command or a reconstructed URL.
|
|
255
|
+
|
|
256
|
+
Once a wallet is delegated and a policy is set, these are the served wallet tools this agent
|
|
257
|
+
can actually call: `wallet_discover` (search the public x402 Bazaar), `wallet_probe` (read a
|
|
258
|
+
challenge without paying), `wallet_pay` / `wallet_directory_pay` (pay, policy-enforced),
|
|
259
|
+
`wallet_history` / `wallet_reconcile` (local ledger + resolve `reconciling` holds),
|
|
260
|
+
`wallet_fund` (funding address + faucet), and `wallet_export` (export key material —
|
|
261
|
+
dangerous). All spending is gated by the owner-approved local policy caps.
|
|
245
262
|
|
|
246
263
|
## Core flow
|
|
247
264
|
|
|
Binary file
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
|
3
3
|
"name": "io.github.visa-crypto-labs/visa-cli",
|
|
4
|
-
"version": "4.1.0-rc.
|
|
4
|
+
"version": "4.1.0-rc.74",
|
|
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": "4.1.0-rc.
|
|
12
|
+
"version": "4.1.0-rc.74",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
},
|