@visa/cli 5.0.0-rc.409 → 5.0.0-rc.412
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 +166 -761
- package/bin/visa-tool.js +6 -0
- package/dist/cli.js +128 -177
- package/dist/enrollment-finisher.js +67 -13
- package/dist/managed-runtime/runtime-readiness.mjs +0 -44
- package/dist/managed-runtime/update-and-restart.mjs +36 -120
- package/dist/mcp-server/index.js +339 -627
- package/dist/tool-call.js +64 -0
- package/package.json +5 -7
- package/server.json +2 -2
- package/dist/skills/pair-visa-agent/RUNTIMES.md +0 -117
- package/dist/skills/pair-visa-agent/SKILL.md +0 -517
- package/dist/skills/pair-visa-agent/scripts/__tests__/setup.test.mjs +0 -422
- package/dist/skills/pair-visa-agent/scripts/setup.mjs +0 -328
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visa/cli",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.412",
|
|
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",
|
|
7
7
|
"visa": "./bin/visa-cli.js",
|
|
8
|
-
"visa-runtime-converge": "./dist/managed-runtime/resolve-and-update.mjs"
|
|
8
|
+
"visa-runtime-converge": "./dist/managed-runtime/resolve-and-update.mjs",
|
|
9
|
+
"visa-tool": "./bin/visa-tool.js"
|
|
9
10
|
},
|
|
10
11
|
"scripts": {
|
|
11
12
|
"sync:server-json": "node scripts/sync-server-json.mjs",
|
|
@@ -27,7 +28,6 @@
|
|
|
27
28
|
"test:smoke": "VISA_AUTH_URL=https://auth.visacli.sh jest --config jest.smoke.config.js",
|
|
28
29
|
"test:packed": "node scripts/packed-cli-smoke.mjs",
|
|
29
30
|
"test:e2e": "jest --config jest.e2e.config.js",
|
|
30
|
-
"coinbase:onramp": "pnpm exec tsx tests/e2e/coinbase-onramp-harness/run.ts",
|
|
31
31
|
"test:all": "npm run test:unit && npm run test:e2e",
|
|
32
32
|
"prepublishOnly": "npm run build && npm test",
|
|
33
33
|
"lint": "eslint src/**/*.ts",
|
|
@@ -49,8 +49,7 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@modelcontextprotocol/server": "2.0.0",
|
|
51
51
|
"commander": "^12.1.0",
|
|
52
|
-
"punycode": "^2.3.1"
|
|
53
|
-
"zod": "^3.25.76"
|
|
52
|
+
"punycode": "^2.3.1"
|
|
54
53
|
},
|
|
55
54
|
"devDependencies": {
|
|
56
55
|
"@types/express": "^5.0.0",
|
|
@@ -58,14 +57,12 @@
|
|
|
58
57
|
"@types/node": "^22.20.5",
|
|
59
58
|
"@typescript-eslint/eslint-plugin": "^8.68.0",
|
|
60
59
|
"@typescript-eslint/parser": "^8.68.0",
|
|
61
|
-
"@visa/crypto": "workspace:*",
|
|
62
60
|
"@visa/financial-core": "workspace:*",
|
|
63
61
|
"@visa/identity": "workspace:*",
|
|
64
62
|
"@visa/contracts": "workspace:*",
|
|
65
63
|
"@visa/observability": "workspace:*",
|
|
66
64
|
"@visa/shared": "workspace:*",
|
|
67
65
|
"@visa/wallet": "workspace:*",
|
|
68
|
-
"@visa/wallet-tools": "workspace:*",
|
|
69
66
|
"esbuild": "^0.28.1",
|
|
70
67
|
"eslint": "^10.0.2",
|
|
71
68
|
"express": "^4.21.0",
|
|
@@ -81,6 +78,7 @@
|
|
|
81
78
|
"mcpName": "io.github.visa-crypto-labs/visa-cli",
|
|
82
79
|
"files": [
|
|
83
80
|
"bin/visa-cli.js",
|
|
81
|
+
"bin/visa-tool.js",
|
|
84
82
|
"dist/",
|
|
85
83
|
"install.ps1",
|
|
86
84
|
"install.sh",
|
package/server.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "io.github.visa-crypto-labs/visa-cli",
|
|
4
|
-
"version": "5.0.0-rc.
|
|
4
|
+
"version": "5.0.0-rc.412",
|
|
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": "5.0.0-rc.
|
|
12
|
+
"version": "5.0.0-rc.412",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
},
|
|
@@ -1,117 +0,0 @@
|
|
|
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 run the same protected enrollment and share the same local
|
|
25
|
-
pending record:
|
|
26
|
-
|
|
27
|
-
1. Visa MCP server: `agent_enroll` once; after the owner approves, this computer
|
|
28
|
-
finishes in the background (`get_status` shows `pairing.setup.state` go
|
|
29
|
-
`finishing` → `connected`; do not call `agent_enroll` while it is `finishing`).
|
|
30
|
-
2. Terminal: `visa connect` (add `--format json` for machine output).
|
|
31
|
-
|
|
32
|
-
Each returns one link and a short code for the human. The browser receives only that
|
|
33
|
-
link. The agent's keys are generated on this device and never leave it, and the
|
|
34
|
-
approval page certifies only the keys this device named in the link. Calling it again
|
|
35
|
-
resumes the same pending enrollment after an interruption.
|
|
36
|
-
|
|
37
|
-
Use `agentId` as the stable identity. `identityKeyJkt` identifies the currently bound
|
|
38
|
-
Ed25519 public key and can change after key rotation.
|
|
39
|
-
|
|
40
|
-
The older plugin pairing tools and MCP enrollment tools are gone: they drove CLI
|
|
41
|
-
commands that no longer exist. `agent_enroll` (MCP) and `visa connect` are the one door.
|
|
42
|
-
|
|
43
|
-
## Install and mount
|
|
44
|
-
|
|
45
|
-
Install the prerelease CLI, which provides both command names and the MCP server:
|
|
46
|
-
|
|
47
|
-
```sh
|
|
48
|
-
npm install -g @visa/cli@rc
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
There is no `visa mcp` subcommand. Run `visa-cli connect <runtime>` when supported, or
|
|
52
|
-
configure `@visa/cli/dist/mcp-server/index.js` directly. Replace `<npm root -g>` below
|
|
53
|
-
with the output of `npm root -g`.
|
|
54
|
-
|
|
55
|
-
OpenClaw (`~/.openclaw/openclaw.json`):
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"mcp": {
|
|
60
|
-
"servers": {
|
|
61
|
-
"visa-cli": {
|
|
62
|
-
"command": "node",
|
|
63
|
-
"args": ["<npm root -g>/@visa/cli/dist/mcp-server/index.js"]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Hermes (`~/.hermes/config.yaml`). Hermes passes a filtered platform-safe baseline
|
|
71
|
-
(`PATH`, `HOME`, platform variables, and `XDG_*`) plus this server's `env:` map.
|
|
72
|
-
Arbitrary gateway variables are excluded, so map `VISA_RC_CODE` explicitly. The
|
|
73
|
-
placeholder keeps its value in `~/.hermes/.env` instead of `config.yaml`:
|
|
74
|
-
|
|
75
|
-
```yaml
|
|
76
|
-
mcp_servers:
|
|
77
|
-
visa-cli:
|
|
78
|
-
command: node
|
|
79
|
-
args: ['<npm root -g>/@visa/cli/dist/mcp-server/index.js']
|
|
80
|
-
env:
|
|
81
|
-
VISA_RC_CODE: ${VISA_RC_CODE}
|
|
82
|
-
# Optional overrides for a different state directory or toolchain:
|
|
83
|
-
# HOME: /home/<user>
|
|
84
|
-
# PATH: /usr/local/bin:/usr/bin:/bin
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### Keep one local-state namespace
|
|
88
|
-
|
|
89
|
-
The gateway shell and the Visa MCP subprocess must resolve the same `HOME` and
|
|
90
|
-
`VISA_CLI_HOME`. Set that boundary before pairing and keep it stable. Changing
|
|
91
|
-
`VISA_CLI_HOME` later also changes where paired identity and grant records are
|
|
92
|
-
read; it is not a safe way to make an old contact file visible.
|
|
93
|
-
|
|
94
|
-
For example, with `HOME=/opt/data/home` and no `VISA_CLI_HOME`, identity lives
|
|
95
|
-
under `/opt/data/home/.visa-cli` and checkout contact under
|
|
96
|
-
`/opt/data/home/.visa-mcp`. A profile at `/opt/data/.visa-mcp` belongs to a
|
|
97
|
-
different state namespace. Do not scan, copy, or auto-adopt it: contact files
|
|
98
|
-
contain owner PII. The host passes checkout details to `purchase_create` itself;
|
|
99
|
-
no Visa tool writes the profile.
|
|
100
|
-
|
|
101
|
-
## Runtime setup map
|
|
102
|
-
|
|
103
|
-
| Runtime | Setup surface |
|
|
104
|
-
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
105
|
-
| OpenClaw | Install `@visa/cli@rc` (`npm install -g @visa/cli@rc`) and run `visa connect openclaw`. It plants the skill under `~/.openclaw/skills/` and mounts the Visa MCP server into `~/.openclaw/openclaw.json`. (The `@visa/visa-cli-openclaw` plugin package is prerelease). |
|
|
106
|
-
| Hermes | Run `visa connect hermes`. It resolves the per-profile skills directory and refuses to guess when several profiles exist — set `HERMES_PROFILE` to choose one. `hermes claw migrate` can import an existing OpenClaw setup. |
|
|
107
|
-
| Codex | Run `visa connect codex`. It plants the skill under `~/.codex/skills/` and mounts the Visa MCP server into `~/.codex/config.toml` in the same step. |
|
|
108
|
-
| Other runtime | Put `visa` on `PATH` and mount the same MCP server by hand; `get_status` shows what is connected. |
|
|
109
|
-
|
|
110
|
-
The skill is planted by `visa connect <client>`, into that client's own skills
|
|
111
|
-
directory. Reload the runtime afterwards.
|
|
112
|
-
|
|
113
|
-
## Optional Hermes wrapper
|
|
114
|
-
|
|
115
|
-
A Hermes Python plugin may wrap the canonical raw CLI commands and register tools with
|
|
116
|
-
`ctx.register_tool(...)`. It is optional: the MCP server and skill already expose the
|
|
117
|
-
same operation and persisted local state without a second implementation.
|