@visa/cli 4.1.0-rc.26 → 4.1.0-rc.260
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 +202 -46
- package/dist/checkout-engine/adapters/generic.d.ts +69 -0
- package/dist/checkout-engine/adapters/generic.js +383 -58
- package/dist/checkout-engine/adapters/index.d.ts +4 -1
- package/dist/checkout-engine/adapters/index.js +10 -3
- package/dist/checkout-engine/adapters/shopify.d.ts +80 -0
- package/dist/checkout-engine/adapters/shopify.js +688 -0
- package/dist/checkout-engine/amount.d.ts +15 -0
- package/dist/checkout-engine/amount.js +72 -0
- package/dist/checkout-engine/browser-launch.d.ts +9 -4
- package/dist/checkout-engine/browser-launch.js +19 -4
- package/dist/checkout-engine/browserbase-browser.d.ts +24 -0
- package/dist/checkout-engine/browserbase-browser.js +186 -0
- package/dist/checkout-engine/cli-engine.d.ts +206 -32
- package/dist/checkout-engine/cli-engine.js +772 -216
- package/dist/checkout-engine/confirmed-merchants.d.ts +31 -0
- package/dist/checkout-engine/confirmed-merchants.js +165 -0
- package/dist/checkout-engine/detect.d.ts +1 -1
- package/dist/checkout-engine/detect.js +6 -0
- package/dist/checkout-engine/evidence.d.ts +1 -1
- package/dist/checkout-engine/executor.d.ts +61 -3
- package/dist/checkout-engine/executor.js +550 -144
- package/dist/checkout-engine/hosted-approval.d.ts +69 -9
- package/dist/checkout-engine/hosted-approval.js +211 -21
- package/dist/checkout-engine/index.d.ts +6 -2
- package/dist/checkout-engine/index.js +5 -1
- package/dist/checkout-engine/instrument.d.ts +6 -0
- package/dist/checkout-engine/known-merchants.d.ts +10 -0
- package/dist/checkout-engine/known-merchants.js +38 -0
- package/dist/checkout-engine/live-fill-approval.d.ts +5 -11
- package/dist/checkout-engine/live-fill-approval.js +20 -34
- package/dist/checkout-engine/mandate/card-mandate.d.ts +6 -2
- package/dist/checkout-engine/mandate/card-mandate.js +10 -5
- package/dist/checkout-engine/mandate/mandate-ledger.d.ts +63 -23
- package/dist/checkout-engine/mandate/mandate-ledger.js +124 -17
- package/dist/checkout-engine/receipt-dir.d.ts +6 -0
- package/dist/checkout-engine/receipt-dir.js +8 -0
- package/dist/checkout-engine/receipt.d.ts +56 -2
- package/dist/checkout-engine/receipt.js +55 -16
- package/dist/checkout-engine/shopify-primary-domain.d.ts +25 -0
- package/dist/checkout-engine/shopify-primary-domain.js +96 -0
- package/dist/checkout-engine/trace-handles.d.ts +8 -0
- package/dist/checkout-engine/trace-handles.js +12 -0
- package/dist/checkout-engine/types.d.ts +15 -2
- package/dist/checkout-engine/unresolved-charges.d.ts +34 -0
- package/dist/checkout-engine/unresolved-charges.js +134 -0
- package/dist/checkout-engine/vgs-gateway/server-mint-client.d.ts +26 -7
- package/dist/checkout-engine/vgs-gateway/server-mint-client.js +43 -3
- package/dist/checkout-engine/vgs-live-instrument.d.ts +11 -35
- package/dist/checkout-engine/vgs-live-instrument.js +14 -74
- package/dist/checkout-engine/vic-confirmation.d.ts +18 -0
- package/dist/checkout-engine/vic-confirmation.js +9 -3
- package/dist/checkout-engine/web-bot-auth.d.ts +98 -0
- package/dist/checkout-engine/web-bot-auth.js +218 -0
- package/dist/cli.js +899 -387
- package/dist/mcp-apps/ucp-checkout.html +280 -0
- package/dist/mcp-server/index.js +725 -254
- package/dist/merchant-ucp-mcp/index.js +6 -0
- package/dist/skills/pair-visa-agent/RUNTIMES.md +122 -79
- package/dist/skills/pair-visa-agent/SKILL.md +433 -318
- package/dist/skills/pair-visa-agent/scripts/__tests__/setup.test.mjs +407 -0
- package/dist/skills/pair-visa-agent/scripts/setup.mjs +310 -30
- package/dist/skills/visa-shopify-checkout/SKILL.md +122 -0
- package/dist/skills/visa-shopify-checkout/references/evidence-and-states.md +37 -0
- package/dist/skills/visa-ucp-shopping/SKILL.md +86 -0
- package/dist/subway-direct.mjs +1 -0
- package/install.ps1 +7 -6
- package/install.sh +3 -3
- package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
- package/package.json +31 -28
- package/server.json +4 -4
- package/dist/checkout-engine/inline-target.d.ts +0 -13
- package/dist/checkout-engine/inline-target.js +0 -37
- package/dist/checkout-engine/pay-args.d.ts +0 -14
- package/dist/checkout-engine/pay-args.js +0 -44
- package/dist/checkout-engine/pay.d.ts +0 -1
- package/dist/checkout-engine/pay.js +0 -13
- package/dist/checkout-engine/repo-env.d.ts +0 -11
- package/dist/checkout-engine/repo-env.js +0 -23
- package/dist/checkout-engine/run-live-fill.d.ts +0 -1
- package/dist/checkout-engine/run-live-fill.js +0 -493
- package/dist/checkout-engine/vgs-gateway/fetch-credential.d.mts +0 -74
- package/dist/checkout-engine/vgs-gateway/fetch-credential.mjs +0 -248
|
@@ -1,79 +1,122 @@
|
|
|
1
|
-
# Running
|
|
2
|
-
|
|
3
|
-
`@visa/visa-cli-openclaw` is packaged for OpenClaw, but the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
# Running Visa agent setup in OpenClaw and Hermes
|
|
2
|
+
|
|
3
|
+
`@visa/visa-cli-openclaw` is packaged for OpenClaw, but the skill is runtime-agnostic.
|
|
4
|
+
OpenClaw, Hermes, and any runtime that can execute the `visa` CLI or mount its MCP server
|
|
5
|
+
all drive the same setup operation: identity plus every requested rail, behind one owner
|
|
6
|
+
approval.
|
|
7
|
+
|
|
8
|
+
## Plugins are runtime-specific
|
|
9
|
+
|
|
10
|
+
| Axis | OpenClaw | Hermes |
|
|
11
|
+
| --------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
12
|
+
| Language | JavaScript/TypeScript | Python |
|
|
13
|
+
| Plugin manifest | `openclaw.plugin.json` + `definePluginEntry` (`index.ts`) | `~/.hermes/plugins/<name>/plugin.yaml` + `__init__.py`, `ctx.register_tool(...)` |
|
|
14
|
+
| Config file | `~/.openclaw/openclaw.json` | `~/.hermes/config.yaml` |
|
|
15
|
+
| Skills | Markdown `SKILL.md` | Markdown under `~/.hermes/skills/<name>/` |
|
|
16
|
+
| MCP | `mcp.servers.*` | `mcp_servers.*` |
|
|
17
|
+
| Migration | — | `hermes claw migrate` imports skills, allowlists, compatible MCP servers, memory, and `SOUL.md` |
|
|
18
|
+
|
|
19
|
+
The OpenClaw JavaScript tools do not load as a Hermes plugin. Portability comes from the
|
|
20
|
+
Markdown skill, CLI, and MCP protocol instead.
|
|
21
|
+
|
|
22
|
+
## One ceremony, two surfaces
|
|
23
|
+
|
|
24
|
+
Both supported surfaces share the same local pending record and the same server-owned
|
|
25
|
+
setup operation:
|
|
26
|
+
|
|
27
|
+
1. Visa MCP server: `setup_start`, then `setup_status` until it reports done
|
|
28
|
+
(`setup_resume` / `setup_cancel` for the interrupted and abandoned cases).
|
|
29
|
+
2. Raw CLI: `visa setup start "<name>" --rails card,wallet --format json`, then
|
|
30
|
+
`visa setup status --format json`.
|
|
31
|
+
|
|
32
|
+
The start operation returns a review URL for the human. The browser receives only that
|
|
33
|
+
URL. The runtime retains its private Ed25519 key and local claim material. Polling both
|
|
34
|
+
resumes the same pending identity after an interruption and performs the runtime's own
|
|
35
|
+
steps — a setup nothing polls is a setup that never finishes.
|
|
36
|
+
|
|
37
|
+
Use `agentId` as the stable identity. `identityKeyJkt` identifies the currently bound
|
|
38
|
+
Ed25519 public key and can change after key rotation. Only the rails named in the
|
|
39
|
+
operation are configured; email, `.visa` names, and tap bindings remain separate
|
|
40
|
+
follow-up configuration.
|
|
41
|
+
|
|
42
|
+
The older `pair_agent_start` / `pair_agent_poll` and `enroll_agent` surfaces still exist
|
|
43
|
+
for published clients, but they pair identity ALONE and cost the owner one further
|
|
44
|
+
approval per rail. Do not use them to connect a new agent.
|
|
45
|
+
|
|
46
|
+
## Install and mount
|
|
47
|
+
|
|
48
|
+
Install the prerelease CLI, which provides both command names and the MCP server:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npm install -g @visa/cli@rc
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
There is no `visa mcp` subcommand. Run `visa-cli connect <runtime>` when supported, or
|
|
55
|
+
configure `@visa/cli/dist/mcp-server/index.js` directly. Replace `<npm root -g>` below
|
|
56
|
+
with the output of `npm root -g`.
|
|
57
|
+
|
|
58
|
+
OpenClaw (`~/.openclaw/openclaw.json`):
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcp": {
|
|
63
|
+
"servers": {
|
|
64
|
+
"visa-cli": {
|
|
65
|
+
"command": "node",
|
|
66
|
+
"args": ["<npm root -g>/@visa/cli/dist/mcp-server/index.js"]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Hermes (`~/.hermes/config.yaml`). Hermes passes a filtered platform-safe baseline
|
|
74
|
+
(`PATH`, `HOME`, platform variables, and `XDG_*`) plus this server's `env:` map.
|
|
75
|
+
Arbitrary gateway variables are excluded, so map `VISA_RC_CODE` explicitly. The
|
|
76
|
+
placeholder keeps its value in `~/.hermes/.env` instead of `config.yaml`:
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
mcp_servers:
|
|
80
|
+
visa-cli:
|
|
81
|
+
command: node
|
|
82
|
+
args: ['<npm root -g>/@visa/cli/dist/mcp-server/index.js']
|
|
83
|
+
env:
|
|
84
|
+
VISA_RC_CODE: ${VISA_RC_CODE}
|
|
85
|
+
# Optional overrides for a different state directory or toolchain:
|
|
86
|
+
# HOME: /home/<user>
|
|
87
|
+
# PATH: /usr/local/bin:/usr/bin:/bin
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Keep one local-state namespace
|
|
91
|
+
|
|
92
|
+
The gateway shell and the Visa MCP subprocess must resolve the same `HOME` and
|
|
93
|
+
`VISA_CLI_HOME`. Set that boundary before pairing and keep it stable. Changing
|
|
94
|
+
`VISA_CLI_HOME` later also changes where paired identity and grant records are
|
|
95
|
+
read; it is not a safe way to make an old contact file visible.
|
|
96
|
+
|
|
97
|
+
For example, with `HOME=/opt/data/home` and no `VISA_CLI_HOME`, identity lives
|
|
98
|
+
under `/opt/data/home/.visa-cli` and checkout contact under
|
|
99
|
+
`/opt/data/home/.visa-mcp`. A profile at `/opt/data/.visa-mcp` belongs to a
|
|
100
|
+
different state namespace. Do not scan, copy, or auto-adopt it: contact files
|
|
101
|
+
contain owner PII. Save the profile explicitly through `checkout_profile` in
|
|
102
|
+
the running MCP process, or run the CLI command with the exact same environment.
|
|
103
|
+
`visa agent preflight --format json` reports the non-secret path and source it
|
|
104
|
+
checked.
|
|
105
|
+
|
|
106
|
+
## Runtime setup map
|
|
107
|
+
|
|
108
|
+
| Runtime | Setup surface |
|
|
109
|
+
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
110
|
+
| OpenClaw | Install `@visa/visa-cli-openclaw` for the bundled skill. The plugin auto-mounts the Visa MCP server, which serves `setup_start` / `setup_status`. |
|
|
111
|
+
| Hermes | Run `visa-cli connect hermes`, install the skill with `visa agent skill --runtime hermes` (it resolves the per-profile dir), and use `setup_start`. `hermes claw migrate` can import an existing OpenClaw setup. |
|
|
112
|
+
| Codex | Run `visa agent skill --runtime codex`. It plants the skill under `~/.codex/skills/` and mounts the Visa MCP server into `~/.codex/config.toml` in the same step. |
|
|
113
|
+
| Other runtime | Put `visa` on `PATH`, mount the same MCP server if supported, or use the raw `visa setup start` and `visa setup status` commands as the universal fallback. |
|
|
114
|
+
|
|
115
|
+
The skill itself can be installed with `visa agent skill`. Pass `--runtime <name>` or
|
|
116
|
+
`--dir <path>` when auto-detection is not appropriate, then reload the runtime.
|
|
117
|
+
|
|
118
|
+
## Optional Hermes wrapper
|
|
119
|
+
|
|
120
|
+
A Hermes Python plugin may wrap the canonical raw CLI commands and register tools with
|
|
121
|
+
`ctx.register_tool(...)`. It is optional: the MCP server and skill already expose the
|
|
122
|
+
same operation and persisted local state without a second implementation.
|