@visa/cli 4.1.0-rc.37 → 4.1.0-rc.39

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.
@@ -1,79 +1,92 @@
1
- # Running the Visa pairing skill in OpenClaw **and** Hermes
2
-
3
- `@visa/visa-cli-openclaw` is packaged for OpenClaw, but the v4 **pairing** capability
4
- (`skills/pair-visa-agent/`) is deliberately runtime-agnostic: one skill works in OpenClaw,
5
- [Hermes](https://github.com/NousResearch/hermes-agent), or any runtime that can run the
6
- `visa` CLI or mount its MCP server. This doc is the map of how the two runtimes differ and
7
- why a single skill suffices.
8
-
9
- ## The blunt fact: plugins are NOT portable
10
-
11
- | Axis | OpenClaw | Hermes (NousResearch) |
12
- | --------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
13
- | Language | **JavaScript/TypeScript** | **Python** |
14
- | Plugin manifest | `openclaw.plugin.json` + `definePluginEntry` (`index.ts`) | `~/.hermes/plugins/<name>/plugin.yaml` + `__init__.py`, `ctx.register_tool(...)` |
15
- | Config file | `~/.openclaw/openclaw.json` | `~/.hermes/config.yaml` |
16
- | Skills | markdown `SKILL.md` (+ optional UV scripts) | markdown `~/.hermes/skills/<name>/` (agent-authored + curated Skills Hub) |
17
- | MCP | `openclaw.json` → `mcp.servers.*` | `config.yaml` → `mcp_servers.*` |
18
- | Persona | `SOUL.md` | `SOUL.md` |
19
- | Migration | — | `hermes claw migrate` (v0.3.0+): imports SOUL, memory, **skills → `~/.hermes/skills/openclaw-imports/`**, allowlists, and **MCP servers** |
20
-
21
- You cannot ship one plugin binary for both — the OpenClaw JS `pair_agent_*` tools in this
22
- package do not load in Hermes. **Do not try.**
23
-
24
- ## What IS portable: markdown skills + MCP
25
-
26
- Both runtimes (a) read markdown skills natively and (b) mount MCP servers via an
27
- equivalent config block (`mcp.servers.*` `mcp_servers.*`, same `command`/`args`/`env`,
28
- same tool include/exclude). So the cross-runtime bridge is:
29
-
30
- 1. **The `visa` CLI** `visa agent enroll|enroll-claim --format json` (piped, load-bearing
31
- exit codes). Any runtime that can execute a command can pair.
32
- 2. **The `visa` MCP server** the bundled `dist/mcp-server/index.js` entrypoint (there is
33
- **no `visa mcp` subcommand**; `visa-cli connect <client>` registers it, or configure it
34
- by hand). Mount it identically in either runtime:
35
-
36
- **OpenClaw** (`~/.openclaw/openclaw.json`):
37
-
38
- ```json
39
- {
40
- "mcp": {
41
- "servers": {
42
- "visa-cli": {
43
- "command": "node",
44
- "args": ["<npm root -g>/@visa/cli/dist/mcp-server/index.js"]
45
- }
46
- }
47
- }
48
- }
49
- ```
50
-
51
- **Hermes** (`~/.hermes/config.yaml`):
52
-
53
- ```yaml
54
- mcp_servers:
55
- visa-cli:
56
- command: node
57
- args: ['<npm root -g>/@visa/cli/dist/mcp-server/index.js']
58
- ```
59
-
60
- 3. **One `pair-visa-agent/SKILL.md`** — runtime-agnostic. It tells the agent to use
61
- whichever pairing surface is present (`pair_agent_*` OpenClaw tools → `enroll_agent`
62
- MCP tool → raw `visa agent …` CLI), all wrapping the same on-device hand-off.
63
-
64
- ## So: how each runtime gets the capability
65
-
66
- | Runtime | How it pairs |
67
- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
68
- | **OpenClaw** | Install this package → the JS `pair_agent_start`/`pair_agent_poll` tools + the skill. (Or just the `visa` MCP server + the skill, no plugin.) |
69
- | **Hermes** | Mount the `visa` MCP server in `config.yaml` (→ `enroll_agent`) and drop `pair-visa-agent/SKILL.md` into `~/.hermes/skills/`. `hermes claw migrate` will also import the skill from an existing OpenClaw install. No Python plugin required. |
70
- | **Anything else** | `visa` on PATH + the skill. The skill's raw-CLI path is the universal fallback. |
71
-
72
- ## Optional: a symmetric Hermes plugin
73
-
74
- Not required — Hermes users get the full capability via the MCP server + skill above. If
75
- you want the _same named tools_ (`pair_agent_start`/`pair_agent_poll`) in Hermes, a thin
76
- `~/.hermes/plugins/visa-cli/` Python plugin (`plugin.yaml` + `__init__.py`) that shells out
77
- to `visa agent enroll|enroll-claim --format json` and registers the tools via
78
- `ctx.register_tool(...)` would mirror the OpenClaw plugin. Tracked as a fast-follow; the
79
- CLI + MCP + skill already make pairing "just work" in Hermes.
1
+ # Running Visa pairing in OpenClaw and Hermes
2
+
3
+ `@visa/visa-cli-openclaw` is packaged for OpenClaw, but the pairing v2 skill is
4
+ runtime-agnostic. OpenClaw, Hermes, and any runtime that can execute the `visa` CLI or
5
+ mount its MCP server all use the same identity-only enrollment ceremony.
6
+
7
+ ## Plugins are runtime-specific
8
+
9
+ | Axis | OpenClaw | Hermes |
10
+ | --------------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
11
+ | Language | JavaScript/TypeScript | Python |
12
+ | Plugin manifest | `openclaw.plugin.json` + `definePluginEntry` (`index.ts`) | `~/.hermes/plugins/<name>/plugin.yaml` + `__init__.py`, `ctx.register_tool(...)` |
13
+ | Config file | `~/.openclaw/openclaw.json` | `~/.hermes/config.yaml` |
14
+ | Skills | Markdown `SKILL.md` | Markdown under `~/.hermes/skills/<name>/` |
15
+ | MCP | `mcp.servers.*` | `mcp_servers.*` |
16
+ | Migration | — | `hermes claw migrate` imports skills, allowlists, compatible MCP servers, memory, and `SOUL.md` |
17
+
18
+ The OpenClaw JavaScript tools do not load as a Hermes plugin. Portability comes from the
19
+ Markdown skill, CLI, and MCP protocol instead.
20
+
21
+ ## One ceremony, three surfaces
22
+
23
+ All supported surfaces share the same local pending record and pairing v2 protocol:
24
+
25
+ 1. OpenClaw: `pair_agent_start` / `pair_agent_poll`.
26
+ 2. Visa MCP server: `enroll_agent` with `action: "start"` / `action: "claim"`.
27
+ 3. Raw CLI: `visa agent enroll --format json` /
28
+ `visa agent enroll-claim --format json`.
29
+
30
+ The start operation returns an authorization URL for the human. The browser receives only
31
+ that URL. The runtime retains its private Ed25519 key and local claim material. Polling
32
+ resumes the same pending identity and safely replays the same signed request after an
33
+ interruption.
34
+
35
+ On activation, use `agentId` as the stable identity. `identityKeyJkt` identifies the
36
+ currently bound Ed25519 public key and can change after key rotation. Activation means the
37
+ identity is paired only; payment methods, email, and tap bindings are separate future or
38
+ follow-up configuration.
39
+
40
+ ## Install and mount
41
+
42
+ Install the prerelease CLI, which provides both command names and the MCP server:
43
+
44
+ ```sh
45
+ npm install -g @visa/cli@rc
46
+ ```
47
+
48
+ There is no `visa mcp` subcommand. Run `visa-cli connect <runtime>` when supported, or
49
+ configure `@visa/cli/dist/mcp-server/index.js` directly. Replace `<npm root -g>` below
50
+ with the output of `npm root -g`.
51
+
52
+ OpenClaw (`~/.openclaw/openclaw.json`):
53
+
54
+ ```json
55
+ {
56
+ "mcp": {
57
+ "servers": {
58
+ "visa-cli": {
59
+ "command": "node",
60
+ "args": ["<npm root -g>/@visa/cli/dist/mcp-server/index.js"]
61
+ }
62
+ }
63
+ }
64
+ }
65
+ ```
66
+
67
+ Hermes (`~/.hermes/config.yaml`):
68
+
69
+ ```yaml
70
+ mcp_servers:
71
+ visa-cli:
72
+ command: node
73
+ args: ['<npm root -g>/@visa/cli/dist/mcp-server/index.js']
74
+ ```
75
+
76
+ ## Runtime setup map
77
+
78
+ | Runtime | Setup and pairing surface |
79
+ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
80
+ | OpenClaw | Install `@visa/visa-cli-openclaw` for the `pair_agent_*` tools and bundled skill. The plugin auto-mounts the Visa MCP server. The MCP or raw CLI surfaces remain valid alternatives. |
81
+ | Hermes | Run `visa-cli connect hermes`, install `pair-visa-agent/SKILL.md` under `~/.hermes/skills/`, and use `enroll_agent`. `hermes claw migrate` can import an existing OpenClaw setup. |
82
+ | Other runtime | Put `visa` on `PATH`, mount the same MCP server if supported, or use the raw `visa agent enroll` and `visa agent enroll-claim` commands as the universal fallback. |
83
+
84
+ The skill itself can be installed with `visa agent skill`. Pass `--runtime <name>` or
85
+ `--dir <path>` when auto-detection is not appropriate, then reload the runtime.
86
+
87
+ ## Optional Hermes wrapper
88
+
89
+ A Hermes Python plugin may expose the same `pair_agent_start` and `pair_agent_poll` names
90
+ by calling the canonical raw CLI commands and registering tools with
91
+ `ctx.register_tool(...)`. It is optional: the MCP server and skill already expose the
92
+ same protocol and persisted pairing state without a second implementation.