@visa/cli 5.0.0-rc.413 → 5.0.0-rc.415

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 CHANGED
@@ -37,9 +37,10 @@ up as an agent:
37
37
  1. It makes an Ed25519 installation key in this machine's key store (macOS
38
38
  Keychain, Windows DPAPI, Linux Secret Service, or a 0600 file on a headless
39
39
  host with `VISA_RUNTIME_CUSTODY_PROFILE=headless`).
40
- 2. It starts a setup and opens the owner's approval page with a short code.
41
- The owner signs in to the Visa Console, checks the code, sets the agent's
42
- limits and approves. The CLI never sees an owner key.
40
+ 2. It starts a setup and opens the owner's approval page. The owner signs in
41
+ to the Visa Console and approves. The agent connects with no spending limit:
42
+ its wallet key can sign for the owner and can never spend until the owner
43
+ sets a limit in the Console. The CLI never sees an owner key.
43
44
  3. It claims the approved setup with the installation key. A finite background
44
45
  pickup continues after the terminal or MCP host exits, so approval does not
45
46
  need a second `connect` call. `status` reports pickup progress and fresh
@@ -79,11 +80,11 @@ run `visa connect` again to recover the same setup.
79
80
  unsettled purchase keeps a connected key, its pending replacement is still cancelled.
80
81
  - **Update**: `visa update` (RC stays on `@visa/cli@rc`).
81
82
 
82
- | Command | What it does |
83
- | -------------------------- | -------------------------------------------------------------------- |
84
- | `visa connect [client]` | Mount the MCP server and set this computer up as an agent (resumes). |
83
+ | Command | What it does |
84
+ | -------------------------- | ------------------------------------------------------------------------------------- |
85
+ | `visa connect [client]` | Mount the MCP server and set this computer up as an agent (resumes). |
85
86
  | `visa disconnect [client]` | Remove Visa from a client (`--all`: mounts, status line and local agent credentials). |
86
- | `visa update` | Update on the current release channel. |
87
+ | `visa update` | Update on the current release channel. |
87
88
 
88
89
  ### Apps that cannot load MCP servers
89
90
 
@@ -96,7 +97,8 @@ VISA_CLI_RUNTIME=muse VISA_RUNTIME_CUSTODY_PROFILE=headless visa connect --no-op
96
97
  visa-tool --skill # the Visa skill: recovery after a rebuilt VM, and the rules below
97
98
  visa-tool --list # the server's rules and the tools with their inputs (JSON)
98
99
  visa-tool status # one call: the tool's answer as JSON, exit 1 on a refusal
