@visa/cli 4.1.0-rc.326 → 4.1.0-rc.328
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 +10 -18
- package/dist/cli.js +353 -363
- package/dist/mcp-server/index.js +311 -323
- package/dist/merchant-ucp-mcp/index.js +6 -6
- package/dist/skills/pair-visa-agent/SKILL.md +3 -9
- package/native/bin/darwin-arm64/visa-runtime-signer +0 -0
- package/native/bin/darwin-x64/visa-runtime-signer +0 -0
- package/native/bin/linux-arm64/visa-runtime-signer +0 -0
- package/native/bin/linux-x64/visa-runtime-signer +0 -0
- package/native/bin/win32-arm64/visa-runtime-signer.exe +0 -0
- package/native/bin/win32-x64/visa-keychain-win.exe +0 -0
- package/native/bin/win32-x64/visa-runtime-signer.exe +0 -0
- package/package.json +2 -12
- package/server.json +2 -2
- package/dist/subway-direct.mjs +0 -1
|
@@ -369,16 +369,10 @@ approval** until the protected no-tap executor lands. Enrollment, a session, or
|
|
|
369
369
|
grant does not approve a later hosted payment. Relay the hosted approval URL and wait for
|
|
370
370
|
the owner's decision before reporting success or retrying.
|
|
371
371
|
|
|
372
|
-
##
|
|
372
|
+
## Retired mesh integration
|
|
373
373
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
may expose `subway_register`, `subway_send`, `subway_inbox`, and `subway_find`.
|
|
377
|
-
|
|
378
|
-
Mesh messaging is available only on a compatible RC/dev build with `SUBWAY_MESH=visa` and
|
|
379
|
-
a reachable `SUBWAY_RELAY_MULTIADDR`. If those tools or the relay are unavailable, report
|
|
380
|
-
that clearly and stop. Do not imply that connecting an agent granted directory or
|
|
381
|
-
messaging authority, and do not improvise another transport.
|
|
374
|
+
Subway messaging and `visa register` are retired. Pairing grants no directory or
|
|
375
|
+
messaging authority. Do not attempt mesh registration or improvise another transport.
|
|
382
376
|
|
|
383
377
|
## Optional agent mailbox (separate from setup)
|
|
384
378
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visa/cli",
|
|
3
|
-
"version": "4.1.0-rc.
|
|
3
|
+
"version": "4.1.0-rc.328",
|
|
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",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"sync:server-json": "node scripts/sync-server-json.mjs",
|
|
12
12
|
"check:server-json": "node scripts/sync-server-json.mjs --check",
|
|
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
|
|
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 @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",
|
|
14
14
|
"build": "tsc --noEmit && node esbuild.config.js",
|
|
15
15
|
"prepack": "node scripts/sync-server-json.mjs --check",
|
|
16
16
|
"dev": "tsc --watch",
|
|
@@ -53,15 +53,6 @@
|
|
|
53
53
|
"yaml": "^2.9.0",
|
|
54
54
|
"zod": "^3.25.76"
|
|
55
55
|
},
|
|
56
|
-
"optionalDependencies": {
|
|
57
|
-
"@chainsafe/libp2p-noise": "^17.0.0",
|
|
58
|
-
"@chainsafe/libp2p-yamux": "^8.0.1",
|
|
59
|
-
"@libp2p/crypto": "^5.1.23",
|
|
60
|
-
"@libp2p/tcp": "^11.0.26",
|
|
61
|
-
"@multiformats/multiaddr": "^13.0.3",
|
|
62
|
-
"libp2p": "^3.3.9",
|
|
63
|
-
"uint8arrays": "^6.1.1"
|
|
64
|
-
},
|
|
65
56
|
"devDependencies": {
|
|
66
57
|
"@types/express": "^5.0.0",
|
|
67
58
|
"@types/jest": "^30.0.0",
|
|
@@ -82,7 +73,6 @@
|
|
|
82
73
|
"express": "^4.21.0",
|
|
83
74
|
"jest": "^29.7.0",
|
|
84
75
|
"prettier": "^3.9.6",
|
|
85
|
-
"subway-sdk": "workspace:*",
|
|
86
76
|
"ts-jest": "^29.4.12",
|
|
87
77
|
"typescript": "^5.7.0"
|
|
88
78
|
},
|
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": "4.1.0-rc.
|
|
4
|
+
"version": "4.1.0-rc.328",
|
|
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": "4.1.0-rc.
|
|
12
|
+
"version": "4.1.0-rc.328",
|
|
13
13
|
"transport": {
|
|
14
14
|
"type": "stdio"
|
|
15
15
|
},
|
package/dist/subway-direct.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createLibp2p as I}from"libp2p";import{generateKeyPairFromSeed as x,publicKeyFromRaw as A}from"@libp2p/crypto/keys";import{tcp as U}from"@libp2p/tcp";import{noise as q}from"@chainsafe/libp2p-noise";import{yamux as D}from"@chainsafe/libp2p-yamux";import{multiaddr as O}from"@multiformats/multiaddr";import{toString as T}from"uint8arrays/to-string";var p=new TextEncoder().encode("noise-libp2p-static-key:");function M(e){if(e.publicKey.length!==32)throw new Error("subway_public_key_invalid");let r=A(e.publicKey);if(r.type!=="Ed25519")throw new Error("subway_public_key_invalid");let n={type:"Ed25519",publicKey:r,get raw(){throw new Error("subway_private_key_export_forbidden")},equals(t){return t===n},async sign(t){let o=t instanceof Uint8Array?t:t.subarray();if(o.length!==p.length+32||!p.every((i,a)=>o[a]===i))throw new Error("subway_signing_purpose_forbidden");let s=await e.signNoiseStaticKey(o.slice(p.length));if(s.length!==64||!await r.verify(o,s))throw new Error("subway_custody_signature_invalid");return s}};return n}var y=new TextEncoder,N=new TextDecoder;function w(e,r){let n=typeof r=="bigint"?r:BigInt(r);for(;n>0x7fn;)e.push(Number(n&0x7fn|0x80n)),n>>=7n;e.push(Number(n))}function d(e,r){let n=0n,t=0n,o=r;for(;;){let s=e[o++];if(n|=BigInt(s&127)<<t,(s&128)===0)break;t+=7n}return[n,o]}function g(e,r){return e<<3|r}function f(e,r,n){e.push(g(r,2)),w(e,n.length);for(let t of n)e.push(t)}function S(e,r,n){let t=[];return f(t,1,y.encode(e)),r&&r.length>0&&f(t,2,y.encode(r)),n&&n.length>0&&f(t,3,y.encode(n)),Uint8Array.from(t)}function P(e,r,n,t){let o=[];return n!==0n&&(o.push(g(1,0)),w(o,n)),f(o,2,S(e,r,t)),Uint8Array.from(o)}function k(e){let r=[];return f(r,1,y.encode(e)),Uint8Array.from(r)}function K(e,r){let n=[];return r!==0n&&(n.push(g(1,0)),w(n,r)),f(n,3,k(e)),Uint8Array.from(n)}var F="Name not found";function L(e){let r=0,n={success:!1,error:""};for(;r<e.length;){let[t,o]=d(e,r);r=o;let s=Number(t)>>3,i=Number(t)&7;if(s===1&&i===0){let[a,l]=d(e,r);r=l,n.success=a!==0n}else if(s===2&&i===2){let[a,l]=d(e,r),c=l,u=c+Number(a);n.error=N.decode(e.subarray(c,u)),r=u}else r=h(e,r,i)}return n}function B(e){let r=0,n={peerId:new Uint8Array(0),error:""};for(;r<e.length;){let[t,o]=d(e,r);r=o;let s=Number(t)>>3,i=Number(t)&7;if(s===1&&i===2){let[a,l]=d(e,r),c=l,u=c+Number(a);n.peerId=e.subarray(c,u),r=u}else if(s===2&&i===2){let[a,l]=d(e,r),c=l,u=c+Number(a);n.error=N.decode(e.subarray(c,u)),r=u}else r=h(e,r,i)}return n}function h(e,r,n){if(n===0)return d(e,r)[1];if(n===2){let[t,o]=d(e,r);return o+Number(t)}if(n===5)return r+4;if(n===1)return r+8;throw new Error(`unsupported wire type ${n}`)}function v(e){let r=0,n={requestId:0n};for(;r<e.length;){let[t,o]=d(e,r);r=o;let s=Number(t)>>3,i=Number(t)&7;if(s===1&&i===0){let[a,l]=d(e,r);r=l,n.requestId=a}else if(s===13&&i===2){let[a,l]=d(e,r),c=l,u=c+Number(a);n.registerNameResponse=L(e.subarray(c,u)),r=u}else if(s===14&&i===2){let[a,l]=d(e,r),c=l,u=c+Number(a);n.resolveNameResponse=B(e.subarray(c,u)),r=u}else r=h(e,r,i)}return n}function V(e){let r=new Uint8Array(4+e.length);return new DataView(r.buffer).setUint32(0,e.length,!1),r.set(e,4),r}function _(e){return new DataView(e.buffer,e.byteOffset,4).getUint32(0,!1)}function $(e){if(e.length<4)return{success:!1,error:"short reply (no length prefix)"};let r=_(e.subarray(0,4));return e.length<4+r?{success:!1,error:`truncated frame (have ${e.length-4}, need ${r})`}:v(e.subarray(4,4+r)).registerNameResponse??{success:!1,error:"reply carried no register_name_response"}}function Y(e){if(e.length<4)return{peerId:new Uint8Array(0),error:"short reply (no length prefix)"};let r=_(e.subarray(0,4));return e.length<4+r?{peerId:new Uint8Array(0),error:`truncated frame (have ${e.length-4}, need ${r})`}:v(e.subarray(4,4+r)).resolveNameResponse??{peerId:new Uint8Array(0),error:"reply carried no resolve_name_response"}}var z="/subway/p2p/1.0.0",X=15e3,G=15e3,b=1<<20;function m(e){let r=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(r),t=0;for(let o of e)n.set(o,t),t+=o.length;return n}async function W(e){let r=[],n=0,t=-1;for await(let o of e){let s=o instanceof Uint8Array?o:o.subarray();if(r.push(s),n+=s.length,n>b)throw new Error("subway: reply exceeded max size");if(t<0&&n>=4&&(t=4+_(m(r).subarray(0,4)),t>b))throw new Error("subway: declared frame exceeds max size");if(t>=0&&n>=t)return m(r).subarray(0,t)}return m(r)}async function E(e,r){if(e&&r)throw new Error("subway_custody_conflict");return I({...r?{privateKey:M(r)}:e?{privateKey:await x("Ed25519",e)}:{},transports:[U()],connectionEncrypters:[q()],streamMuxers:[D()],connectionGater:{denyDialMultiaddr:async()=>!1}})}async function R(e,r,n){let t=await e.dialProtocol(O(r),z,{signal:AbortSignal.timeout(X)});t.send(V(n));let o;return Promise.race([W(t),new Promise((s,i)=>{o=setTimeout(()=>i(new Error("subway: request timed out")),G)})]).finally(()=>clearTimeout(o))}async function j(e){if(!e.seed&&!e.custody)throw new Error("subway_custody_required");let r=await E(e.seed,e.custody);try{let n=await R(r,e.relayMultiaddr,P(e.name,e.binding,e.requestId??1n,e.runtimeCertificate)),t=$(n);return{success:t.success,error:t.error,peerId:r.peerId.toString()}}finally{await r.stop()}}async function C(e){let r=await E(e.seed);try{let n=await R(r,e.relayMultiaddr,K(e.name,e.requestId??1n)),t=Y(n);if(t.peerId.length===0){let o=t.error||"name not found";return{outcome:o===F?"not_found":"lookup_failed",found:!1,peerId:"",error:o}}return{outcome:"found",found:!0,peerId:T(t.peerId,"base58btc"),error:""}}finally{await r.stop()}}export{j as registerDirect,C as resolveDirect};
|