@visa/cli 2.0.0-rc.11 → 2.0.0-rc.13
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 +26 -4
- package/dist/cli.js +83 -83
- package/dist/mcp-server/index.js +46 -48
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ Add to your MCP client config:
|
|
|
31
31
|
}
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
Once connected, your assistant will have access to all payment tools. The first time you use a paid tool, you'll be prompted to log in and enroll a card.
|
|
34
|
+
Once connected, your assistant will have access to all payment tools. The first time you use a paid tool, you'll be prompted to log in and enroll a card — you'll get $1 in free credits to start.
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -47,7 +47,8 @@ visa-cli history # Recent transactions with amounts and any generated media
|
|
|
47
47
|
visa-cli hud enable # Explicitly pin the Visa HUD below Claude Code input
|
|
48
48
|
visa-cli hud disable # Remove the Visa HUD from Claude Code
|
|
49
49
|
visa-cli statusline # Render the multi-line HUD Claude Code calls automatically
|
|
50
|
-
|
|
50
|
+
# MCP (stdio): run the bundled entrypoint (IDE configs use the same path — see getServerEntry in src/clients.ts)
|
|
51
|
+
# node "$(npm root -g)/@visa/cli/dist/mcp-server/index.js"
|
|
51
52
|
```
|
|
52
53
|
|
|
53
54
|
---
|
|
@@ -65,7 +66,7 @@ visa-cli status # verify you're logged in
|
|
|
65
66
|
|
|
66
67
|
## Card enrollment
|
|
67
68
|
|
|
68
|
-
Cards are tokenized via VGS — your raw card number never touches Visa servers. `add_card` opens a hosted VGS Collect form in your browser.
|
|
69
|
+
Cards are tokenized via VGS — your raw card number never touches Visa servers. `add_card` opens a hosted VGS Collect form in your browser. You receive $1 in free credits on your first card enrollment.
|
|
69
70
|
|
|
70
71
|
```bash
|
|
71
72
|
visa-cli add-card
|
|
@@ -75,6 +76,14 @@ Multiple cards can be enrolled. The first becomes the default; you can switch de
|
|
|
75
76
|
|
|
76
77
|
---
|
|
77
78
|
|
|
79
|
+
## Credits & referrals
|
|
80
|
+
|
|
81
|
+
You receive **$1 in free credits** when you enroll your first card — enough for about 16 AI images. Credits are used automatically before your card is charged.
|
|
82
|
+
|
|
83
|
+
Share your referral link (visible in `get_status`) and you both get **$2 in free credits** when your referral enrolls a card.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
78
87
|
## Payments & Authentication
|
|
79
88
|
|
|
80
89
|
Every paid tool call requires authentication. On macOS, this is Touch ID (or device password); on Windows and Linux, payments are server-verified with restricted spending limits. Your assistant will show you the amount and merchant before prompting. If you cancel, the payment is aborted — nothing is charged.
|
|
@@ -113,6 +122,9 @@ The create command prints the raw `vk_...` key once. Store it in your app or age
|
|
|
113
122
|
| `remove_card` | Remove an enrolled card (authentication required) |
|
|
114
123
|
| `set_default_card` | Change the default card (authentication required) |
|
|
115
124
|
| `get_status` | Auth, card, spend limits, and budget summary |
|
|
125
|
+
| `start_session` | Start a capped approval window for paid tools in this MCP process |
|
|
126
|
+
| `get_session_status` | Show the active session cap, estimated spend, and remaining amount |
|
|
127
|
+
| `close_session` | Close the active session and return to pay-as-you-go approvals |
|
|
116
128
|
| `update_spending_controls` | Set daily and per-transaction limits (authentication required) |
|
|
117
129
|
| `transaction_history` | Recent transactions with amounts and media URLs |
|
|
118
130
|
| `feedback` | Submit feedback on a tool result |
|
|
@@ -171,6 +183,16 @@ Max per-transaction — hard cap per single tool call
|
|
|
171
183
|
|
|
172
184
|
Both limits are enforced server-side. Authentication is always required per payment regardless of limits — this cannot be disabled. On macOS this means Touch ID; on other platforms, server-side verification with restricted spending limits applies.
|
|
173
185
|
|
|
186
|
+
## Sessions
|
|
187
|
+
|
|
188
|
+
Paid tools are pay-as-you-go by default: each paid call requests payment approval. To approve a capped window for the current MCP process, use `start_session`:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
start_session capUsd=5
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Paid calls then spend from that approval window until the cap is used, `close_session` is called, the session expires, or the MCP process restarts. Sessions are not reused across Claude/MCP restarts.
|
|
195
|
+
|
|
174
196
|
---
|
|
175
197
|
|
|
176
198
|
## Config & data locations
|
|
@@ -186,7 +208,7 @@ Both limits are enforced server-side. Authentication is always required per paym
|
|
|
186
208
|
## Troubleshooting
|
|
187
209
|
|
|
188
210
|
**Touch ID prompt doesn't appear (macOS)**
|
|
189
|
-
Make sure `
|
|
211
|
+
Make sure the MCP process (`node …/dist/mcp-server/index.js`) runs in a foreground TTY with access to the macOS security framework. Running inside some sandboxed environments may prevent Touch ID. On Windows and Linux, biometric prompts are not used — payments are server-verified.
|
|
190
212
|
|
|
191
213
|
**"Not logged in" after `visa-cli login`**
|
|
192
214
|
Restart the MCP server after logging in — your MCP client needs to reconnect to pick up the new session.
|