agent
kind: agentname: boxspec: workspaces: [~/src/app]The resource declares a machine: a runy daemon on a box reached with ssh. The hub runs ssh -T -o BatchMode=yes <ssh_args> <host> -- <binary> --port <port> daemon bridge, so ssh keys, agents and ~/.ssh/config apply and no password prompt can appear.
host is required. Unknown keys are rejected.
| field | default | |
|---|---|---|
host |
the ssh destination, anything ssh accepts |
required |
name |
the machine’s name, as -m takes it |
the resource’s name |
ssh_args |
more ssh arguments, a list ([-J, bastion]) |
[] |
transport |
ssh; et is not supported yet |
ssh |
binary |
the runy binary on the box, relative to the remote home | .local/share/runy/bin/runy |
port |
the remote daemon’s API port | 4122 |
workspaces |
remote paths registered as workspaces on every connect; ~ is the remote home; the first is the default |
[] |
routes |
the box’s port resources the proxy routes, see routes |
all |
Status
Section titled “Status”{ "machine": "box", "host": "[email protected]", "state": "connected", "ready": true, "version": "0.7.0", "build": "5b70a93e", "os": "linux", "arch": "x86_64", "binary": { "path": "/home/stan/.local/share/runy/bin/runy", "sha256": "9b1f4c0e..." }, "workspaces": [{ "path": "/home/stan/src/app", "name": "app-9xk2p7qd" }], "routes": [{ "domain": "web.dev.app.box.runy.localhost", "protocol": "http", "resource": "dev/port/web", "url": "http://web.dev.app.box.runy.localhost" }], "reason": null }state is connecting, connected, disconnected, incompatible or closed (the link was closed on purpose). ready is true when state is connected. reason holds the last stderr lines of the failed link. binary is null until the box was probed, and workspaces lists what the remote answered for each path.
The default value is ready: needs: ["${ agent.box }"] waits for the link.
Provisioning
Section titled “Provisioning”The first time, and on the setup signal, runy probes the box with one ssh call: uname -s, uname -m, $HOME and the sha256 of binary. The matching runy binary comes from the first of these that has it:
- The hub’s own executable, when the box has the hub’s os and architecture.
RUNY_GUEST_BINARIES, a folder holdingruny-<linux|darwin>-<x86_64|aarch64>.- The Bazel build, for a
runy-devhub. - The release of the hub’s own version, downloaded from runy.dev, as for
vm.
It is uploaded over ssh only when its sha256 differs from the box’s. Provisioning also runs when the bridge exits with 126 or 127 (the binary is missing) and once after incompatible.
The box follows the hub’s build. When a hub starts, cold or after an in-place upgrade, the first link compares the installed binary with the one it resolves for the box and uploads the new one before the bridge connects, so the bridge’s new binary upgrades the daemon on the box in place. After an upgrade the hub already knows the installed sha256 and skips the probe when it matches; the journal says runy in the machine: <old sha> → <new sha>; relinking when it does not. A failed upload makes the resource Error (machine box: updating runy: ...) and the link goes on with the binary that is on the box.
routes
Section titled “routes”routes makes the hub’s proxy serve the port resources the daemon on the box runs, through the link: absent or true routes all, false none, and a list of <namespace>/<port> globs the matching ones (*, ?; _ is the top level). A running port web of namespace dev in the workspace app-9xk2p7qd on the machine box of a hub whose host label is mini is web.dev.app-9xk2p7qd.box.mini.runy.localhost, the name that always works, here and on the hub’s mesh peers. It is also web.dev.app-9xk2p7qd.box.runy.localhost without the host label, and web.dev.app.box.runy.localhost and web.dev.app.box.mini.runy.localhost by the workspace’s folder; the status lists the shortest that is routed. Changing routes keeps the link. An agent adds no ssh name, since the box is already reached over ssh. Names, limits and what the hub checks are in machine routes.
Signals
Section titled “Signals”restart respawns the link. setup provisions again, then respawns the link. Other signals are ignored.
Removal
Section titled “Removal”Removing the resource, or stopping the daemon, only closes the link. The runy daemon on the box keeps running and its resources with it.

