@visa/cli 4.1.0-rc.9 → 4.1.0-rc.91
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 +178 -231
- package/dist/checkout-engine/adapters/generic.d.ts +23 -0
- package/dist/checkout-engine/adapters/generic.js +216 -0
- package/dist/checkout-engine/adapters/index.d.ts +8 -0
- package/dist/checkout-engine/adapters/index.js +21 -0
- package/dist/checkout-engine/adapters/shopify.d.ts +31 -0
- package/dist/checkout-engine/adapters/shopify.js +423 -0
- package/dist/checkout-engine/adapters/stripe-like.d.ts +10 -0
- package/dist/checkout-engine/adapters/stripe-like.js +21 -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 +46 -0
- package/dist/checkout-engine/browser-launch.js +81 -0
- package/dist/checkout-engine/ceremony.d.ts +64 -0
- package/dist/checkout-engine/ceremony.js +261 -0
- package/dist/checkout-engine/cli-engine.d.ts +227 -0
- package/dist/checkout-engine/cli-engine.js +779 -0
- package/dist/checkout-engine/detect.d.ts +61 -0
- package/dist/checkout-engine/detect.js +398 -0
- package/dist/checkout-engine/evidence.d.ts +25 -0
- package/dist/checkout-engine/evidence.js +104 -0
- package/dist/checkout-engine/executor.d.ts +176 -0
- package/dist/checkout-engine/executor.js +1322 -0
- package/dist/checkout-engine/hosted-approval.d.ts +187 -0
- package/dist/checkout-engine/hosted-approval.js +478 -0
- package/dist/checkout-engine/index.d.ts +6 -0
- package/dist/checkout-engine/index.js +8 -0
- package/dist/checkout-engine/inline-target.d.ts +13 -0
- package/dist/checkout-engine/inline-target.js +37 -0
- package/dist/checkout-engine/instrument.d.ts +61 -0
- package/dist/checkout-engine/instrument.js +87 -0
- package/dist/checkout-engine/live-fill-approval.d.ts +43 -0
- package/dist/checkout-engine/live-fill-approval.js +90 -0
- package/dist/checkout-engine/mandate/card-mandate.d.ts +121 -0
- package/dist/checkout-engine/mandate/card-mandate.js +227 -0
- package/dist/checkout-engine/mandate/mandate-ledger.d.ts +142 -0
- package/dist/checkout-engine/mandate/mandate-ledger.js +338 -0
- package/dist/checkout-engine/mandate.d.ts +25 -0
- package/dist/checkout-engine/mandate.js +100 -0
- package/dist/checkout-engine/outcome.d.ts +30 -0
- package/dist/checkout-engine/outcome.js +225 -0
- package/dist/checkout-engine/owner-only-file.d.ts +19 -0
- package/dist/checkout-engine/owner-only-file.js +41 -0
- package/dist/checkout-engine/package.json +3 -0
- package/dist/checkout-engine/receipt.d.ts +81 -0
- package/dist/checkout-engine/receipt.js +109 -0
- package/dist/checkout-engine/repo-env.d.ts +11 -0
- package/dist/checkout-engine/repo-env.js +23 -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 +44 -0
- package/dist/checkout-engine/types.js +2 -0
- package/dist/checkout-engine/vgs-gateway/fetch-credential.d.mts +74 -0
- package/dist/checkout-engine/vgs-gateway/fetch-credential.mjs +248 -0
- package/dist/checkout-engine/vgs-gateway/server-mint-client.d.ts +82 -0
- package/dist/checkout-engine/vgs-gateway/server-mint-client.js +180 -0
- package/dist/checkout-engine/vgs-live-instrument.d.ts +179 -0
- package/dist/checkout-engine/vgs-live-instrument.js +296 -0
- package/dist/checkout-engine/vic-confirmation.d.ts +34 -0
- package/dist/checkout-engine/vic-confirmation.js +39 -0
- package/dist/cli.js +448 -433
- package/dist/mcp-server/index.js +366 -170
- package/dist/skills/pair-visa-agent/RUNTIMES.md +92 -0
- package/dist/skills/pair-visa-agent/SKILL.md +468 -0
- package/dist/skills/pair-visa-agent/scripts/setup.mjs +48 -0
- package/install.ps1 +3 -41
- package/install.sh +3 -35
- package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
- package/package.json +16 -12
- package/server.json +3 -3
package/install.ps1
CHANGED
|
@@ -168,7 +168,6 @@ if ($npmExitCode -ne 0) {
|
|
|
168
168
|
# Verify
|
|
169
169
|
$cliCommandNames = Get-InstalledCliCommands
|
|
170
170
|
$verifiedCommand = $null
|
|
171
|
-
$verifiedCommandPath = $null
|
|
172
171
|
$visaVersion = $null
|
|
173
172
|
|
|
174
173
|
foreach ($commandName in $cliCommandNames) {
|
|
@@ -177,12 +176,9 @@ foreach ($commandName in $cliCommandNames) {
|
|
|
177
176
|
continue
|
|
178
177
|
}
|
|
179
178
|
|
|
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
179
|
$versionOutput = (& $commandInfo.Source --version 2>$null | Select-Object -First 1)
|
|
183
180
|
if ($LASTEXITCODE -eq 0 -and $versionOutput) {
|
|
184
181
|
$verifiedCommand = $commandName
|
|
185
|
-
$verifiedCommandPath = $commandInfo.Source
|
|
186
182
|
$visaVersion = $versionOutput.Trim()
|
|
187
183
|
break
|
|
188
184
|
}
|
|
@@ -191,46 +187,12 @@ foreach ($commandName in $cliCommandNames) {
|
|
|
191
187
|
Write-Host ""
|
|
192
188
|
if ($verifiedCommand) {
|
|
193
189
|
Write-Host " Visa CLI $visaVersion installed." -ForegroundColor Green
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
}
|
|
190
|
+
Write-Host " Connect an AI client with: $verifiedCommand connect <client>" -ForegroundColor Cyan
|
|
191
|
+
Write-Host " Then ask your agent to call enroll_agent." -ForegroundColor Cyan
|
|
229
192
|
Write-Host ""
|
|
230
193
|
} else {
|
|
231
194
|
$primaryCommand = $cliCommandNames | Select-Object -First 1
|
|
232
195
|
Write-Host " Installed but '$primaryCommand' was not runnable from PATH yet." -ForegroundColor Yellow
|
|
233
|
-
Write-Host " Close and reopen PowerShell, then run: $primaryCommand
|
|
234
|
-
Write-Host " Run /mcp inside Claude Code after setup if you need to reconnect the MCP server." -ForegroundColor Yellow
|
|
196
|
+
Write-Host " Close and reopen PowerShell, then run: $primaryCommand connect <client>" -ForegroundColor Yellow
|
|
235
197
|
Write-Host ""
|
|
236
198
|
}
|
package/install.sh
CHANGED
|
@@ -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
|
-
|
|
115
|
-
|
|
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 enroll_agent."
|
|
145
113
|
else
|
|
146
114
|
warn "Installed, but 'visa-cli' was not found on PATH."
|
|
147
|
-
warn "
|
|
115
|
+
warn "Restart your shell, then run: visa-cli connect <client>"
|
|
148
116
|
fi
|
|
149
117
|
echo ""
|
|
150
118
|
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visa/cli",
|
|
3
|
-
"version": "4.1.0-rc.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "4.1.0-rc.91",
|
|
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"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"sync:server-json": "node scripts/sync-server-json.mjs",
|
|
11
11
|
"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",
|
|
12
|
+
"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 && pnpm --filter @visa/checkout-engine build",
|
|
13
13
|
"build": "tsc --noEmit && node esbuild.config.js",
|
|
14
14
|
"prepack": "node scripts/sync-server-json.mjs --check",
|
|
15
15
|
"dev": "tsc --watch",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"test:smoke": "VISA_AUTH_URL=https://auth.visacli.sh jest --config jest.smoke.config.js",
|
|
23
23
|
"test:integration": "jest --config jest.integration.config.js",
|
|
24
24
|
"test:e2e": "jest --config jest.e2e.config.js",
|
|
25
|
-
"test:catalog-e2e": "jest --config jest.catalog-e2e.config.js",
|
|
26
25
|
"test:all": "npm run test:unit && npm run test:integration && npm run test:e2e",
|
|
27
26
|
"prepublishOnly": "npm run build && npm test",
|
|
28
27
|
"lint": "eslint src/**/*.ts",
|
|
@@ -43,21 +42,26 @@
|
|
|
43
42
|
"license": "SEE LICENSE IN LICENSE",
|
|
44
43
|
"dependencies": {
|
|
45
44
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
45
|
+
"@ucp-js/sdk": "0.4.1",
|
|
46
46
|
"commander": "^12.1.0",
|
|
47
|
+
"punycode": "^2.3.1",
|
|
47
48
|
"zod": "^3.23.0"
|
|
48
49
|
},
|
|
49
50
|
"optionalDependencies": {
|
|
50
|
-
"libp2p": "^3.3.
|
|
51
|
-
"@libp2p/tcp": "^11.0.
|
|
52
|
-
"@libp2p/crypto": "^5.1.
|
|
51
|
+
"libp2p": "^3.3.8",
|
|
52
|
+
"@libp2p/tcp": "^11.0.26",
|
|
53
|
+
"@libp2p/crypto": "^5.1.22",
|
|
53
54
|
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
54
55
|
"@chainsafe/libp2p-yamux": "^8.0.1",
|
|
55
56
|
"@multiformats/multiaddr": "^13.0.3",
|
|
56
57
|
"uint8arrays": "^6.1.1",
|
|
57
|
-
"
|
|
58
|
+
"playwright-core": "^1.48.2"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
61
|
+
"@visa/agent-mail": "workspace:*",
|
|
62
|
+
"@visa/checkout-engine": "workspace:*",
|
|
60
63
|
"@visa/crypto": "workspace:*",
|
|
64
|
+
"@visa/identity": "workspace:*",
|
|
61
65
|
"subway-sdk": "workspace:*",
|
|
62
66
|
"@visa/money": "workspace:*",
|
|
63
67
|
"@visa/wallet": "workspace:*",
|
|
@@ -68,16 +72,16 @@
|
|
|
68
72
|
"@changesets/cli": "^2.31.0",
|
|
69
73
|
"@types/jest": "^30.0.0",
|
|
70
74
|
"@types/node": "^26.1.0",
|
|
71
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
72
|
-
"@typescript-eslint/parser": "^8.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "^8.65.0",
|
|
76
|
+
"@typescript-eslint/parser": "^8.65.0",
|
|
73
77
|
"@types/express": "^5.0.0",
|
|
74
78
|
"esbuild": "^0.28.1",
|
|
75
79
|
"express": "^4.21.0",
|
|
76
80
|
"eslint": "^10.0.2",
|
|
77
81
|
"eslint-config-prettier": "^10.1.8",
|
|
78
82
|
"jest": "^29.7.0",
|
|
79
|
-
"prettier": "^3.9.
|
|
80
|
-
"ts-jest": "^29.4.
|
|
83
|
+
"prettier": "^3.9.6",
|
|
84
|
+
"ts-jest": "^29.4.12",
|
|
81
85
|
"typescript": "^5.7.0"
|
|
82
86
|
},
|
|
83
87
|
"engines": {
|
package/server.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
|
|
3
3
|
"name": "io.github.visa-crypto-labs/visa-cli",
|
|
4
|
-
"version": "4.1.0-rc.
|
|
4
|
+
"version": "4.1.0-rc.91",
|
|
5
5
|
"title": "Visa CLI",
|
|
6
|
-
"description": "
|
|
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.
|
|
12
|
+
"version": "4.1.0-rc.91",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
},
|