99
- visa-tool pay '{"target":"https://…","request_id":"order-1"}' # no max: a price preview, nothing is paid
100
+ visa-tool discover '{"target":"https://…"}' # the live price, read only: nothing is paid
101
+ visa-tool pay '{"target":"https://…","max":"0.05","request_id":"<new UUID>"}' # pays at most max
100
102
  ```
101
103
 
102
104
  On a computer with no keyring, every command needs
@@ -119,7 +121,7 @@ stable launcher) serves the laptop column of the one Visa tool catalogue:
119
121
  | Tool | What it does |
120
122
  | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
121
123
  | `status` | Who this agent is, what is ready, and who takes the next step. Call first. |
122
- | `connect` | Connect this computer (or replace its key). Returns the owner link and code; picks up approval automatically. |
124
+ | `connect` | Connect this computer (or replace its key). Returns the owner link; picks up approval automatically. |
123
125
  | `discover` | Search paid services or probe one URL. Answers `unavailable` until the discovery source is live. |
124
126
  | `pay` | Pay a URL that answers HTTP 402 with a Tempo charge (OUSD). Needs `max` and a new `request_id` per purchase. **Moves real money.** |
125
127
  | `payment_status` | Read one purchase by its `request_id`, optionally waiting for it to change. |
@@ -159,8 +161,26 @@ with a charge-mismatch diagnostic before signing or sending the paid request.
159
161
 
160
162
  ## Status line
161
163
 
162
- `connect` installs a Claude Code status line (`visa-cli config statusline`)
163
- that shows the agent and today's spend from a 30-second cache.
164
+ `connect` installs a Claude Code status line (`visa-cli config statusline`).
165
+ It draws from a cache a background read refreshes at most every 30 seconds:
166
+
167
+ ```
168
+ ◆ VISA │ claude 2 ● ready │ wallet $3.20 left of $50/day ▰▰▰▰▰▰ auto up to $5 │ last $0.25 fal.ai 4m │ staging
169
+ Visa-mono │ Opus 5.5 │ context 34% ▰▰▱▱▱▱ │ 5h limit 24%
170
+ ```
171
+
172
+ - **The agent's state:** ready, `needs you:` with the owner's next step as a
173
+ link to the Console, payments waiting for approval, or what to run when the
174
+ agent is not connected, not found or the CLI is too old.
175
+ - **Each rail's room:** what is left against the limit, a meter coloured by
176
+ how close it is, and whether the agent pays automatically or asks each time.
177
+ - **Freshness:** facts older than ten minutes say `as of`, and a failed read
178
+ says `offline` with their age; a failed read never shows `ready` or `$0` as if live.
179
+ - **This Claude session** (second line): folder, model, context used and the
180
+ 5-hour window.
181
+
182
+ It fits the terminal width by dropping whole facts, least important first,
183
+ and honours `NO_COLOR`.
164
184
 
165
185
  ## Environment
166
186
 
@@ -172,15 +192,16 @@ that shows the agent and today's spend from a 30-second cache.
172
192
  | `VISA_SUPPRESS_BROWSER=1` | Print links instead of opening a browser. |
173
193
  | `VISA_TEMPO_RPC_URL` | A Tempo RPC for building charges (https, or this machine). |
174
194
  | `VISA_RC_CODE` | The access code a release-candidate build asks for. |
195
+ | `VISA_CLI_HUD_THEME` | `light` or `dark` status line colours, when the terminal does not say (`COLORFGBG`). |
175
196
 
176
197
  ## Data on this machine
177
198
 
178
- | Path | Contents |
179
- |------|----------|
180
- | OS key store, or `~/.visa-cli/agent-keys/` (headless) | The installation key. |
181
- | `~/.visa-cli/agent.json` | This computer's agent (ids, name) and, while a setup is open, its one-time setup secret (0600). |
182
- | `~/.visa-cli/hud.json` | The status line's cache. |
183
- | `~/.visa-cli/purchases/` | Server- and agent-scoped records needed to finish after interruption, and merchant answers up to 50 MiB (0600 in a 0700 directory). Canonical settlement or a final unpaid outcome removes the prepared charge and unsigned transaction. Purchase records and already-kept answers are not automatically deleted, including on `visa disconnect --all`. Credential/security lifetimes and terminal preparation cleanup remain separate. |
199
+ | Path | Contents |
200
+ | ----------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
201
+ | OS key store, or `~/.visa-cli/agent-keys/` (headless) | The installation key. |
202
+ | `~/.visa-cli/agent.json` | This computer's agent (ids, name) and, while a setup is open, its one-time setup secret (0600). |
203
+ | `~/.visa-cli/hud-facts.json` | The status line's cache: the agent's last read state, never keys or tokens. |
204
+ | `~/.visa-cli/purchases/` | Server- and agent-scoped records needed to finish after interruption, and merchant answers up to 50 MiB (0600 in a 0700 directory). Canonical settlement or a final unpaid outcome removes the prepared charge and unsigned transaction. Purchase records and already-kept answers are not automatically deleted, including on `visa disconnect --all`. Credential/security lifetimes and terminal preparation cleanup remain separate. |
184
205
 
185
206
  ### Managed runtime convergence
186
207
 
@@ -201,5 +222,6 @@ means no available retained context. The private approval-page purpose may retai
201
222
  original signing intent under its configurable, initially enabled product policy;
202
223
  HTTP replay bodies and headers remain transient and context never goes to logs
203
224
  or telemetry. The owner and original payment/approval/deadline bindings remain
204
- required. This contract does not enable public owner-approved paying; that pause
205
- and internal admission remain in force.
225
+ required. Hosted Tempo payments ask the owner each time and resume the same
226
+ approved purchase. Internal admission and current spending checks still apply.
227
+ This source contract does not establish deployed availability.