Skip to content

M4: Start Oxbit on an SSH host from iOS - #42

Merged
yannelli merged 17 commits into
mainfrom
m4/ios-remote-runtime
Oct 8, 2026
Merged

yannelli merged 17 commits into
mainfrom
m4/ios-remote-runtime

Conversation

@yannelli

@yannelli yannelli commented Oct 8, 2026

Copy link
Copy Markdown
Owner

iOS starts an Oxbit runtime on a saved SSH host and connects to it, so terminal, tasks, and Agent ACP run on that host through the existing runtime client. The device installs the same signed payload as desktop under ~/.oxbit/remote/runtimes/<sha256>. The host downloads it with curl or wget, and the device downloads and streams it when the host cannot. Both paths check the sha256 pinned into the iOS build. A loopback listener forwards connections over direct-tcpip, taskForward gets its own listeners, and the app relaunches or reconnects after drops and on return to the foreground (3 automatic tries per minute).

Release changes: each release attaches remote-runtime-{darwin-arm64,linux-x64}.tar.gz and remote-runtime-manifest.json. The ios job now waits for macos, because the darwin tarball is re-signed there and iOS pins that digest. The build variable is TAURI_OXBIT_REMOTE_RUNTIME_MANIFEST.

Stacked on #41 and draft for the same export compliance reason. Agent checks: lint, typecheck, vitest 816/816, ios:check (83 Rust tests), plugin tests 10/10, tests/ios 22/22, the release manifest script tests, and ssh-live 3/3 against a Docker sshd. The ssh-live run covered device-stream and curl installs, the cached launch, a terminal command through the tunnel, relaunch after kill -9, and reconnect after a restart. Not run: release.yml itself, device download through URLSession, wget, a darwin-arm64 host, taskForward end to end, and a real device.

The macos job copies the bundled SSH runtime payloads (after the darwin
archive is signed and repacked) into the release as
remote-runtime-<platform>.tar.gz with a combined
remote-runtime-manifest.json. The ios job waits for macos and embeds that
manifest through OXBIT_REMOTE_RUNTIME_MANIFEST; remote_runtime.rs validates
it and builds the release download URL.
…ronment

tauri ios build drops OXBIT_ variables before cargo runs in the Xcode
script phase, so the pin uses TAURI_OXBIT_REMOTE_RUNTIME_MANIFEST.
…ntime

# Conflicts:
#	apps/ios/src-tauri/src/lib.rs
Mirror the desktop remote runtime: detect the platform, reuse the shared
~/.oxbit/remote/runtimes/<sha256> install, let the host download the pinned
archive with curl or wget, or verify and stream it from the device. Launch
desktop.js with the same environment scrubbing and frame protocol, tunnel a
loopback port over direct-tcpip, answer taskForward, send heartbeats, and
relaunch after a dropped connection within a three-per-minute budget.
A saved SSH host can start the remote runtime from the start screen or the
command palette. The dialog shows the desktop's install and start progress
and defaults the folder to the host's last one. The workspace connects the
existing runtime client to the loopback tunnel, appears in recent
workspaces, resumes when the app returns to the foreground, and stops the
remote runtime when it closes.
Covers the device-stream and curl installs, fs.read and a terminal command
through the tunnel, the cached launch, relaunch after kill -9, and reconnect
after docker restart. The live script serves the tarball while cargo runs.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
oxbit e7cdef2 Commit Preview URL

Branch Preview URL
Oct 08 2026, 07:16 PM

RuntimeDownloadStore checks size and SHA-256 before keeping an archive and
cancels by runtime ID, so closing a workspace ends its download. ios:check
runs a macOS harness against a fixed GitHub release asset.
A user's start or Reconnect no longer counts toward the three automatic
relaunches per minute, and the app reports when automatic attempts stop.
The second live runtime test installs with wget on a host without curl,
fetches a service task through its taskForward listener, and checks that
three failed automatic relaunches wait for Reconnect.
…y on npm

npm 11 rejects publish --dry-run over an existing version, so pull
requests that touch the publish inputs failed while the package versions
stayed unchanged.
@yannelli
yannelli changed the base branch from m3/ios-ssh-foundation to main October 8, 2026 19:15
@yannelli
yannelli marked this pull request as ready for review October 8, 2026 22:02
@yannelli
yannelli merged commit d45138c into main Oct 8, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant