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
docs+manifest: fix mac/Linux connect path verified against dvpncli source
End-to-end source trace (sentinel-dvpncli + sentinel-go-sdk) surfaced two
defects that would block an AI agent on macOS/Linux:
1. `keys add` is INTERACTIVE and has NO --recover flag (only --hd-path,
--output-format). It prompts for mnemonic, then a BIP-39 passphrase. The
single-line `echo "$MNEMONIC" | keys add` hung on the passphrase prompt.
Fixed to `printf '%s\n\n' "$MNEMONIC" | keys add agent --keyring.backend test`
(line 1 = mnemonic, blank line 2 = default empty passphrase).
2. `tx session-start` prints {response, result} but does NOT surface the new
session id as a clean field — connect <id> needs it. Added the deterministic
recovery step: `query sessions --account-addr <sent1...> --subscription-id
<id> --output-format json` → newest entry's id.
Verified correct (unchanged): connect [id] takes a SESSION id (ExactArgs(1),
ParseUint → client.Session), needs no key; tx session-start <node-addr>
--subscription-id builds subscriptionv3.MsgStartSessionRequest;
--tx.fee-granter-addr / --tx.from-name are real TxConfig flags; --keyring.backend
allowed values file/kwallet/memory/os/pass/test (default os); rpc defaults
rpc.sentinel.co:443 / sentinelhub-2; keyring name default "sentinel".
Surfaces: docs/index.html (CLI code block + embedded manifest + full-flow
comment), docs/llms.txt (native-CLI section + flow step 8), server/src/index.ts
(/manifest connectMacLinux.steps, tldr, flow step 8). tsc --noEmit passes;
embedded JSON validates.
8. Agent connects, using the path for its OS (both consume the same 200 fields):
62
-
- **macOS/Linux:** `sentinel-dvpncli tx session-start <nodeAddress> --subscription-id <subscriptionId> --tx.fee-granter-addr <feeGranter> --tx.from-name <key>` → note the returned session id → `sentinel-dvpncli connect <sessionId>`. (See "macOS & Linux — native CLI connect".)
62
+
- **macOS/Linux:** import the key (`printf '%s\n\n' "$MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test`), `sentinel-dvpncli tx session-start <nodeAddress> --subscription-id <subscriptionId> --tx.fee-granter-addr <feeGranter> --tx.from-name agent --keyring.backend test`, resolve the new id with `sentinel-dvpncli query sessions --account-addr <sent1...> --subscription-id <subscriptionId> --output-format json` (newest entry), then `sentinel-dvpncli connect <sessionId>`. (See "macOS & Linux — native CLI connect".)
63
63
- **Windows:** `setup()` once on a fresh machine, then `connect({ mnemonic, subscriptionId, feeGranter, nodeAddress })`. (See "Windows — JS-SDK connect".)
64
64
9. `MsgStartSession` on Sentinel — gas paid by `feeGranter` (the fee grant the server created in step 6, so the agent's session start costs zero P2P).
65
65
10. Direct WireGuard/V2Ray handshake — tunnel up. The operator never sees it.
@@ -130,8 +130,11 @@ sentinel-dvpncli version
130
130
131
131
```bash
132
132
# 1. Import the SAME wallet whose sentinelAddr (sent1...) you sent to x402.
133
-
# The mnemonic is read from stdin; --keyring.backend test makes it non-interactive (no OS keychain prompt).
134
-
echo "$AGENT_MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test
133
+
# `keys add` is INTERACTIVE — there is NO --recover flag. It prompts for the mnemonic,
134
+
# then a BIP-39 passphrase. Feed BOTH from stdin: line 1 = mnemonic, blank line 2 = default
135
+
# (empty) passphrase. A single-line echo would hang on the passphrase prompt.
136
+
# --keyring.backend test makes it non-interactive for the OS keychain (no keychain prompt).
137
+
printf '%s\n\n' "$AGENT_MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test
135
138
# (keyring.backend defaults to "os"; use "test" or "file" for scripted/agent use.)
136
139
137
140
# 2. Start the session against the subscription x402 shared with you.
'You need: (a) an EVM wallet with USDC on Base, (b) a Sentinel wallet from `createWallet()` in `blue-js-sdk/ai-path`.',
298
298
`POST ${network==='eip155:8453' ? 'https://x402.sentinel.co' : '/'}/vpn/connect/30days with { sentinelAddr } using @x402/fetch to auto-sign the 402. Add { country: "DE" } to get a node in a specific country (GET /nodes lists what is available). Payment is identical on every OS.`,
299
-
'Connecting differs by OS. macOS & Linux (easiest): WireGuard ships with the OS — use the native CLI `sentinel-dvpncli` (go install github.com/sentinel-official/sentinel-dvpncli@latest), then `keys add` your mnemonic, `tx session-start <nodeAddress> --subscription-id <id> --tx.fee-granter-addr <feeGranter>`, and `connect <sessionId>`. See sentinel.connectMacLinux. Only Fedora is unsupported (SELinux blocks VPNs).',
299
+
'Connecting differs by OS. macOS & Linux (easiest): WireGuard ships with the OS — use the native CLI `sentinel-dvpncli` (go install github.com/sentinel-official/sentinel-dvpncli@latest), 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>`. See sentinel.connectMacLinux. Only Fedora is unsupported (SELinux blocks VPNs).',
300
300
'Windows (heavier): run `await setup()` from `blue-js-sdk/ai-path` first — it auto-downloads V2Ray (no admin) and installs WireGuard — then `connect({ mnemonic, subscriptionId, feeGranter, nodeAddress })`. See sentinel.connectWindows.',
301
301
'Tunnel is up. You paid $1.00 USDC, zero gas on Base, zero gas on Sentinel.',
why: 'Easiest path — WireGuard ships with macOS and mainstream Linux, so nothing to install for the tunnel. Flag-driven, non-interactive.',
521
521
steps: [
522
-
'keys add: echo "$MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test (import the SAME wallet whose sentinelAddr you sent to x402)',
523
-
'session-start: sentinel-dvpncli tx session-start <nodeAddress> --subscription-id <subscriptionId> --tx.fee-granter-addr <feeGranter> --tx.from-name agent --keyring.backend test --rpc.chain-id sentinelhub-2 --output-format json (operator fee-grants the gas; capture the session id from the tx events)',
524
-
'connect: sentinel-dvpncli connect <sessionId> (WireGuard nodes may need sudo to bring the interface up)',
522
+
'keys add: printf \'%s\\n\\n\' "$MNEMONIC" | sentinel-dvpncli keys add agent --keyring.backend test (import the SAME wallet whose sentinelAddr you sent to x402. keys add is INTERACTIVE — no --recover flag: line 1 answers the mnemonic prompt, the blank line 2 accepts the default empty BIP-39 passphrase. A single-line echo would hang on the passphrase prompt.)',
'resolve session id: sentinel-dvpncli query sessions --account-addr <sent1...> --subscription-id <subscriptionId> --output-format json — session-start does NOT print the new id cleanly, so query it back and take the newest entry (.result[-1].id).',
525
+
'connect: sentinel-dvpncli connect <sessionId> (takes the SESSION id, not the subscription id; needs no key — it only queries the session and builds the tunnel. WireGuard nodes may need sudo to bring the interface up)',
0 commit comments