{ "lexicon": 1, "id": "com.fedfork.exec.iroh.connect", "defs": { "main": { "type": "procedure", "description": "Host pseudo-call, never sent to a PDS (like com.fedfork.exec.attest): a module lists it in calls to be allowed to reach an iroh endpoint. wasm holds no socket, so the host dials the ticket (dumbpipe connect, n0 relays) and does one exchange. Without alpn: ssh over dumbpipe's default ALPN to a socialweb.computer guest (vm.onNetwork iroh://...), host key pinned to hostKeys (StrictHostKeyChecking), the host's ssh key, as root; runs command, returns its output. With alpn (e.g. atirc/irc/1): writes send, closes its side, returns what the peer sent until it closes (or the host's timeout). Hosts without dumbpipe (browsers, Workers) refuse it.", "input": { "encoding": "application/json", "schema": { "type": "object", "required": ["ticket"], "properties": { "ticket": { "type": "string", "maxLength": 4096, "description": "An iroh ticket, bare or iroh:// as in vm.onNetwork address." }, "alpn": { "type": "string", "maxLength": 64, "description": "Custom ALPN for a raw exchange (e.g. atirc/irc/1, atirc/xrpc/1). Absent: ssh to a guest." }, "hostKeys": { "type": "array", "description": "ssh only, required: the bidder's vm.hostKeys keys ({type, publicKey} or authorized_keys strings).", "items": { "type": "unknown" } }, "command": { "type": "string", "maxLength": 4096, "description": "ssh only: the command to run. Required for the one-shot call; optional for a session (subscribe: true), where none is a remote shell reading stdin." }, "stdin": { "type": "string", "maxLength": 65536, "description": "ssh only: written to the command's stdin, then EOF. Secrets (tokens) go here, never in command: the command is an argument of ssh on the host and of the login shell on the guest, so ps shows it on both." }, "send": { "type": "string", "maxLength": 65536, "description": "alpn only: bytes (utf-8) to write before closing the send side." } } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": ["output"], "properties": { "output": { "type": "string", "description": "ssh: the command's stdout; alpn: what the peer sent." }, "exitCode": { "type": "integer", "description": "ssh only: the command's exit status." }, "timedOut": { "type": "boolean", "description": "alpn only: true when the exchange hit its timeout; output is what the peer sent until then." } } } } } } }