@visa/cli 4.1.0-rc.3 → 4.1.0-rc.300

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/install.ps1 CHANGED
@@ -108,8 +108,8 @@ try {
108
108
  }
109
109
 
110
110
  $major = [int]$nodeMatch.Groups['major'].Value
111
- if ($major -lt 18) {
112
- Write-Host " Node.js $nodeVersion is too old. Version 18+ required." -ForegroundColor Red
111
+ if ($major -lt 20) {
112
+ Write-Host " Node.js $nodeVersion is too old. Version 20+ required." -ForegroundColor Red
113
113
  Write-Host " Install from https://nodejs.org/ and try again." -ForegroundColor Yellow
114
114
  Wait-BeforeExit
115
115
  exit 1
@@ -137,8 +137,9 @@ try {
137
137
  }
138
138
 
139
139
  # Install via npm
140
- Write-Host " Running: npm install -g @visa/cli" -ForegroundColor Gray
141
- $npmOutput = & npm install -g @visa/cli 2>&1
140
+ $Package = '@visa/cli@rc'
141
+ Write-Host " Running: npm install -g $Package" -ForegroundColor Gray
142
+ $npmOutput = & npm install -g $Package 2>&1
142
143
  $npmExitCode = $LASTEXITCODE
143
144
  $npmText = ($npmOutput | Out-String)
144
145
  $npmOutput | Out-Host
@@ -158,7 +159,7 @@ if ($npmExitCode -ne 0) {
158
159
  Write-Host " Do not disable TLS verification globally." -ForegroundColor Yellow
159
160
  } else {
160
161
  Write-Host " Run manually for the full error, then retry:" -ForegroundColor Yellow
161
- Write-Host " npm install -g @visa/cli" -ForegroundColor Yellow
162
+ Write-Host " npm install -g $Package" -ForegroundColor Yellow
162
163
  }
163
164
 
164
165
  Wait-BeforeExit
@@ -168,7 +169,6 @@ if ($npmExitCode -ne 0) {
168
169
  # Verify
169
170
  $cliCommandNames = Get-InstalledCliCommands
170
171
  $verifiedCommand = $null
171
- $verifiedCommandPath = $null
172
172
  $visaVersion = $null
173
173
 
174
174
  foreach ($commandName in $cliCommandNames) {
@@ -177,12 +177,9 @@ foreach ($commandName in $cliCommandNames) {
177
177
  continue
178
178
  }
179
179
 
180
- # Capture the resolved executable path so the setup hand-off below runs
181
- # exactly the binary verified here, not a fresh PATH lookup.
182
180
  $versionOutput = (& $commandInfo.Source --version 2>$null | Select-Object -First 1)
183
181
  if ($LASTEXITCODE -eq 0 -and $versionOutput) {
184
182
  $verifiedCommand = $commandName
185
- $verifiedCommandPath = $commandInfo.Source
186
183
  $visaVersion = $versionOutput.Trim()
187
184
  break
188
185
  }
@@ -191,46 +188,12 @@ foreach ($commandName in $cliCommandNames) {
191
188
  Write-Host ""
192
189
  if ($verifiedCommand) {
193
190
  Write-Host " Visa CLI $visaVersion installed." -ForegroundColor Green
194
-
195
- # Hand off straight into setup so install -> setup -> signed-in is one
196
- # uninterrupted flow. Hardening:
197
- # * Auto-launch only on an interactive console with input/output/error
198
- # all attached - setup must prompt and open a browser. Redirected
199
- # streams and CI fall back to printing the next step.
200
- # * Invoke $verifiedCommandPath (the path verified just above), not a
201
- # bare command name re-resolved through PATH.
202
- # * Pass only the literal "setup" argument - nothing caller-controlled.
203
- if ($Host.Name -eq 'ConsoleHost' -and -not [Console]::IsInputRedirected -and -not [Console]::IsOutputRedirected -and -not [Console]::IsErrorRedirected -and -not $env:CI) {
204
- Write-Host ""
205
- Write-Host " Continuing to setup..." -ForegroundColor Cyan
206
- Write-Host ""
207
- try {
208
- $setupProcess = Start-Process -FilePath $verifiedCommandPath -ArgumentList @('setup') -Wait -NoNewWindow -PassThru -ErrorAction Stop
209
- } catch {
210
- Write-Host ""
211
- Write-Host " Setup could not start. Visa CLI is installed." -ForegroundColor Yellow
212
- Write-Host " PowerShell error: $($_.Exception.Message)" -ForegroundColor Yellow
213
- Write-Host " run '$verifiedCommand setup' when you're ready to finish." -ForegroundColor Yellow
214
- Wait-BeforeExit
215
- exit 1
216
- }
217
- if ($setupProcess.ExitCode -ne 0) {
218
- Write-Host ""
219
- Write-Host " Setup exited before completion. Visa CLI is installed." -ForegroundColor Yellow
220
- Write-Host " run '$verifiedCommand setup' when you're ready to finish." -ForegroundColor Yellow
221
- Wait-BeforeExit
222
- exit 1
223
- }
224
- exit 0
225
- } else {
226
- Write-Host " Run '$verifiedCommand setup' to get started." -ForegroundColor Cyan
227
- Write-Host " After setup, run /mcp inside Claude Code, not PowerShell, if Claude Code was already open." -ForegroundColor Cyan
228
- }
191
+ Write-Host " Connect an AI client with: $verifiedCommand connect <client>" -ForegroundColor Cyan
192
+ Write-Host " Then ask your agent to call setup_start." -ForegroundColor Cyan
229
193
  Write-Host ""
230
194
  } else {
231
195
  $primaryCommand = $cliCommandNames | Select-Object -First 1
232
196
  Write-Host " Installed but '$primaryCommand' was not runnable from PATH yet." -ForegroundColor Yellow
233
- Write-Host " Close and reopen PowerShell, then run: $primaryCommand setup" -ForegroundColor Yellow
234
- Write-Host " Run /mcp inside Claude Code after setup if you need to reconnect the MCP server." -ForegroundColor Yellow
197
+ Write-Host " Close and reopen PowerShell, then run: $primaryCommand connect <client>" -ForegroundColor Yellow
235
198
  Write-Host ""
236
199
  }
package/install.sh CHANGED
@@ -10,8 +10,8 @@
10
10
  _visa_install() {
11
11
  set -euo pipefail
12
12
 
13
- REQUIRED_NODE_MAJOR=18
14
- PACKAGE="@visa/cli"
13
+ REQUIRED_NODE_MAJOR=20
14
+ PACKAGE="@visa/cli@rc"
15
15
 
16
16
  # ── colours (disabled when piped) ─────────────────────────────────────────────
17
17
  if [ -t 1 ]; then
@@ -99,9 +99,6 @@ fi
99
99
  echo "$NPM_OUTPUT"
100
100
 
101
101
  # ── verify ────────────────────────────────────────────────────────────────────
102
- # Capture the absolute path resolved here so the setup hand-off below invokes
103
- # exactly the binary we just verified, instead of re-resolving "visa-cli"
104
- # through $PATH a second time.
105
102
  VISA_BIN=""
106
103
  VISA_VERSION=""
107
104
  if VISA_BIN="$(command -v visa-cli 2>/dev/null)"; then
@@ -111,40 +108,11 @@ fi
111
108
  echo ""
112
109
  if [ -n "$VISA_VERSION" ]; then
113
110
  ok "Visa CLI ${VISA_VERSION} installed."
114
- # Hand off straight into setup so install -> setup -> signed-in is one
115
- # uninterrupted flow. Hardening:
116
- # * Auto-launch only when output streams are real terminals and setup can
117
- # read from either stdin or /dev/tty. That keeps `curl ... | bash` usable:
118
- # the script arrives on stdin, while setup prompts still read from the
119
- # user's terminal. CI and redirected output print the next step instead.
120
- # * Invoke "$VISA_BIN" (the path verified just above), never a bare
121
- # "visa-cli" re-resolved through $PATH at call time.
122
- # * Pass only the literal "setup" argument — "$@" is never forwarded — so
123
- # nothing the script's caller controls reaches the installed binary.
124
- if [ -t 1 ] && [ -t 2 ] && { [ -t 0 ] || [ -r /dev/tty ]; }; then
125
- echo ""
126
- info "Continuing to setup..."
127
- echo ""
128
- SETUP_EXIT=0
129
- if [ -t 0 ]; then
130
- "$VISA_BIN" setup || SETUP_EXIT=$?
131
- else
132
- "$VISA_BIN" setup </dev/tty || SETUP_EXIT=$?
133
- fi
134
- if [ "$SETUP_EXIT" -ne 0 ]; then
135
- echo ""
136
- warn "Setup exited before completion. Visa CLI is installed."
137
- warn "run 'visa-cli setup' when you're ready to finish."
138
- exit 1
139
- fi
140
- exit 0
141
- else
142
- info "Run 'visa-cli setup' to get started."
143
- info "After setup, run /mcp inside Claude Code, not Terminal, if Claude Code was already open."
144
- fi
111
+ info "Connect an AI client with: visa-cli connect <client>"
112
+ info "Then ask your agent to call setup_start."
145
113
  else
146
114
  warn "Installed, but 'visa-cli' was not found on PATH."
147
- warn "You may need to restart your shell, then run: visa-cli setup"
115
+ warn "Restart your shell, then run: visa-cli connect <client>"
148
116
  fi
149
117
  echo ""
150
118
 
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@visa/cli",
3
- "version": "4.1.0-rc.3",
4
- "description": "AI-powered payments for Claude Code",
3
+ "version": "4.1.0-rc.300",
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
- "visa": "./bin/visa-cli.js"
7
+ "visa": "./bin/visa-cli.js",
8
+ "visa-runtime-converge": "./dist/managed-runtime/resolve-and-update.mjs"
8
9
  },
9
10
  "scripts": {
10
11
  "sync:server-json": "node scripts/sync-server-json.mjs",
11
12
  "check:server-json": "node scripts/sync-server-json.mjs --check",
12
- "prebuild": "node scripts/sync-server-json.mjs && pnpm --filter @visa/money build && pnpm --filter @visa/crypto build && pnpm --filter subway-sdk build && pnpm --filter @visa-cli/tools build && pnpm --filter @visa/identity build && pnpm --filter @visa/wallet build && pnpm --filter @visa/wallet-tools build",
13
+ "prebuild": "node scripts/sync-server-json.mjs && pnpm --filter @visa/shared build && pnpm --filter @visa/observability build && pnpm --filter @visa/money build && pnpm --filter @visa/crypto build && pnpm --filter subway-sdk build && pnpm --filter @visa-cli/tools build && pnpm --filter @visa/identity build && pnpm --filter @visa/wallet build && pnpm --filter @visa/agent-mail build && pnpm --filter @visa/wallet-tools build",
13
14
  "build": "tsc --noEmit && node esbuild.config.js",
14
15
  "prepack": "node scripts/sync-server-json.mjs --check",
15
16
  "dev": "tsc --watch",
@@ -20,9 +21,9 @@
20
21
  "test:unit:watch": "jest --config jest.config.js --watch",
21
22
  "test:unit:coverage": "jest --config jest.config.js --coverage",
22
23
  "test:smoke": "VISA_AUTH_URL=https://auth.visacli.sh jest --config jest.smoke.config.js",
24
+ "test:packed": "node scripts/packed-cli-smoke.mjs",
23
25
  "test:integration": "jest --config jest.integration.config.js",
24
26
  "test:e2e": "jest --config jest.e2e.config.js",
25
- "test:catalog-e2e": "jest --config jest.catalog-e2e.config.js",
26
27
  "test:all": "npm run test:unit && npm run test:integration && npm run test:e2e",
27
28
  "prepublishOnly": "npm run build && npm test",
28
29
  "lint": "eslint src/**/*.ts",
@@ -42,45 +43,50 @@
42
43
  "author": "Visa Crypto Labs",
43
44
  "license": "SEE LICENSE IN LICENSE",
44
45
  "dependencies": {
45
- "@modelcontextprotocol/sdk": "^1.0.0",
46
+ "@modelcontextprotocol/ext-apps": "1.7.5",
47
+ "@modelcontextprotocol/server": "2.0.0",
48
+ "@ucp-js/sdk": "0.4.4",
46
49
  "commander": "^12.1.0",
47
- "zod": "^3.23.0"
50
+ "punycode": "^2.3.1",
51
+ "toml": "^4.3.0",
52
+ "yaml": "^2.9.0",
53
+ "zod": "^3.25.76"
48
54
  },
49
55
  "optionalDependencies": {
50
- "libp2p": "^3.3.4",
51
- "@libp2p/tcp": "^11.0.22",
52
- "@libp2p/crypto": "^5.1.20",
53
56
  "@chainsafe/libp2p-noise": "^17.0.0",
54
57
  "@chainsafe/libp2p-yamux": "^8.0.1",
58
+ "@libp2p/crypto": "^5.1.23",
59
+ "@libp2p/tcp": "^11.0.26",
55
60
  "@multiformats/multiaddr": "^13.0.3",
61
+ "libp2p": "^3.3.9",
56
62
  "uint8arrays": "^6.1.1"
57
63
  },
58
64
  "devDependencies": {
65
+ "@types/express": "^5.0.0",
66
+ "@types/jest": "^30.0.0",
67
+ "@types/node": "^26.1.0",
68
+ "@typescript-eslint/eslint-plugin": "^8.68.0",
69
+ "@typescript-eslint/parser": "^8.68.0",
70
+ "@visa-cli/tools": "workspace:*",
71
+ "@visa/agent-mail": "workspace:*",
59
72
  "@visa/crypto": "workspace:*",
60
- "subway-sdk": "workspace:*",
73
+ "@visa/identity": "workspace:*",
61
74
  "@visa/money": "workspace:*",
75
+ "@visa/observability": "workspace:*",
76
+ "@visa/shared": "workspace:*",
62
77
  "@visa/wallet": "workspace:*",
63
78
  "@visa/wallet-tools": "workspace:*",
64
- "@visa/observability": "workspace:*",
65
- "@visa-cli/tools": "workspace:*",
66
- "@changesets/changelog-git": "^0.2.1",
67
- "@changesets/cli": "^2.31.0",
68
- "@types/jest": "^30.0.0",
69
- "@types/node": "^26.1.0",
70
- "@typescript-eslint/eslint-plugin": "^8.63.0",
71
- "@typescript-eslint/parser": "^8.63.0",
72
- "@types/express": "^5.0.0",
73
79
  "esbuild": "^0.28.1",
74
- "express": "^4.21.0",
75
80
  "eslint": "^10.0.2",
76
- "eslint-config-prettier": "^10.1.8",
81
+ "express": "^4.21.0",
77
82
  "jest": "^29.7.0",
78
- "prettier": "^3.9.4",
79
- "ts-jest": "^29.4.11",
83
+ "prettier": "^3.9.6",
84
+ "subway-sdk": "workspace:*",
85
+ "ts-jest": "^29.4.12",
80
86
  "typescript": "^5.7.0"
81
87
  },
82
88
  "engines": {
83
- "node": ">=18.0.0"
89
+ "node": ">=20.0.0"
84
90
  },
85
91
  "mcpName": "io.github.visa-crypto-labs/visa-cli",
86
92
  "files": [
@@ -94,6 +100,6 @@
94
100
  "native/bin/win32-x64/visa-keychain-win.exe",
95
101
  "server.json",
96
102
  "README.md",
97
- "LICENSE"
103
+ "native/bin/*/visa-runtime-signer*"
98
104
  ]
99
105
  }
package/server.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
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": "4.1.0-rc.3",
4
+ "version": "4.1.0-rc.300",
5
5
  "title": "Visa CLI",
6
- "description": "AI-powered payments and creative tools for coding agents. Generate images, music, video, query crypto prices, and make purchases — all from your AI coding assistant.",
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",
8
8
  "packages": [
9
9
  {
10
10
  "registryType": "npm",
11
11
  "identifier": "@visa/cli",
12
- "version": "4.1.0-rc.3",
12
+ "version": "4.1.0-rc.300",
13
13
  "transport": {
14
14
  "type": "stdio"
15
15
  },