Expand description
Remote apply path: PC shells out to OpenSSH and runs the CLI agent on a box.
Default path never writes the box authorized_keys. Key install is explicit
opt-in via RemoteOptions::install_ssh_key.
Modulesยง
- arch ๐
- Map box
uname -mto GitHub Release target triples. - askpass ๐
- Resolve an OpenSSH askpass binary for Desktop / non-TTY SSH login.
- bins ๐
- Local Release cache and
--bin-dirresolution for box binaries. - ecosystem ๐
- Shared status-api + MCP install (remote payload and embedded full apply).
- host ๐
- OpenSSH host target: config Host alias or
user@host. - process ๐
- Injectable process runner for OpenSSH / curl / tar (unit-testable).
- runner ๐
- High-level remote apply: probe arch, drop CLI agent, run setup, install payload.
- ssh ๐
- OpenSSH session helpers (
ssh,scp,ssh-copy-id). - surfaces ๐
- Cross-surface probes: SSH, box CLI, status-api, MCP (PC + box).
- transfer ๐
- File transfer:
scpfirst; preferrsync -e sshwhen both ends have it.
Structsยง
- ApiSurface
Probe - Status-api HTTP (+ optional unit via SSH).
- CliSurface
Probe - Box CLI probe row.
- Command
Output - Captured stdout/stderr and exit status from an external program.
- Ecosystem
Install Choice - Which ecosystem services to install (user opt-in, default neither).
- Host
Spec - Destination passed to
ssh/scpas the remote operand. - Local
Bins - Paths to box binaries after cache extract or
--bin-dir. - McpHost
Probe - MCP readiness on one host (PC or box): stdio runtime + HTTP.
- Remote
BoxSnapshot - Setup status + doctor from the box without uploading (TUI
r). - Remote
CliProbe - Result of probing CLI binaries already on the box (no SCP).
- Remote
Options - Options for a remote OpenSSH session and binary source.
- Remote
Options Input - Common inputs shared by CLI, TUI, desktop, and MCP when building
RemoteOptions. - Remote
RunFlags - Boolean switches for a remote CLI run.
- Remote
RunOutcome - Result of a remote CLI run (log text plus optional captured status-api bearer).
- Remote
RunRequest - CLI arguments to run on the box via the uploaded agent (without the binary name).
- SshEnv
- Environment overrides for Desktop askpass (and related OpenSSH knobs).
- SshSession
- SSH destination plus askpass policy.
- SshSurface
Probe - SSH reachability / key auth.
- Surface
Probe Report - Full surface probe for tip + box.
- System
Process Runner - Default runner that spawns real OS processes.
Enumsยง
- BoxArch
- Box architecture labels used for Release assets and local cache paths.
- Remote
BoxCli Status - How to show the box CLI after SSH was attempted.
- Stdio
Mode - How child stdio is connected.
Constantsยง
- API_
TOKEN_ DROP_ BASENAME - User-owned drop file basename for token capture (remote).
- BOX_
BIN_ NAMES - Filenames expected in a full box Release tar (MCP may be absent).
- DEFAULT_
GITHUB_ REPO - Default GitHub repo that publishes box Release tar.gz assets.
- DEFAULT_
INSTALL_ DIR - Permanent install directory for CLI + TUI + status-api + MCP on the box.
- DEFAULT_
REMOTE_ AGENT_ DIR - Remote directory for the temporary CLI apply agent.
- ENSURE_
API_ TOKEN_ SCRIPT - Ensure
/etc/horto-os-ui/api.envexists with a random bearer token (0600). - MCP_
UNIT - MCP systemd unit from packaging (kept in sync via
include_str!). - MIN_
API_ TOKEN_ HEX_ LEN - Minimum tip bearer length. Box install writes 64 hex chars; shorter leftovers (including unit-test junk) must never be treated as a real Status API token.
- STATUS_
API_ UNIT - Status-api systemd unit body (
ExecStartdefaults to/usr/local/bin).
Traitsยง
- Process
Runner - Runs external programs (real OS or a test double).
Functionsยง
- asset_
name - Release tarball file name for a version + target triple.
- box_
arch_ from_ uname - Parse
uname -moutput into a supported box architecture. - cache_
bin_ dir - Cache directory for one release tag + version + arch.
- classify_
ssh_ failure - Classify OpenSSH failure text into auth vs unreachable (best-effort).
- default_
cache_ root - Default XDG cache root:
$XDG_CACHE_HOME/horto-os-ui/remote-binsor~/.cache/.... - default_
release_ tag - Default GitHub Release tag for a Cargo version (
0.1.0โv0.1.0). - ensure_
local_ bins - Resolve box binaries from
--bin-diror download+extract a Release tar.gz. - finish_
save_ api_ token - Finish a save-token prompt given the raw answer (test seam).
- format_
surfaces_ report - Human-readable multi-line report (CLI
surfaces). - http_
get_ label - Minimal HTTP/1.0 GET label for probes (no extra HTTP crate).
- install_
ecosystem_ after_ embedded_ apply - Resolve local bins and install selected ecosystem services after embedded full apply.
- install_
ecosystem_ services - Install selected ecosystem bins into
install_dirand enable chosen units. - local_
api_ token_ path - Path to the local tip API token file (UI display only).
- normalize_
cli_ version - First line of
horto-os-ui --version/ long-version output. - offer_
save_ api_ token - Propose saving the status-api bearer to
~/.config/horto-os-ui/api_token. - parse_
api_ token_ drop - Parse drop-file contents:
HORTO_API_TOKEN=<hex>or bare hex. - parse_
host_ spec - Parse a non-empty Host alias or
user@hoststring. - parse_
remote_ json - Parse the first JSON object/array from remote captured output.
- prefer_
rsync - True when local
rsyncexists and the remote host hasrsyncon PATH. - probe_
api_ surface - Probe status-api only.
- probe_
cli_ surface - Probe box CLI only.
- probe_
mcp_ surface - Probe MCP PC + box only.
- probe_
remote_ cli - Probe install-dir then agent-dir CLI versions over SSH (never SCP).
- probe_
ssh_ access BatchModeSSHtrueagainst the box (no password prompt).- probe_
ssh_ surface - Probe SSH only (
BatchMode). - probe_
surfaces - Probe all surfaces for a remote host, or loopback when
embedded. - pull_
remote_ api_ token - Pull the box Status API bearer over SSH (sudo) and save the tip file.
- read_
local_ api_ token - Read local tip bearer when present (hex only).
- release_
download_ url - GitHub Release download URL for a box tar.gz asset.
- release_
tag_ is_ immutable - Whether a Release tag is treated as immutable for the local remote-bins cache.
- remote_
box_ snapshot - Probe CLI version, then fetch setup status and doctor when current. Never SCP.
- remote_
cli_ version_ is_ current - Whether a remote
--versionline matches this PCโs bakedLONG_VERSION. - remote_
doctor - Fetch doctor JSON from the box.
- remote_
doctor_ report_ banner - Log the remote doctor JSON header (stderr via tracing).
- remote_
enable_ ecosystem_ script - Shell fragment: install selected bins/units from
staging. - remote_
ensure_ ssh_ key - Opt-in: install the tip pubkey on the box (
ssh-copy-id). - remote_
install_ key_ banner - Operator banner before
ssh-copy-id(pubkey path included). - remote_
install_ payload - Copy CLI + TUI + status-api (+ MCP when present) into
install_dirand enable units. - remote_
probe_ arch - Probe
uname -mon the remote host. - remote_
progress_ message - Format an operator progress banner for remote SSH/SCP/key steps.
- remote_
reboot - Issue
sudo rebooton the box (CLI: password on the terminal via Inherit). - remote_
reboot_ with_ sudo_ password - Issue
sudo rebootusing a sudo password already collected by the UI. - remote_
run_ banner_ detail - Detail line for a remote CLI run banner.
- remote_
run_ cli - Upload the CLI agent (if needed), optionally install a public key, run a remote CLI command.
- remote_
setup_ run - Convenience: remote
setup runwith optional payload install. - remote_
setup_ status - Fetch setup step status from the box (
setup status, JSON when supported). - remote_
upload_ cli - Upload the PC CLI to the box agent dir (s0 / explicit sync).
- resolve_
local_ ecosystem_ bins - Resolve ecosystem binaries for embedded install.
- scp_
files - Copy one or more local files to a remote directory using
scp. - transfer_
files - Copy files with rsync when available, otherwise scp.
- unit_
with_ install_ dir - Rewrite default
/usr/local/bin/ExecStartpaths for a custom install prefix. - usable_
api_ token_ hex - Return trimmed hex when it is usable as a tip Status API bearer.
- wants_
reboot_ now - Whether a reboot prompt answer means reboot now.
- write_
api_ token_ file - Write hex bearer to the local config path with mode
0o600.