@visa/cli 4.1.0-rc.66 → 4.1.0-rc.68

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.
@@ -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.6'
9
+ version: '0.6.7'
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
@@ -165,15 +165,20 @@ possible (re-pairing an existing identity silently dead-ends). Do this instead:
165
165
  Read the name from the response. Do **not** start another hand-off. `--new` /
166
166
  `force:true` exists only if they explicitly want a _second, separate_ agent.
167
167
  2. **Report status honestly — "connected" is five separate things**, not one. Never
168
- imply the agent can spend just because it's connected:
168
+ imply the agent can spend just because it's connected. Don't guess from prose —
169
+ read it live from tools: `agent_capabilities` returns the DERIVED capability map
170
+ (the identity + wallet + mail base plus card/tap/subway availability),
171
+ `get_status` reports enrollment / account / version, and `agent_login` establishes
172
+ or confirms the account session that spending grants require.
169
173
  - **Identity** — connected (`.visa` name bound to _this user's_ account). ✓ once `already_connected`.
170
- - **Spending** — a _separate human approval_, and there are two rails. For the
171
- Turnkey **wallet** (x402 stablecoin), the owner approves a wallet grant in
172
- **account settings agent wallet → Spend** (see "What you can do once paired"
173
- below). For **card** checkout, the owner approves in **account settings → agent
174
- card Spend**. You **cannot** self-grant either; never tell the user to run
175
- `visa agent add-rail` (it refuses identity-only agents), and never self-mint a
176
- wallet with `wallet_init` on mainnet it throws until the owner's delegation lands.
174
+ - **Spending** — a _separate human approval_, and there are two rails, each
175
+ approved on the **v4 agent dashboard** (`app.visacli.sh/agent/enroll`) not any
176
+ account-settings page (that legacy surface is retired). The Turnkey
177
+ **wallet:x402** rail (stablecoin) is approved with the owner's **sign-in session**
178
+ (the Google/email auth-proxy) **no passkey**. The **card:vic** rail is approved
179
+ with a **passkey**. You **cannot** self-grant either; there is no
180
+ `visa agent add-rail` command, and never self-mint a wallet with `wallet_init` on
181
+ mainnet — it throws until the owner's delegation lands.
177
182
  - **Mesh (`.visa` messaging)** — with `SUBWAY_MESH=visa`, a returning device now
178
183
  registers on `pair`; if `meshRegistered` is false, `visa register <name>` joins it.
179
184
  - **Trusted (TAP)** — follows spend/provisioning; don't promise it before then.
@@ -193,24 +198,50 @@ never self-mints it. On mainnet (production) `wallet_init` throws
193
198
  setup step. Follow this sequence:
194
199
 
195
200
  - [ ] **Pair** the identity (the flow above). Identity only — no wallet yet.
196
- - [ ] **Resolve the next step** with `setup_agent` (`{"rail":"wallet"}`), or drive the
197
- raw `visa agent grant-wallet <agentId>` ceremony. `setup_agent` reports
198
- `needs_wallet` and points at the owner-approval grant it does not tell you to
199
- self-mint.
200
- - [ ] **Owner approves the wallet.** The human runs / confirms the wallet grant and
201
- approves it in the account UI (**account settings → agent wallet Spend**),
202
- confirming caps and passkey. That approval registers the delegated signer + caps
203
- and writes the delegated Turnkey credential (`turnkey.json`) to this runtime.
204
- You cannot approve on their behalf.
201
+ - [ ] **Sign in the account session FIRST.** Wallet delegation is an account
202
+ operation, so this runtime needs a live owner session before `grant-wallet`:
203
+ `agent_login` (MCP) or `visa agent login` (CLI). Without a session the grant has
204
+ no account to delegate from.
205
+ - [ ] **Initiate the wallet grant from MCP no shelling.** Call `agent_connect`
206
+ (`{"rail":"wallet","ceiling":"<usd>","perTransaction":"<usd>"}`); omit `agentId`
207
+ to target the most recently paired agent. It creates the delegation request and
208
+ returns `{ url, code, attachId, willGrant, expiresAt }`. Present the bare `url`
209
+ and `code` to the human exactly as returned — the crypto approval happens in the
210
+ browser and **cannot** run inline in chat. Prefer this over the raw
211
+ `visa agent grant-wallet <agentId>` CLI ceremony; `setup_agent` (`{"rail":"wallet"}`)
212
+ still sequences identity → wallet → policy → ready if you need the next-step map.
213
+ If `agent_connect` returns `{"code":"session_required"}`, run `agent_login` first.
214
+ - [ ] **Owner approves the wallet.** The human opens the `url` and confirms the wallet
215
+ grant on the **v4 agent dashboard** (`app.visacli.sh/agent/enroll`), approving with
216
+ their **sign-in session — no passkey** — and confirming the caps. You cannot approve
217
+ on their behalf.
218
+ - [ ] **Finish from MCP with `agent_connect_poll`.** Call `agent_connect_poll`
219
+ (`{"attachId":"<from agent_connect>"}`; or resume by `agentId`) — each call runs one
220
+ bounded poll. It returns `{"ok":false,"state":"...","blockedByKind":"awaiting_human_approval"}`
221
+ while pending; call again until it returns `{"ok":true,"state":"grant_activated","fundAddress":...,"caps":...}`.
222
+ Activation registers the delegated Turnkey signer + caps and writes the delegated
223
+ Turnkey credential (`turnkey.json`) to this runtime. It never spends.
205
224
  - [ ] **Confirm the real wallet** with `wallet_status` (or `visa wallet show`). Only a
206
225
  provisioned/delegated credential — not the served tool list — means the wallet is
207
226
  usable; `agent_capabilities.wallet.available` reflects this.
227
+ - [ ] **Set the spend policy** with `wallet_policy_set` — per-transaction / daily /
228
+ session USD caps (plus optional network and merchant allow/deny lists) that refuse
229
+ any x402 payment BEFORE it is signed. This is the `policy` step in the
230
+ `setup_agent` chain, between a delegated wallet and spending.
208
231
  - [ ] **Spend** with `wallet_pay` (x402), enforced by the owner-approved local policy
209
232
  caps. Never raise a human-approved limit yourself.
210
233
 
211
- Card checkout is a separate upgrade on top of this Turnkey-only base approve a card
212
- in **account settings agent card Spend**, then `start_card_mandate` / `pay_merchant`
213
- draw against it. Neither rail is enabled by pairing.
234
+ Once the wallet is delegated and a policy is set, these are the served wallet tools this
235
+ agent can actually call: `wallet_discover` (search the public x402 Bazaar),
236
+ `wallet_probe` (read a challenge without paying), `wallet_pay` / `wallet_directory_pay`
237
+ (pay, policy-enforced), `wallet_history` / `wallet_reconcile` (local ledger + resolve
238
+ `reconciling` holds), `wallet_fund` (funding address + faucet), and `wallet_export`
239
+ (export key material — dangerous). All spending is gated by the owner-approved local
240
+ policy caps.
241
+
242
+ Card checkout is a separate upgrade on top of this Turnkey-only base — approve a card on
243
+ the **v4 agent dashboard** (`app.visacli.sh/agent/enroll`) with a **passkey**, then
244
+ `start_card_mandate` / `pay_merchant` draw against it. Neither rail is enabled by pairing.
214
245
 
215
246
  ## Core flow
216
247
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visa/cli",
3
- "version": "4.1.0-rc.66",
3
+ "version": "4.1.0-rc.68",
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-10-17/server.schema.json",
3
3
  "name": "io.github.visa-crypto-labs/visa-cli",
4
- "version": "4.1.0-rc.66",
4
+ "version": "4.1.0-rc.68",
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.66",
12
+ "version": "4.1.0-rc.68",
13
13
  "transport": {
14
14
  "type": "stdio"
15
15
  },