You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tighten agent-facing instructions + verify autonomous flow live
Minimize token cost of the strings an AI agent parses:
- sentinel.ts: runtime `instructions` now leads with protocol: 'v2ray'
(zero-admin Windows path) and drops the verbose setup() comment; was
stale (no protocol) and contradicted the Windows-100 docs.
- index.ts /manifest: collapse the V2Ray/zero-prereq explanation that was
repeated 6x across tldr, platforms, connectWindows.{zeroPrereq,
wireguardUpgrade,default} and connect.protocolNote into one canonical
place (connectWindows). Terse pointers elsewhere. ~half the bytes,
every load-bearing fact preserved.
Autonomous-flow E2E (agent pays node directly in P2P, no operator):
fresh-test/connect-autonomous.mjs + AUTONOMOUS-E2E-RESULTS.txt. Live PASS
on Base/Sentinel: 1 GB per-GB session 45433200, v2ray, US node, exit IP
verified through tunnel, 40.19 P2P spent (~live median). Mnemonic passed
via env, never committed.
'Install (agent side only — you do NOT clone this repo): `npm install @x402/fetch @x402/evm viem blue-js-sdk`. That is the complete dependency set for paying and connecting. The express/@x402/express/dotenv packages are operator-only — ignore them.',
303
303
`POST ${network==='eip155:8453' ? 'https://x402.sentinel.co' : '/'}/vpn/connect/{1day|7days|30days} with { sentinelAddr } using @x402/fetch to auto-sign the 402. Tiers cost $0.033 / $0.233 / $1.00 USDC — pick the smallest that covers your need; $0.033 is enough to start. Add { country: "DE" } to get a node in a specific country (GET /nodes lists what is available). Payment is identical on every OS.`,
304
304
'Connecting differs by OS. macOS & Linux: use the native CLI `sentinel-dvpncli` (go install github.com/sentinel-official/sentinel-dvpncli@latest — needs Go 1.24+). The CLI shells out to the system tunnel binary, so install `wireguard-tools` (provides `wg-quick`; most nodes are WireGuard) and, for V2Ray nodes, a `v2ray` binary on PATH. Then import the key (`printf \'%s\\n\\n\' "$MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test`), `tx session-start <nodeAddress> --subscription-id <id> --tx.fee-granter-addr <feeGranter> --tx.from-name agent --keyring.backend test`, resolve the id with `query sessions --account-addr <sent1...> --subscription-id <id> --output-format json`, then `connect <sessionId>` (sudo to bring the interface up). See sentinel.connectMacLinux. Only Fedora is unsupported (SELinux blocks VPNs).',
305
-
'Windows: NO manual install and NO admin needed if you pin V2Ray. `connect({ mnemonic, subscriptionId, feeGranter, nodeAddress, protocol: "v2ray" })` auto-downloads the v2ray binary (userspace SOCKS5, ~70% of nodes) on first use — zero prerequisites beyond the npm install. Optionally `await setup()` first to pre-fetch it. WireGuard nodes (the other ~30%, faster) need admin ONCE for the MSI; the SDK checks admin before payment and refuses a WireGuard node when not elevated, so no funds are wasted — if you cannot elevate, stay on protocol: "v2ray". See sentinel.connectWindows.',
305
+
'Windows: zero prereqs. `connect({ mnemonic, subscriptionId, feeGranter, nodeAddress, protocol: "v2ray" })` auto-downloads the v2ray binary (userspace SOCKS5, ~70% of nodes, no admin). WireGuard (~30%, faster) needs admin once; the SDK gates on admin BEFORE payment, so no funds are wasted. See sentinel.connectWindows.',
306
306
'Tunnel is up. You paid as little as $0.033 USDC (1day) up to $1.00 (30day), zero gas on Base, zero gas on Sentinel.',
returns: {address: 'sent1... (use this as sentinelAddr)',mnemonic: 'string (persist this)'},
525
525
note: 'Generate once per agent. The address goes in the request body; the mnemonic signs MsgStartSession.',
526
526
},
527
-
platforms: 'Payment is identical on every OS; only the connect step differs. Windows is the zero-prereq path: with protocol: "v2ray" the JS SDK auto-downloads the tunnel binary (no admin, no manual install — see connectWindows / connect); WireGuard nodes there are an optional admin-once upgrade. macOS & Linux use the native CLI (sentinel-dvpncli + a system tunnel binary you install yourself — see connectMacLinux). Only Fedora is unsupported: its SELinux blocks VPN interfaces and cannot be bypassed programmatically.',
527
+
platforms: 'Payment is identical on every OS; only connect differs. Windows: zero-prereq with protocol: "v2ray" (see connectWindows). macOS & Linux: native CLI sentinel-dvpncli (see connectMacLinux). Fedora unsupported (SELinux blocks VPN interfaces).',
zeroPrereq: 'Windows needs NO manual install and NO admin if you pass protocol: "v2ray". V2Ray is a userspace SOCKS5 proxy (no system access); connect() auto-downloads the v2ray binary to ~/.sentinel-sdk/bin on first use (no admin). This covers ~70% of the network (~630 nodes). This is the fully self-provisioning Windows path.',
requestHint: 'For a guaranteed-connectable node, also send { sentinelAddr, protocol: "v2ray" } in the POST body so the operator provisions a V2Ray node. GET /nodes?protocol=v2ray lists them.',
548
-
wireguardUpgrade: 'WireGuard nodes (the other ~30%, faster) need admin ONCE: the WireGuard MSI install and tunnel-service creation are elevated operations. setup() auto-installs the MSI only when run elevated (cscript run-admin.vbs setup.js triggers a single UAC prompt; a Windows service running as SYSTEM/admin needs none). The SDK checks admin BEFORE payment and refuses a WireGuard node when not elevated — so no USDC and no P2P is ever wasted. If you cannot elevate, stay on protocol: "v2ray".',
549
-
default: 'Calling connect() WITHOUT a protocol searches both node types — on a non-admin box it may pick a WireGuard node and fail the admin gate (no funds lost). Agents that cannot guarantee admin should always pin protocol: "v2ray".',
546
+
v2ray: 'protocol: "v2ray" = zero prereq. Userspace SOCKS5; connect() auto-downloads the binary to ~/.sentinel-sdk/bin (no admin, no manual install). ~70% of nodes (~630).',
547
+
wireguard: 'protocol: "wireguard" = ~30% of nodes, faster, but needs admin ONCE (MSI install). The SDK gates on admin BEFORE payment, so a non-admin box wastes no funds. Pin "v2ray" if you cannot elevate.',
548
+
noProtocol: 'Omitting protocol searches both types and may pick a WireGuard node that fails the admin gate (no funds lost). Pin "v2ray" if admin is not guaranteed.',
549
+
requestHint: 'To force a V2Ray node, POST { sentinelAddr, protocol: "v2ray" }. GET /nodes?protocol=v2ray lists them.',
550
550
},
551
551
connect: {
552
552
package: 'blue-js-sdk/ai-path',
553
-
platform: 'Windows path (JS tunnel). On macOS/Linux use connectMacLinux (native CLI) instead.',
553
+
platform: 'Windows (JS tunnel). macOS/Linux use connectMacLinux.',
protocolNote: 'protocol is optional but RECOMMENDED on Windows: "v2ray" = zero admin, zero manual install, auto-downloaded binary, ~70% of nodes. Omit it only if you have admin (then WireGuard nodes are also usable). See connectWindows.',
556
-
argsFrom: 'Pass response.success fields directly. mnemonic is the one from createWallet().',
555
+
protocolNote: 'On Windows pin protocol: "v2ray" (zero admin) unless you have admin. See connectWindows.',
556
+
argsFrom: 'Pass response.success fields directly. mnemonic is from createWallet().',
0 commit comments